declare module "node:buffer" { export class Buffer { static byteLength(value: string, encoding?: string): number; } } declare module "node:fs" { export function writeSync(fd: number, text: string): number; export function existsSync(path: string): boolean; export function rmSync(path: string, options?: { recursive?: boolean; force?: boolean }): void; } declare module "node:fs/promises" { export function readFile(path: string, encoding: string): Promise; export function appendFile(path: string, data: string, encoding: string): Promise; export function writeFile(path: string, data: string, encoding: string): Promise; export function mkdir(path: string, options?: { recursive?: boolean }): Promise; export function stat(path: string): Promise<{ size: number }>; export function mkdtemp(prefix: string): Promise; export function readdir(path: string): Promise; export function rename(oldPath: string, newPath: string): Promise; export function rm(path: string, options?: { recursive?: boolean; force?: boolean }): Promise; } declare module "node:os" { export function homedir(): string; export function tmpdir(): string; } declare module "node:path" { export function join(...parts: string[]): string; export function dirname(path: string): string; export function basename(path: string): string; } declare module "node:url" { export function fileURLToPath(url: string | URL): string; } declare module "node:process" { const process: { argv: string[]; env: Record; once(event: string, listener: () => void): void }; export default process; } declare module "node:assert" { const assert: any; export default assert; } declare module "@earendil-works/pi-coding-agent" { export interface ExtensionAPI { on(event: string, callback: (...args: any[]) => any): void; registerCommand(name: string, config: any): void; registerTool?(config: any): void; sendUserMessage(content: string, options?: { deliverAs: "followUp" }): void; } export interface ExtensionCommandContext { cwd: string; isIdle(): boolean; ui: { notify(message: string, type: "info" | "warning" | "error" | "success"): void }; [key: string]: any; } export function getAgentDir(): string; } declare module "@mariozechner/pi-coding-agent" { export function getAgentDir(): string; }