import type { GatePolicy } from './policy'; import type { ConfirmPreview } from './preview'; /** * Host capabilities the Constructive database policy needs. These are * Constructive-specific — a policy for another host asks for whatever *its* * rules depend on instead. */ export type ConstructiveGateDeps = { /** * Whether the project is provisioned/runnable at `cwd`. Unrunnable calls * skip the confirm so the tool can return its clean "provision first" * message instead of making the user approve something that fails. */ isProjectRunnable(cwd: string): Promise; /** Whether a data-plane token is available (gates `add_records`). */ hasDataToken(cwd: string): Promise; /** * Resolve the preview for `create_template` (its tables live in the * blueprint it copies, not in the tool input). Return undefined when a * preview can't be built. */ resolveTemplatePreview(cwd: string, blueprintName: string | undefined, displayName: string): Promise; /** * Tool names that require a human decision. Defaults to * `MUTATING_DB_TOOLS`; a host that wants a different set entirely is better * served by its own `GatePolicy`. */ gatedTools?: ReadonlySet; }; /** * The gate policy for Constructive's database tools, as the Desktop and CLI * hosts want it: gate every mutating db tool, and skip the confirm when the * call is going to bounce off a missing project or a missing sign-in anyway. */ export declare function createConstructiveGatePolicy(deps: ConstructiveGateDeps): GatePolicy;