import { AFS, type AFSModule } from "@aigne/afs"; import { type ZodType, z } from "zod"; import { Agent, type AgentOptions } from "../agents/agent.js"; import type { ChatModel } from "../agents/chat-model.js"; import type { ImageModel } from "../agents/image-model.js"; import type { AIGNEOptions } from "../aigne/aigne.js"; import type { MemoryAgent, MemoryAgentOptions } from "../memory/memory.js"; import { type PromiseOrValue } from "../utils/type-utils.js"; import { loadAgentFromYamlFile, type NestAgentSchema } from "./agent-yaml.js"; export interface LoadOptions { memories?: { new (parameters?: MemoryAgentOptions): MemoryAgent; }[]; model?: ChatModel | ((model?: z.infer["model"]) => PromiseOrValue); imageModel?: ImageModel | ((model?: z.infer["imageModel"]) => PromiseOrValue); afs?: { sharedAFS?: AFS; availableModules?: { module: string; alias?: string[]; load: (options: { filepath: string; parsed?: object; }) => PromiseOrValue; }[]; }; aigne?: z.infer; require?: (modulePath: string, options: { parent?: string; }) => Promise; } export interface AgentLoadOptions extends LoadOptions { loadNestAgent: (path: string, agent: NestAgentSchema, options: LoadOptions, agentOptions?: AgentOptions & Record) => Promise; } export declare function load(path: string, options?: LoadOptions): Promise; export declare function loadAgent(path: string, options: LoadOptions, agentOptions?: AgentOptions): Promise; export declare function loadNestAgent(path: string, agent: NestAgentSchema, options: LoadOptions, agentOptions?: AgentOptions & Record): Promise; export declare function parseAgent(path: string, agent: Awaited>, options: LoadOptions, agentOptions?: AgentOptions): Promise; type CliAgent = string | { url?: string; name?: string; alias?: string[]; description?: string; agents?: CliAgent[]; }; declare const aigneFileSchema: z.ZodObject<{ name: ZodType; description: ZodType; model: ZodType; temperature: ZodType; topP: ZodType; frequencyPenalty: ZodType; presencePenalty: ZodType; thinkingEffort: ZodType; }, z.ZodTypeAny, "passthrough"> | undefined, z.ZodTypeDef, z.objectInputType<{ model: ZodType; temperature: ZodType; topP: ZodType; frequencyPenalty: ZodType; presencePenalty: ZodType; thinkingEffort: ZodType; }, z.ZodTypeAny, "passthrough"> | undefined>; imageModel: ZodType; }, z.ZodTypeAny, "passthrough"> | undefined, z.ZodTypeDef, z.objectInputType<{ model: ZodType; }, z.ZodTypeAny, "passthrough"> | undefined>; agents: ZodType; skills: ZodType; mcpServer: ZodType<{ agents?: string[] | undefined; } | undefined, z.ZodTypeDef, { agents?: string[] | undefined; } | undefined>; cli: ZodType<{ agents?: CliAgent[] | undefined; chat?: string | undefined; } | undefined, z.ZodTypeDef, { agents?: CliAgent[] | undefined; chat?: string | undefined; } | undefined>; }, "strip", z.ZodTypeAny, { model?: z.objectInputType<{ model: ZodType; temperature: ZodType; topP: ZodType; frequencyPenalty: ZodType; presencePenalty: ZodType; thinkingEffort: ZodType; }, z.ZodTypeAny, "passthrough"> | undefined; name?: string | undefined; description?: string | undefined; imageModel?: z.objectInputType<{ model: ZodType; }, z.ZodTypeAny, "passthrough"> | undefined; skills?: string[] | undefined; agents?: string[] | undefined; mcpServer?: { agents?: string[] | undefined; } | undefined; cli?: { agents?: CliAgent[] | undefined; chat?: string | undefined; } | undefined; }, { model?: z.objectInputType<{ model: ZodType; temperature: ZodType; topP: ZodType; frequencyPenalty: ZodType; presencePenalty: ZodType; thinkingEffort: ZodType; }, z.ZodTypeAny, "passthrough"> | undefined; name?: string | undefined; description?: string | undefined; imageModel?: z.objectInputType<{ model: ZodType; }, z.ZodTypeAny, "passthrough"> | undefined; skills?: string[] | undefined; agents?: string[] | undefined; mcpServer?: { agents?: string[] | undefined; } | undefined; cli?: { agents?: CliAgent[] | undefined; chat?: string | undefined; } | undefined; }>; export declare function loadAIGNEFile(path: string): Promise<{ aigne: z.infer; rootDir: string; }>; export declare function findAIGNEFile(path: string): Promise; export {};