import { A2ATask, A2ATaskResult } from "../a2a/types.js";
import { SandboxConfig } from "../types/executionContext.js";
import { AgentConversationHistoryConfig, CredentialStoreRegistry, FullExecutionContext, SubAgentApiSelect } from "@inkeep/agents-core";

//#region src/domains/run/agents/generateTaskHandler.d.ts

/**
 * Serializable configuration for creating task handlers
 */
interface TaskHandlerConfig {
  executionContext: FullExecutionContext;
  subAgentId: string;
  agentSchema: SubAgentApiSelect;
  name: string;
  baseUrl: string;
  apiKey?: string;
  description?: string;
  contextConfigId?: string;
  conversationHistoryConfig?: AgentConversationHistoryConfig;
  sandboxConfig?: SandboxConfig;
  /** User ID for user-scoped credential lookups (available when request is from authenticated user) */
  userId?: string;
}
declare const createTaskHandler: (config: TaskHandlerConfig, credentialStoreRegistry?: CredentialStoreRegistry) => (task: A2ATask) => Promise<A2ATaskResult>;
/**
 * Serializes a TaskHandlerConfig to JSON
 */
declare const serializeTaskHandlerConfig: (config: TaskHandlerConfig) => string;
/**
 * Deserializes a TaskHandlerConfig from JSON
 */
declare const deserializeTaskHandlerConfig: (configJson: string) => TaskHandlerConfig;
/**
 * Creates a task handler configuration from execution context and project data
 */
declare const createTaskHandlerConfig: (params: {
  executionContext: FullExecutionContext;
  subAgentId: string;
  baseUrl: string;
  apiKey?: string;
  sandboxConfig?: SandboxConfig;
}) => Promise<TaskHandlerConfig>;
//#endregion
export { TaskHandlerConfig, createTaskHandler, createTaskHandlerConfig, deserializeTaskHandlerConfig, serializeTaskHandlerConfig };