import type { ExtensionRunner } from "@earendil-works/pi-coding-agent"; import { CapturedToolCatalog } from "../capture/catalog.js"; import { FabricShellJobStore } from "../core/shell-jobs.js"; import type { FabricActionDescriptor, FabricInvocationContext, FabricProvider, FabricProviderListRequest } from "../protocol.js"; import { CapturedToolsProvider } from "./captured-tools-provider.js"; import { type ShellDefinitionFactory } from "./pi-bash-cwd.js"; interface PiToolsProviderHostCapabilities { requireCapturedOverrides?: boolean; /** True when a host policy relies on Pi tool_call hooks; non-read tools then never run without them. */ requireToolHooks?: () => boolean; powerShellToolDefinitionFactory: ShellDefinitionFactory | undefined; getShellHangMs?: () => number; shellJobs?: FabricShellJobStore; } /** * Why a nested mutating call is refused while no ExtensionRunner can run the * other extensions' `tool_call` hooks. `unavailable` means capture found no * runner class in this host, so no refresh will ever supply one: a retry * cannot succeed, and the message says so instead. */ export declare function missingToolHooksMessage(subject: string, unavailable: boolean): string; /** * Emit a `tool_call` event for a nested call and throw when a hook blocks it. * Hooks may mutate `input` in place. Shared by pi.* tools and by interactive * sessions, so a command guard sees both through one code path. */ export declare function emitToolCallPreflight(runner: ExtensionRunner, name: string, input: Record, context: Pick, blocked?: string): Promise; export declare class PiToolsProvider implements FabricProvider { #private; readonly name = "pi"; readonly description = "Pi's built-in coding tools"; constructor(cwd: string, catalog?: CapturedToolCatalog, capturedTools?: CapturedToolsProvider, hostCapabilities?: PiToolsProviderHostCapabilities); get shellJobs(): FabricShellJobStore; close(): Promise; list(request: FabricProviderListRequest, _context: FabricInvocationContext): Promise; describe(actionName: string, _context: FabricInvocationContext): Promise; prepareArguments(actionName: string, args: Record): Record; /** * Why a tool the parent has (built in or captured) is unavailable to this * child, so the registry reports the allowlist instead of an unknown action. */ notPermitted(name: string): string | undefined; invoke(actionName: string, args: Record, context: FabricInvocationContext): Promise; } export {}; //# sourceMappingURL=pi-tools-provider.d.ts.map