import { AsyncLocalStorage } from "node:async_hooks";
/** Host tools a kernel-tool invocation's nested calls may reach. `deny` wins when both name the same tool. */
export type KernelToolInvokeScope = {
    tools?: {
        allow?: string[];
        deny?: string[];
    };
};
export type KernelToolInvokeOptions = {
    signal?: AbortSignal;
    scope?: KernelToolInvokeScope;
    /** Host dispatcher identity, never read from a tool's arguments or cell data. */
    invoker?: {
        readonly sessionId: string;
    };
};
export type ExtensionKernelTools = {
    readonly capabilities: {
        readonly invokeScope: boolean;
    };
    describe(names: readonly string[]): Promise<unknown>;
    invoke(request: {
        name: string;
        kernel_generation: number;
        definition_revision: number;
        args: unknown;
        call_id: string;
    }, options?: AbortSignal | KernelToolInvokeOptions): Promise<unknown>;
};
type KernelToolInvoker = {
    readonly sessionId: string;
};
export declare const kernelToolsStorage: AsyncLocalStorage<ExtensionKernelTools>;
/** The active host dispatcher, including when it executes a capability captured in another session. */
export declare const kernelToolInvokerStorage: AsyncLocalStorage<KernelToolInvoker>;
/** The kernel tools entered for this async context by any engine copy; a store missing its members reads as absent. */
export declare function activeKernelTools(): ExtensionKernelTools | undefined;
/** The host dispatcher identity entered for this async context by any engine copy; an ill-typed one reads as absent. */
export declare function activeKernelToolInvoker(): KernelToolInvoker | undefined;
export {};
//# sourceMappingURL=kernel-tools-context.d.ts.map