/** * profiles — Agent profile registry. * * Provides built-in profiles (explore, plan, general, review) and * user-defined custom profiles loaded from .pi/settings.json. * * Profiles define role-specific behavior: tool restrictions (by capability, * not hardcoded tool names), model routing, system prompts, and output format. */ import type { AgentProfile, BuiltinProfileName } from "./types.js"; /** * Resolve an agent profile by name. * * Lookup order: * 1. Project-scoped file agent (.pi/agents/.md) * 2. User-global file agent (~/.pi/agents/.md) * 3. User-defined profiles (from .pi/settings.json pi-swarm.subagents) * 4. Built-in profiles (explore, plan, general, review) * 5. Fallback: general profile */ export declare function resolveProfile(name: string | undefined, cwd?: string): AgentProfile; /** * Get all built-in profiles. */ export declare function getBuiltinProfiles(): Record; /** * Derive tool restrictions for a profile. * Returns a list of allowed native tools. * Never returns undefined — always passes an explicit list so * buildSubagentArgs() can strip pi-swarm's own tools (Swarm, etc.) * from the subagent's tool set at arg-build time. * * Resolution order: * 1. If profile.tools (explicit allowlist) is set → use that list exactly * (capability flags still filter native tools from it) * 2. If profile.disallowedTools is set → start from capability-derived base, * then subtract disallowed items * 3. If neither → use capability flags only * * Capability flags: * - allowWrite=false: remove edit, write from resolved set * - allowBashWrite=false: keep bash but caller should add read-only prompt * * Since community tools vary by installation, capability flags are the * recommended portable mechanism. Explicit tool lists are for power users. */ export declare function resolveProfileTools(profile: AgentProfile): string[] | undefined; /** * Derive a human-readable agent name. * * Priority: * 1. Explicit profile name * 2. First meaningful segment of item text (e.g. "repo-inspect: ..." -> "repo-inspect") * 3. Fallback: agent-{index} */ export declare function deriveAgentName(profileName: string | undefined, item: string | undefined, index: number): string; //# sourceMappingURL=profiles.d.ts.map