/** Success/failure shape returned by an interceptor-backed executor. */ export type ExecutionResult = { ok: true; data: T; } | { ok: false; status: number; message: string; }; /** Function signature shared by AppKit plugin executors. */ export type Executor = (fn: (signal?: AbortSignal) => Promise, settings: Settings) => Promise>; /** Failure details supplied when an intercepted operation cannot complete. */ export interface ExecutionFailure { operation: string; status: number; message: string; } /** Options for running and unwrapping one intercepted operation. */ export interface RunOptions { operation: string; settings: Settings; execute: Executor; fn: (signal?: AbortSignal) => Promise; signal?: AbortSignal; canceled: () => Error; failed: (failure: ExecutionFailure) => Error; } /** * Build the executor used before a plugin installs its interceptor chain. * Errors are mapped onto the same result shape as AppKit's `Plugin.execute()`. */ export declare function directExecutor(): Executor; /** Run an operation through an executor, merge cancellation, and unwrap its result. */ export declare function run(options: RunOptions): Promise;