import type { AccessContext } from "../sharing/access.js"; import type { ShareRole } from "../sharing/schema.js"; /** * Resolve a run's owning thread id. Checks in-memory run state first (populated * synchronously by startRun, so there is no race against the async SQL insert), * then falls back to SQL for cross-isolate / post-reload lookups. Returns null * when the run is unknown. */ export declare function resolveRunThreadId(runId: string): Promise; /** True when `owner` owns the chat thread `threadId`. */ export declare function callerOwnsThread(owner: string, threadId: string | null | undefined): Promise; /** True when `owner` has at least `role` access to the chat thread. */ export declare function callerHasThreadAccess(owner: string, threadId: string | null | undefined, role?: ShareRole | "owner", ctx?: Omit): Promise; /** True when `owner` owns the thread that run `runId` belongs to. */ export declare function callerOwnsRun(owner: string, runId: string): Promise; /** True when `owner` has at least `role` access to the thread behind `runId`. */ export declare function callerHasRunAccess(owner: string, runId: string, role?: ShareRole | "owner", ctx?: Omit): Promise; //# sourceMappingURL=run-ownership.d.ts.map