/** * Vendored from pi-mono — DO NOT EDIT BEHAVIOUR HERE. * Source: packages/coding-agent/examples/extensions/subagent/agents.ts * Repo: https://github.com/badlogic/pi-mono (local clone) * SHA: 3e5ad67e0f325d4888f82f9b82966218eb4407f5 * Date: 2026-05-07 * License: MIT (Copyright (c) 2025 Mario Zechner) — see pi-mono/LICENSE * Notes: Imports rewritten @entelligentsia/* → @entelligentsia/*. * Upstream promotion: see forge-cli/architectural-review.md §R2. * * Forge-cli divergence (FORGE-S20-T11, must be re-applied on every pi-mono sync): * - `discoverAgents` derives the user agents directory via * `getPiAgentAgentsDir()` from `../paths/paths.js` instead of inlining * `path.join(getAgentDir(), "agents")`. The resolver re-exports pi's * getAgentDir so the resulting path is identical — this is a pure * centralization refactor that keeps AC #1 honest (no `getAgentDir()` * call sites in forge-cli outside the resolver). * - See `forge-cli/vendor-pi/DIVERGENCE.md` (sync-pi-upstream picks it up). * * Forge-cli divergence (FORGE-S25-T18, must be re-applied on every pi-mono sync): * - Local `isDirectory()` helper removed; import from `../lib/shared-fs-utils.js` * instead. Behaviour is identical (returns false on any error). Finding S-3. */ export type AgentScope = "user" | "project" | "both"; export interface AgentConfig { name: string; description: string; tools?: string[]; model?: string; systemPrompt: string; source: "user" | "project"; filePath: string; } export interface AgentDiscoveryResult { agents: AgentConfig[]; projectAgentsDir: string | null; } export declare function discoverAgents(cwd: string, scope: AgentScope): AgentDiscoveryResult; export declare function formatAgentList(agents: AgentConfig[], maxItems: number): { text: string; remaining: number; };