/** * custom-agents.ts — Load user-defined agents from project (.pi/agents/, plus the shared .agents/agents/ workspace) 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 (authoritative — also where /agents writes) * 2. Workspace: /.agents/agents/*.md (shared cross-tool .agents workspace, read-only) * 3. Global: $PI_CODING_AGENT_DIR/agents/*.md (default: ~/.pi/agent/agents/*.md) * * Project-level agents override global ones with the same name. On a name clash * between the two project locations, .pi/agents wins — .pi stays the project * authority; .agents/agents is an additional read location. * Any name is allowed — names matching defaults (e.g. "Explore") override them. */ export declare function loadCustomAgents(cwd: string): Map;