import type { AgentFile, CommandFile, SkillFile, ToolFile, MCPServerConfig, OpenCodeConfig } from "../../schema-kernel/index.js"; export type PrimitiveType = "agent" | "command" | "skill" | "tool" | "mcp"; export interface LoaderOptions { /** Absolute or relative path to the project root. */ projectRoot: string; /** Optional path to global config directory (~/.config/opencode/). */ globalConfigPath?: string; /** Optional path to opencode.json (defaults to projectRoot/opencode.json). */ opencodeJsonPath?: string; } export interface LoadResult { agents: Map; commands: Map; skills: Map; mcpServers: Map; config: OpenCodeConfig | null; warnings: string[]; } export type PrimitiveMap = { agents: Map; commands: Map; skills: Map; tools: Map; mcpServers: Map; config: OpenCodeConfig; }; export type SingleLoadResult = { success: true; data: T; } | { success: false; error: string; }; /** * Scans the `.opencode/` directory tree for agents, commands, skills, and * tools; reads `opencode.json`; validates all found files against lenient * schemas; and returns a populated {@link LoadResult} with cross-reference * warnings. */ export declare function loadPrimitives(options: LoaderOptions): Promise; /** * Reads and parses a single primitive file from disk. * * @param filePath - Absolute path to the .md file * @param type - Primitive type determines which schema to use */ export declare function loadPrimitive(filePath: string, type: PrimitiveType): Promise>; //# sourceMappingURL=primitive-loader.d.ts.map