import type { AgentChatRuntimeApprovalRequestEvent } from "../client/chat/runtime.js"; import { type RemoteAgentCredentialContext } from "./remote-agent-auth.js"; import type { A2AHandler } from "./types.js"; export declare const ANTHROPIC_MANAGED_AGENTS_BETA_HEADER = "managed-agents-2026-04-01"; export declare const ANTHROPIC_MANAGED_AGENTS_API_URL = "https://api.anthropic.com"; export declare const ANTHROPIC_MANAGED_AGENTS_METADATA_KEY = "agent-native/anthropic-managed-agents"; export interface AnthropicManagedAgentContinuation { continuationToken: string; pendingToolUseIds?: string[]; } export interface AnthropicManagedAgentConfirmation { toolUseId: string; result: "allow" | "deny"; denyMessage?: string; } export interface AnthropicManagedAgentApproval { id: string; toolName?: string; input?: unknown; } export type AnthropicManagedAgentRuntimeEvent = AgentChatRuntimeApprovalRequestEvent; export interface AnthropicManagedAgentHandlerOptions { agentId: string; environmentId: string; credentialRef: string; apiBaseUrl?: string; fetch?: typeof fetch; resolveApiKey?: (credentialRef: string, context: RemoteAgentCredentialContext) => Promise; onRuntimeEvent?: (event: AnthropicManagedAgentRuntimeEvent) => void | Promise; requestTimeoutMs?: number; streamConnectTimeoutMs?: number; } export type AnthropicManagedAgentsHandlerOptions = AnthropicManagedAgentHandlerOptions; export type AnthropicManagedAgentEvent = Record; export type AnthropicManagedAgentsErrorCode = "invalid_config" | "credential_missing" | "api_error" | "invalid_response" | "stream_error" | "failed_state" | "approval_required" | "unsupported_action" | "continuation_invalid"; export declare class AnthropicManagedAgentsError extends Error { readonly code: AnthropicManagedAgentsErrorCode; readonly statusCode?: number; constructor(options: { code: AnthropicManagedAgentsErrorCode; message: string; statusCode?: number; cause?: unknown; }); } export declare function createAnthropicManagedAgentsHandler(options: AnthropicManagedAgentHandlerOptions): A2AHandler;