/** * Agent-Level Adapter * * Handles conversion between FlowDrop workflows and full Agent Spec Documents * (which wrap a Flow with Agent metadata like tools, LLM config, etc.) */ import type { AgentSpecDocument, AgentSpecTool, AgentSpecLLMConfig } from '../../types/agentspec.js'; import type { StandardWorkflow } from '../WorkflowAdapter.js'; /** * Agent-level configuration that wraps a workflow. * Contains the Agent Spec agent metadata that lives outside the flow. */ export interface AgentConfig { /** Agent name */ name: string; /** Agent description */ description?: string; /** System prompt for the agent */ systemPrompt?: string; /** Tools available to the agent */ tools?: AgentSpecTool[]; /** LLM configuration */ llmConfig?: AgentSpecLLMConfig; } /** * Result of importing an Agent Spec Document. */ export interface AgentSpecImportResult { /** The FlowDrop workflow (from the flow) */ workflow: StandardWorkflow; /** Agent metadata (from the agent, if present) */ agentConfig?: AgentConfig; /** Shared tools declared at document level */ tools?: AgentSpecTool[]; /** Shared LLM configurations declared at document level */ llmConfigs?: AgentSpecLLMConfig[]; } export declare class AgentSpecAgentAdapter { private flowAdapter; constructor(); /** * Convert a FlowDrop workflow + agent config into a full AgentSpecDocument. * * The document wraps the flow with agent metadata (tools, LLM config, system prompt). */ toAgentSpecDocument(workflow: StandardWorkflow, agentConfig?: AgentConfig, tools?: AgentSpecTool[], llmConfigs?: AgentSpecLLMConfig[]): AgentSpecDocument; /** * Import a full AgentSpecDocument, extracting the flow and agent metadata. */ fromAgentSpecDocument(doc: AgentSpecDocument): AgentSpecImportResult; /** * Export a full AgentSpecDocument as JSON string. */ exportJSON(workflow: StandardWorkflow, agentConfig?: AgentConfig, tools?: AgentSpecTool[], llmConfigs?: AgentSpecLLMConfig[]): string; /** * Import from JSON string containing an AgentSpecDocument. */ importJSON(json: string): AgentSpecImportResult; }