import { type ChildProcess, type SpawnOptions } from "node:child_process"; import { type BootstrapSyncResult } from "../bootstrap/sync.js"; export type PrimusRuntimeOptions = { appRoot: string; workingDir: string; sessionDir: string; primusAgentDir: string; primusHome: string; mode?: "text" | "json" | "rpc"; thinkingLevel?: string; explicitModelSpec?: string; oneShotPrompt?: string; initialPrompt?: string; }; export type PrimusPiPaths = { piPackageRoot: string; piCliPath: string; piMainPath: string; piCliWrapperPath: string; piCliWrapperSourcePath: string; promisePolyfillPath: string; promisePolyfillSourcePath: string; tsxLoaderPath: string; primusToolsPath: string; promptTemplatePath: string; systemPromptPath: string; nodeModulesBinPath: string; }; type LaunchPiDependencies = { syncBundledAssets?: (appRoot: string, agentDir: string, home?: string, workingDir?: string) => BootstrapSyncResult; normalizePrimusSettings?: (settingsPath: string, bundledSettingsPath: string, authPath: string) => void; patchEmbeddedPi?: (appRoot: string) => Promise | void; spawnImpl?: (command: string, args: ReadonlyArray, options: SpawnOptions) => ChildProcess; }; export declare function resolvePiPaths(appRoot: string): PrimusPiPaths; export declare function toNodeImportSpecifier(modulePath: string): string; export declare function buildPiArgs(options: PrimusRuntimeOptions, paths?: PrimusPiPaths): string[]; export declare function buildPiEnv(options: PrimusRuntimeOptions, paths?: PrimusPiPaths): NodeJS.ProcessEnv; export declare function exitCodeFromSignal(signal: NodeJS.Signals): number; export declare function launchPiChat(options: PrimusRuntimeOptions, dependencies?: LaunchPiDependencies): Promise; export {};