import { BUNDLED_AGENTS } from "./bundled-agents.js"; /** * Which model a sub-agent runs on. * * - `"inherit"` (default) — the parent's model, so a delegated task is not * silently downgraded. * - `"fast"` — the provider's cheap tier (`getFastModel`), for genuinely * mechanical recon. * - any other string — an explicit model id. */ export type AgentModelPreference = "inherit" | "fast" | (string & {}); export interface AgentDefinition { name: string; /** Routing signal — written for the dispatcher, not for the child. */ description: string; /** Tool allow-list. Empty means inherit the full toolset. */ tools: string[]; /** Model policy for children of this agent. Defaults to `"inherit"`. */ model?: AgentModelPreference; /** Whether the child's prompt includes project context files. Default `"project"`. */ context?: "project" | "none"; systemPrompt: string; source: "global" | "project" | "bundled"; } /** * MCP server names an agent's `tools:` list asks for, derived from any * `mcp____` entries. * * A session with an allow-list connects MCP servers ONLY when they're named in * `allowedMcpServers` (see `AgentSession.connectMcpServers`). Without this, * every named agent silently got zero MCP tools — even one that explicitly * listed `mcp__kencode-search__searchCode` — so agents fell back to training * data instead of real public code. */ export declare function mcpServersForAgent(tools: readonly string[]): string[]; /** * Report `tools:` entries the session could never register. * * `AgentSession` filters its tool set by name, so an unknown entry is dropped * without a word: the agent just quietly loses a capability (or, if every name * is wrong, runs with nothing). Warn instead — and stay non-fatal, because a * bad agent file must never take down a session. * * @returns the unrecognized names, for tests and callers that want to report. */ export declare function validateAgentTools(agent: AgentDefinition, origin: string): string[]; /** * Discover agent definitions from global and project-local directories. * Agent files are markdown with frontmatter (similar to skills). * * Order: user agents (project, global) first → bundled defaults last. * The subagent lookup uses Array.prototype.find which matches the first hit, * so user agents override bundled when names collide. */ export declare function discoverAgents(options: { globalAgentsDir?: string; projectDir?: string; }): Promise; /** * Parse an agent definition file with frontmatter. * * ```markdown * --- * name: scout * description: Fast codebase recon that returns compressed context * tools: read, grep, find, ls, bash * --- * * You are a scout. Quickly investigate a codebase... * ``` */ export declare function parseAgentFile(rawInput: string, source: "global" | "project"): AgentDefinition; export { BUNDLED_AGENTS }; //# sourceMappingURL=agents.d.ts.map