import { type ApprovedCommand } from '@operato/ops-contract'; import { type CommandAck, type CommandStore } from './command-dispatcher.js'; /** 한 바퀴에 볼 최대 수 — 대기 줄이 커도 한 주기를 독차지하지 않게. */ export declare const SWEEP_LIMIT = 50; export interface SweepReport { /** 표에서 읽은 수. */ seen: number; /** 실제로 넘긴 수. */ dispatched: number; /** 넘기지 않은 이유별 수 — 목록이 그대로 보인다. */ skipped: Record; } /** * 이 테넌트의 대기 줄을 한 바퀴 훑는다. * * 저장소가 대기 줄을 못 내면 **아무것도 하지 않는다** — 그 능력이 없는 구현도 그대로 돌아야 * 한다(옛 거동). */ export interface SweepDeps { store: CommandStore; /** 이 조치를 저쪽에 낸다 — 부르는 쪽이 커넥터 배선을 안다. */ actuate: (command: ApprovedCommand) => Promise; /** 이 연결이 두 번 보내도 지시가 하나인가 — **선언만 참으로 읽는다.** */ idempotent: (instanceId: string) => Promise; /** * 우리 쪽 설정만으로 답할 수 있는 준비 상태. 저쪽을 두드리지 않는 답만 준다. * * 없으면 앞점검을 하지 않는다(그냥 넘긴다) — 모르는 것을 거절로 접지 않는 규율이다. */ localReadiness?: (instanceId: string) => Promise<{ ready?: boolean; reason?: string; code?: string; } | undefined>; nowMs?: () => number; } export declare function sweepPendingDispatch(domainId: string, deps: SweepDeps): Promise;