import type { AgentEvent, AgentEventSource, AgentEventSourceOptions } from "./contracts.js"; export type AgentEventSourceErrorCode = "ERR_PRISM_AGENT_EVENT_SOURCE_INPUT" | "ERR_PRISM_AGENT_EVENT_SOURCE_CURSOR" | "ERR_PRISM_AGENT_EVENT_SOURCE_RETENTION" | "ERR_PRISM_AGENT_EVENT_SOURCE_OVERFLOW" | "ERR_PRISM_AGENT_EVENT_SOURCE_CLOSED"; export declare class AgentEventSourceError extends Error { readonly code: AgentEventSourceErrorCode; constructor(code: AgentEventSourceErrorCode, message: string); } /** * In-process, non-production reference implementation. It has no cross-process * wakeup or persistence; use a database-backed source for distributed delivery. */ export declare function createMemoryAgentEventSource(options?: AgentEventSourceOptions): AgentEventSource; /** * Terminal-set membership for agent event streams: a run's stream ends on its outcome record. * * Attribution records — `run_limit_exceeded` and `budget_exhausted` — are delivered *before* that * outcome (the `error` that follows a run-limit death), so a page, subscription, or replay must * keep reading past them. Every stream-ending site routes through this one predicate. */ export declare function isTerminalAgentEventType(type: AgentEvent["type"]): boolean;