import 'reflect-metadata'; import { type Token } from '@frontmcp/di'; import { type AgentMetadata, type AgentRecord, type AgentType } from '../common'; /** * Check if a value is a class decorated with @Agent. */ export declare function isAgentClass(value: unknown): value is new (...args: unknown[]) => unknown; /** * Check if a value is a function-based agent created with agent(). */ export declare function isAgentFunction(value: unknown): value is (() => void) & { [key: symbol]: unknown; }; /** * Extract metadata from a class decorated with @Agent. */ export declare function extractAgentClassMetadata(cls: Function): AgentMetadata; /** * Extract metadata from a function-based agent. */ export declare function extractAgentFunctionMetadata(fn: (() => void) & { [key: symbol]: unknown; }): AgentMetadata; /** * Normalize an agent type into an AgentRecord. * * Handles: * - Class decorated with @Agent * - Function created with agent() * - Value/Factory objects */ export declare function normalizeAgent(agent: AgentType): AgentRecord; /** * Get dependencies needed for agent discovery. * * Returns the tokens that should be resolved before the agent can be instantiated. */ export declare function agentDiscoveryDeps(record: AgentRecord): Token[]; /** * Generate the tool name for an agent. * Agents are exposed as callable tools with the `invoke_` prefix. * * @param agentId The agent's ID * @returns Tool name in format `invoke_` */ export declare function agentToolName(agentId: string): string; /** * Generate the full name for an agent including owner path. * * @param agentName The agent's name * @param ownerPath Array of owner names (e.g., ['app', 'plugin']) * @returns Full name like 'app.plugin.agent' */ export declare function agentFullName(agentName: string, ownerPath: string[]): string; /** * Validate agent metadata for required fields. */ export declare function validateAgentMetadata(metadata: AgentMetadata): void; /** * Check if an agent is visible to swarm. */ export declare function isAgentVisibleToSwarm(metadata: AgentMetadata): boolean; /** * Check if an agent can see other agents in swarm. */ export declare function canAgentSeeSwarm(metadata: AgentMetadata): boolean; /** * Get the list of visible agent IDs for an agent. * Returns empty array if agent cannot see swarm or has no specific visibility list. */ export declare function getVisibleAgentIds(metadata: AgentMetadata): string[]; //# sourceMappingURL=agent.utils.d.ts.map