import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { DelegateClientAvailability, DelegateRuntimeErrorCode, DelegateRuntimeReceipt } from "./types.js"; export type DelegateRuntimeModuleLoader = () => Promise; export type DelegateRuntimeModuleImporter = (moduleId: string) => Promise; export declare function importDelegateRuntime(importer?: DelegateRuntimeModuleImporter): Promise; /** Decode the pi-delegate v1 receipt envelope: required fields strict, additive fields tolerated. */ export declare function decodeDelegateRuntimeReceipt(value: unknown): DelegateRuntimeReceipt | undefined; export declare function delegateRuntimeErrorCode(error: unknown): DelegateRuntimeErrorCode | undefined; export declare function errorMessage(error: unknown): string; /** Load the optional peer without making standalone pi-work extension loading fail. */ export declare function loadDelegateClient(context: ExtensionContext, loadModule?: DelegateRuntimeModuleLoader): Promise;