/** * custom-agents.ts — Load user-defined agents from project (.pi/agents/) and global ($PI_CODING_AGENT_DIR/agents/, default ~/.pi/agent/agents/) locations. */ import type { AgentConfig } from "./types.js"; /** * Scan for custom agent .md files from multiple locations. * * Discovery hierarchy (higher priority wins): * 1. Project: `/.pi/agents/*.md` * 2. Global: `$PI_CODING_AGENT_DIR/agents/*.md` (default: `~/.pi/agent/agents/*.md`) * * Project-level agents override global ones with the same name. * Any name is allowed — names matching defaults (e.g. "Explore") override them. * * Security: symlinks are skipped to prevent directory traversal. * * @param cwd - Current working directory (project root) for agent discovery * @returns Map of agent name → parsed {@link AgentConfig} */ export declare function loadCustomAgents(cwd: string): Promise>; /** * Parse a boolean from frontmatter that may be a native boolean OR a string. * Returns `undefined` for "no value" (null / undefined / empty string). * Returns the parsed boolean for: `true`, `false`, `"true"`, `"false"` (case-insensitive). * Throws on any other input (numbers, unrecognized strings, objects) — * YAML schema must be one of the accepted forms, otherwise it's a parse error * that the user should see at load time, not a silent fallback. */ export declare function parseBooleanOptional(val: unknown): boolean | undefined; /** * Parse a boolean with an explicit default for missing values. * null / undefined / empty string → defaultValue. * Throws on any other unparsable input (numbers, unrecognized strings, objects). */ export declare function parseBooleanWithDefault(val: unknown, defaultValue: boolean): boolean;