/** * Agent template loading, validation, and inheritance. * Spec: §5.2, §5.3, §5.4 */ import type { AgentTemplate, AgentLifecycle } from "@pi-orca/core"; /** * Resolved agent template after inheritance. * Same as AgentTemplate but ensures all fields are present. */ export interface ResolvedAgentTemplate extends AgentTemplate { thinking: string; tools: string[]; skills: string[]; restrictions: string[]; extensions: string[]; /** Non-optional after inheritance; defaults to "one-shot". */ lifecycle: AgentLifecycle; } /** * Load a single template by name. * Search order: project → user. Project shadows user. * * @param templateName - Template name (e.g., "scout") * @param projectDir - Project root (optional, used to find .pi/orca/agents/) * @param userDir - User home (optional, used to find ~/.pi/agent/orca/agents/) * @returns Parsed template * @throws Error if template not found or invalid */ export declare function loadAgentTemplate(templateName: string, projectDir?: string, userDir?: string): Promise; /** * Resolve inheritance from parent context. * Spec: §5.3 inheritance table * * @param childTemplate - Child template * @param parentTemplate - Parent template (or undefined for root) * @param parentTools - Active tools in parent context (from pi.getActiveTools()) * @returns Resolved template with all fields populated * @throws Error if tool-list cannot be enumerated for extend mode */ export declare function resolveInheritance(childTemplate: AgentTemplate, parentTemplate: ResolvedAgentTemplate | undefined, parentTools: string[]): ResolvedAgentTemplate; /** * Load all templates from a directory. * Pattern from Pi's subagent example (§1 prior art). * * @param dirPath - Directory containing .md template files * @param source - "project" or "user" for logging * @returns Map of template name → AgentTemplate */ export declare function loadAgentsFromDir(dirPath: string, source: "project" | "user"): Promise>; /** * Merge templates from project and user directories. * Project shadows user. * * @param projectDir - Project root * @param userDir - User home * @returns Map of template name → AgentTemplate */ export declare function loadAllAgentTemplates(projectDir: string, userDir: string): Promise>; //# sourceMappingURL=template.d.ts.map