import { type Database } from "./database.js"; /** * Run `fn` in the trusted service scope (no subject, no initiating human) of * an open, workspace-scoped transaction, then restore both settings. * * Used only to wake a shared (workspace or organization) pool's capacity * waiters after the caller's own subject has resolved that pool. Waking is * durable invalidation: it bumps the waiter's wake revision and enqueues a * workflow wake, and each waiter then rechecks its own immutable pool. This is * the Codex rule: Codex waiters are woken in the same service scope. Under a * member's subject, FORCE RLS would hide every other member's `user_private` * waiter, which then waited for its periodic recheck. `fn` must stay limited * to the exact pool scope and must not return session rows or ids to the * caller, so the caller gains no read access to another member's session. */ export declare function withPoolWakeServiceScopeInTransaction(tx: Database, fn: () => Promise): Promise;