/**
 * Transform: createAgent() → plain exported functions
 *
 * v3 is an "eject" — the createAgent() wrapper, ctx.* service magic, thread
 * state, sessions and evals are all replaced by user-visible primitives.
 *
 * For "simple" agents (handler + optional schema only), we:
 *   1. Remove the createAgent() wrapper
 *   2. Extract the handler as a named exported async function
 *   3. Preserve schema validation if present
 *   4. Replace ctx.* service access with imports from the services module
 *
 * For "complex" agents (setup/shutdown/onEvent/ctx.config), we additionally:
 *   5. Hoist setup() return values into module-level lazy-init singletons
 *      so the handler body still compiles after the ctx.config.* → direct
 *      reference rewrite.
 *   6. Replace ctx.thread.*, ctx.sessionId, ctx.app.* with TODO comments —
 *      these concepts are gone in v3.
 *
 * We use a combination of regex and AST analysis — regex for the mechanical
 * transforms (preserving formatting), AST for detection (already done in detect-v3).
 */
import type { AgentFile } from '../../detect-v3';
export interface AgentTransformResult {
    /** The transformed source, or null if skipped */
    source: string | null;
    /** What was changed */
    changes: string[];
    /** If the agent is too complex for auto-migration */
    manualRequired?: boolean;
}
/**
 * Service access patterns to rewrite.
 * Maps ctx.serviceName → serviceName (import from services module).
 */
/**
 * Transform a simple agent file into a plain exported function.
 */
export declare function transformAgentFile(source: string, agentInfo: AgentFile, servicesRelativePath: string): AgentTransformResult;
//# sourceMappingURL=agents.d.ts.map