export type RunEvent = {
    type: 'created';
    runId: string;
    at: number;
} | {
    type: 'started';
    runId: string;
    at: number;
} | {
    type: 'token';
    runId: string;
    at: number;
    tokens: number;
    contentBytes?: number;
    cost?: number;
} | {
    type: 'finish';
    runId: string;
    at: number;
    status: 'ok' | 'error' | 'canceled';
} | {
    type: 'error';
    runId: string;
    at: number;
    code?: string;
    message: string;
} | {
    type: 'sse_heartbeat';
    runId: string;
    at: number;
    latencyMs?: number;
};
export interface EventStream {
    subscribe(cb: (e: RunEvent) => void): {
        unsubscribe(): void;
    };
}
export interface RunState {
    runId: string;
    createdAt: number;
    startedAt?: number;
    lastTokenAt?: number;
    tokenCount: number;
    cost?: number;
    status: 'created' | 'running' | 'finished' | 'killed';
    killReason?: string;
    events: RunEvent[];
}
export interface SentinelConfig {
    enabled: boolean;
    runMaxDurationMs: number;
    runMaxTokens: number;
    runIdleMs: number;
    loopWindow: number;
    loopMax: number;
    runMaxCost?: number;
}
//# sourceMappingURL=types.d.ts.map