import type { ThreadAccessPolicy, ThreadAccessResult, ThreadAction, ThreadOperation, ThreadSubject } from "@dawn-ai/sdk"; /** A partial `ThreadAccessRequest`: only `action` is required. */ export interface ThreadAccessCheckSpec { readonly action: ThreadAction; /** Defaults to the canonical operation for the action. */ readonly operation?: ThreadOperation; readonly threadId?: string; readonly thread?: ThreadSubject; readonly headers?: Readonly>; readonly method?: string; readonly url?: string; readonly requestedMetadata?: Readonly>; /** * Whether this request continues a parked turn — see * `ThreadAccessRequest.resuming`. Defaults to `false`, the value every * endpoint but `POST /threads/:id/resume` and a resume-carrying * `POST /agui/:routeId` reports. */ readonly resuming?: boolean; } export interface ThreadAccessHarness { /** * Run one request through the policy exactly as the runtime would: the same * `handler ?? fallback` selection, and the same result normalization — so a * handler that returns nothing on some branch denies here too. */ check(spec: ThreadAccessCheckSpec): Promise; } /** * Unit-test a thread access policy without booting a server. * * `createAgentHarness` is blind to policies by construction — it drives * `streamResolvedRoute` directly, takes no run slot and writes no threads-store * row — so this and `createAgentProtocolInjector({ threadAccess })` are the two * surfaces that make a policy testable. */ export declare function createThreadAccessHarness(options: { readonly policy: ThreadAccessPolicy; }): ThreadAccessHarness; //# sourceMappingURL=thread-access-harness.d.ts.map