/** * output-handler.ts — Entry point for the /agents command. * * All UI logic lives in focused modules under src/ui/: * agent-dashboard.ts — rich TUI dashboard * agent-file-helpers.ts — findAgentFile, getModelLabel * agent-viewer.ts — viewAgentConversation launcher * agent-list-views.ts — showAllAgentsList, showRunningAgents * agent-detail.ts — showAgentDetail, showAgentPermissions * agent-actions.ts — ejectAgent, disableAgent, enableAgent * agent-wizards.ts — showCreateWizard, showGenerateWizard, showManualWizard * settings-snapshot.ts — buildSettingsSnapshot * settings-menu.ts — showSettings, notifyApplied */ import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent"; import type { AgentManager } from "./agent-manager.js"; import type { SubagentScheduler } from "./schedule.js"; import type { SettingsGetters, SettingsSetters } from "./settings.js"; import { type SwarmCoordinator } from "./swarm-join.js"; import type { AgentActivity } from "./ui/agent-ui-types.js"; /** Dependencies injected into the agents menu so callers don't pass 11 positional args. */ export interface AgentsMenuDeps { pi: ExtensionAPI; manager: AgentManager; scheduler: SubagentScheduler; agentActivity: Map; /** * Optional swarm coordinator — present when the swarm peer is wired in * (default for `index.ts`). The health check uses it to surface swarm * counts + delivery totals; the rest of the menu ignores it. Absent * (e.g. in unit tests that build a minimal `AgentsMenuDeps`) the * health report marks the swarm section as "not configured". */ swarmJoin?: SwarmCoordinator | null; /** * Read-side accessors for the settings that the /agents menu can change * (default max turns, grace turns, join mode, scheduling, tracing). * Bundled to stop the 14-positional-arg spiral on `showSettings` — when * a new menu-editable setting is added, update `SettingsGetters` and * `SettingsSetters` in `settings.ts` and the call site in * `commands/agents.ts`; no other signatures need to change. */ settingsGetters: SettingsGetters; /** Write-side counterpart of `settingsGetters`. */ settingsSetters: SettingsSetters; } /** * Display the main agents menu with options for dashboard, agent types, scheduling, and settings. */ export declare function showAgentsMenu(ctx: ExtensionCommandContext, deps: AgentsMenuDeps): Promise;