import type { InferSchema } from "../../../extensions/schema/index.js"; /** Configuration used by durable run canary API. */ export interface DurableRunCanaryApiConfig { apiUrl: string; authToken: string; agentId: string; projectId: string | null; branchId?: string | null; model?: string | null; requestTimeoutMs: number; fetch?: (input: string | URL | Request, init?: RequestInit) => Promise; } /** Input payload for durable run canary create root run. */ export interface DurableRunCanaryCreateRootRunInput { conversationId: string; runId: string; } /** Input payload for durable run canary send user message. */ export interface DurableRunCanarySendUserMessageInput { conversationId: string; prompt: string; } /** Input payload for durable run canary start run. */ export interface DurableRunCanaryStartRunInput extends DurableRunCanaryCreateRootRunInput { messageId: string; prompt: string; userMessageId: string; } /** Zod schema for get durable run canary message. */ export declare const getDurableRunCanaryMessageSchema: () => import("../../../internal-agents/schema.js").Schema<{ id: string; role: "tool" | "system" | "user" | "assistant"; parts: ({ type: string; } & {} & Record)[]; } & { status?: string | undefined; } & Record>; /** Message shape for durable run canary. */ export type DurableRunCanaryMessage = InferSchema>; /** Public API contract for durable run canary run summary. */ export interface DurableRunCanaryRunSummary { runId: string; conversationId: string; messageId: string; agentId: string; status: string; latestEventId: number; latestExternalEventSequence: number | null; waitingToolCallId: string | null; waitingToolName: string | null; terminalErrorCode: string | null; terminalErrorMessage: string | null; startedAt: string | null; finishedAt: string | null; } /** Parses durable run canary run summary. */ export declare function parseDurableRunCanaryRunSummary(value: unknown): DurableRunCanaryRunSummary; /** Public API contract for durable run canary API client. */ export interface DurableRunCanaryApiClient { createDurableRootRun: (input: DurableRunCanaryCreateRootRunInput) => Promise; getRunSummary: (input: DurableRunCanaryCreateRootRunInput) => Promise; listMessagesForCanary: (input: { conversationId: string; }) => Promise; sendUserMessageForCanary: (input: DurableRunCanarySendUserMessageInput) => Promise; startDurableRun: (input: DurableRunCanaryStartRunInput) => Promise; } /** Create durable run canary API client. */ export declare function createDurableRunCanaryApiClient(config: DurableRunCanaryApiConfig): DurableRunCanaryApiClient; /** Execution metadata retained for each durable run canary prompt. */ export interface DurableRunCanaryExecution { runId: string; run: DurableRunCanaryRunSummary; } /** Result returned from durable run canary. */ export interface DurableRunCanaryResult { id: string; label: string; status: "pass" | "fail"; details: string; durationMs: number; conversationId: string; runId: string; runIds: string[]; artifactPaths?: string[]; } /** Public API contract for durable run canary prepared case. */ export interface DurableRunCanaryPreparedCase { artifactPaths?: string[] | ((runId: string) => string[]); cleanup: (input?: { runId: string; }) => Promise; conversationId: string; followUpPrompt?: string; prompt: string; startSidecar?: () => Promise<(() => Promise) | void>; title: string; validate: (input: { messages: DurableRunCanaryMessage[]; run: DurableRunCanaryRunSummary; executions: DurableRunCanaryExecution[]; }) => Promise | void; } /** Public API contract for durable run canary case. */ export interface DurableRunCanaryCase { id: string; label: string; prepare: () => Promise; } /** Configuration used by durable run canary runner. */ export interface DurableRunCanaryRunnerConfig extends DurableRunCanaryApiConfig { keepSuccessfulEvidence: boolean; } declare function collectReferencedChildConversationIds(messages: DurableRunCanaryMessage[]): string[]; declare function isTerminalRunStatus(status: string): boolean; /** Create durable run canary runner. */ export declare function createDurableRunCanaryRunner(config: DurableRunCanaryRunnerConfig, apiClient?: DurableRunCanaryApiClient): { runCase: (testCase: DurableRunCanaryCase) => Promise; }; /** White-box helpers used by durable run canary tests. */ export declare const durableRunCanaryRunnerInternals: { collectReferencedChildConversationIds: typeof collectReferencedChildConversationIds; isTerminalRunStatus: typeof isTerminalRunStatus; }; export {}; //# sourceMappingURL=runner.d.ts.map