import { AgentHealthProbe, DerivedAgentStatus } from '../../utils/agentStatus'; /** * Minimal shape of an Action needed to reason about which agent it runs on. * `targetAgentId === null` means the action is configured for "any available * agent" (resolved at run time by the backend). */ export interface AgentTargetActionLike { actionType: string; targetAgentId?: string | null; targetPlatformFilter?: string | null; } export interface AgentTargetAgentLike { id: string; name: string; isActive: boolean; platform?: string | null; metadata?: Record | null; } export type AgentTargetMode = 'no-agent' | 'any-available' | 'specific'; export interface AgentTargetResolution { mode: AgentTargetMode; /** The resolved specific agent (mode === 'specific' and it still exists). */ agent?: AgentTargetAgentLike; status?: DerivedAgentStatus; reason?: string | null; /** Specific agent was set but no longer exists in the workspace (deleted). */ missing: boolean; /** Any-available action but zero healthy candidates match. */ noHealthyAgent: boolean; /** Count of healthy candidates (for any-available mode). */ healthyCount: number; /** True when the chosen/auto target is currently healthy enough to run. */ healthy: boolean; } /** * Work out where an action will execute and whether that target is healthy, so * a linking surface (vibe-deck button, scheduler, …) can tell the user the * agent up front and warn — before linking — if it's unhealthy or gone. */ export declare function resolveAgentTarget(action: AgentTargetActionLike, agents: AgentTargetAgentLike[], probesById: Map, probesLoading: boolean): AgentTargetResolution;