import { type ToolDefinition } from "@earendil-works/pi-coding-agent"; import type { PiShellToolName } from "../core/pi-tools.js"; export declare const PI_BASH_CWD_KEY = "cwd"; /** Compatibility wrapper retained for existing callers and tests. */ export declare const resolvePiBashCwd: (sessionCwd: string, requested: unknown) => string; /** * Rewrite a shell call's cwd while leaving every other argument untouched. * * The extra key stays in the arguments so events, approval, and previews see * the resolved absolute target. The cwd-bound definition selected by the * provider is what ultimately passes it to the native shell backend. */ export declare const resolveShellCwdArgument: (toolName: PiShellToolName, sessionCwd: string, args: Record) => Record; /** Compatibility wrapper retained for existing callers and tests. */ export declare const resolveBashCwdArgument: (sessionCwd: string, args: Record) => Record; /** * Declare `cwd` on a shell descriptor. * * Rebuilt as a fresh TObject rather than spread-cloned: TypeBox schemas carry * Symbol keys that a spread drops, which would leave Value.Check unable to * validate the descriptor. Property values are reused by reference, so they * retain their own Symbols. */ export declare const withShellCwdSchema: (schema: unknown) => unknown; /** Compatibility wrapper retained for existing callers and tests. */ export declare const withBashCwdSchema: (schema: unknown) => unknown; export type ShellDefinitionFactory = (cwd: string) => ToolDefinition; /** * PowerShell entered Pi's host API after Fabric's minimum supported version. * Namespace lookup is deliberate: a named ESM import would reject the whole * Fabric module before an older host could reach this feature gate. */ export declare const resolvePowerShellToolDefinitionFactory: (moduleExports: unknown) => ShellDefinitionFactory | undefined; export declare const powerShellToolDefinitionFactory: ShellDefinitionFactory | undefined; /** Definitions bound to execution directories, with a small LRU cache. */ declare class ShellCwdDefinitions { #private; private readonly createDefinition; constructor(createDefinition: ShellDefinitionFactory); get(cwd: string): ToolDefinition; } export declare class BashCwdDefinitions extends ShellCwdDefinitions { constructor(); } export declare class PowerShellCwdDefinitions extends ShellCwdDefinitions { constructor(createDefinition: ShellDefinitionFactory); } export {}; //# sourceMappingURL=pi-bash-cwd.d.ts.map