import { StreamHelper } from "../stream/stream-helpers.js";
import { AgentMcpManager } from "./services/AgentMcpManager.js";
import { AgentConfig, AgentRunContext, DelegateRelation, ExternalAgentRelationConfig, PendingDurableApproval, ResolvedGenerationResponse, TeamAgentRelationConfig, ToolType, hasToolCallWithPrefix, resolveGenerationResponse } from "./agent-types.js";
import { CredentialStoreRegistry, FullExecutionContext, Part } from "@inkeep/agents-core";
import { ToolSet } from "ai";

//#region src/domains/run/agents/Agent.d.ts
declare class Agent {
  private ctx;
  constructor(config: AgentConfig, executionContext: FullExecutionContext, credentialStoreRegistry?: CredentialStoreRegistry);
  get streamRequestId(): string | undefined;
  set streamRequestId(value: string | undefined);
  get mcpManager(): AgentMcpManager | undefined;
  setConversationId(conversationId: string): void;
  setDelegationStatus(isDelegated: boolean): void;
  setDelegationId(delegationId: string | undefined): void;
  setDurableWorkflowRunId(runId: string | undefined): void;
  setApprovedToolCalls(approvedToolCalls: Record<string, Array<{
    approved: boolean;
    reason?: string;
    originalToolCallId?: string;
  }>> | undefined): void;
  getPendingDurableApproval(): PendingDurableApproval | undefined;
  getTaskDenialRedirects(): Array<{
    toolName: string;
    toolCallId: string;
    reason: string;
  }>;
  getStreamingHelper(): StreamHelper | undefined;
  getFunctionTools(sessionId?: string, streamRequestId?: string): Promise<ToolSet>;
  get runContext(): AgentRunContext;
  generate(userParts: Part[], runtimeContext?: {
    contextId: string;
    metadata: {
      conversationId: string;
      threadId: string;
      taskId: string;
      streamRequestId: string;
      apiKey?: string;
    };
  }, options?: {
    schemaOnlyTools?: boolean;
  }): Promise<ResolvedGenerationResponse>;
  getRelationTools(runtimeContext?: {
    contextId: string;
    metadata: {
      conversationId: string;
      threadId: string;
      streamRequestId?: string;
      streamBaseUrl?: string;
      apiKey?: string;
      baseUrl?: string;
    };
  }, sessionId?: string): Record<string, any>;
  cleanupCompression(): void;
  cleanup(): Promise<void>;
}
//#endregion
export { Agent, type AgentConfig, type AgentRunContext, type DelegateRelation, type ExternalAgentRelationConfig, type PendingDurableApproval, type ResolvedGenerationResponse, type TeamAgentRelationConfig, type ToolType, hasToolCallWithPrefix, resolveGenerationResponse };