import { DefaultResourceLoader, ModelRuntime, SettingsManager, type AgentSession, type ExtensionFactory, type SessionManager, type Skill } from "@earendil-works/pi-coding-agent"; import { type ExtractField, type RunResult } from "./result.js"; export declare const BUNDLED_SKILLS_DIR: string; /** The one runtime factory, so every command reads the same auth. */ export declare function createRuntime(): Promise; /** * The loader every command shares, so `doctor` reports the skills a run would * actually load. A filter, not a loader: pi also discovers skills from the * checkout it is pointed at (`.agents/skills`, `.pi/skills`, and the user's * own), and an arbitrary CI clone must not be able to hand the model its own. */ export declare function createLoader(options: LoaderOptions): DefaultResourceLoader; export declare function createTesteiyaSession(options: SessionOptions): Promise; export interface LoaderOptions { cwd: string; settingsManager: SettingsManager; extensionPaths: string[]; extensionFactories?: ExtensionFactory[]; systemPrompt: () => string; } export interface SessionOptions { cwd: string; result: RunResult; sessionManager: SessionManager; model?: string; outputFile?: string; brief?: boolean; /** `extract`: the values to find, and the tool that submits them. */ extract?: ExtractField[]; /** Whole prompt sections this run contributes (the pull request thread rules). * Built from the resolved model, which the caller cannot know before this. */ sections?: (model: string) => string[]; /** Where this run sits in its thread, so the prompt says first or continuing. */ threadMode?: "first" | "continuing"; connection?: { tokenAvailable?: boolean; }; backendUrl?: string; } export interface CreatedSession { session: AgentSession; model: string; /** What the run can reach — the list a `/name` in the task is matched against. */ skills: Skill[]; }