import type { ChatMessage } from "../../types.js"; import type { BackgroundJob, ResponderNotification } from "../../tools/jobs.js"; export interface ResponderWake { readonly wakeTurn: boolean; readonly notificationId: string | undefined; readonly jobId: string | undefined; readonly resultRevision: number | undefined; } export interface ResponderClaimView { add(notificationId: string): void; has(notificationId: string): boolean; } export interface ResponderInboxPorts { readonly messages: ChatMessage[]; readonly wake: ResponderWake; readonly claims: ResponderClaimView; readonly getRunningJobs: () => readonly BackgroundJob[]; readonly getPendingNotifications: () => readonly ResponderNotification[]; readonly getResponderLeaseId: () => string | undefined; readonly claimNextNotification: (leaseId: string) => ResponderNotification | undefined; } export declare const parseResponderWake: (input: { readonly prompt: string; readonly displayPrompt: string | null | undefined; }) => ResponderWake; export declare const responderWakeMatchesRevision: (wake: ResponderWake, notification: ResponderNotification) => boolean; export declare const findResponderWakeNotification: (wake: ResponderWake, pending: readonly ResponderNotification[]) => ResponderNotification | undefined; export declare const createResponderInboxRefresher: (ports: ResponderInboxPorts) => () => ResponderNotification | undefined;