import type { Api, Model } from "@earendil-works/pi-ai"; import { DefaultResourceLoader, ModelRuntime, type ResourceLoader } from "@earendil-works/pi-coding-agent"; import { type ResolvedInheritance } from "./inherit.js"; import type { PiAppDefinition } from "./types.js"; type ResourceLoaderOptions = ConstructorParameters[0]; export type PiFactoryAppResources = { readonly settingsManager?: ResourceLoaderOptions["settingsManager"]; readonly eventBus?: ResourceLoaderOptions["eventBus"]; readonly extensionPaths?: readonly string[]; readonly skillPaths?: readonly string[]; readonly promptTemplatePaths?: readonly string[]; readonly themePaths?: readonly string[]; readonly extensionFactories?: ResourceLoaderOptions["extensionFactories"]; readonly systemPrompt?: string; readonly appendSystemPrompt?: readonly string[]; readonly noContextFiles?: boolean; }; export type PiFactoryRuntime = { readonly modelRuntime: ModelRuntime; readonly model: Model; readonly resourceLoader: ResourceLoader; readonly inheritance: ResolvedInheritance; readonly run: (runId: string, operation: () => Promise) => Promise; readonly close: () => Promise; readonly providerOwnsAuthentication: boolean; }; export declare function createPiFactoryRuntime(input: { readonly app: PiAppDefinition; readonly cwd: string; readonly agentDir: string; readonly appAgentDir: string; readonly providerId: string; readonly modelId: string; readonly appResources?: PiFactoryAppResources; readonly prepareModelRuntime?: (modelRuntime: ModelRuntime) => void | Promise; readonly signal?: AbortSignal; }): Promise; export {};