"""a2a-pack — developer SDK + CLI for the a2a cloud platform.

See https://docs.a2acloud.io for the full reference.
"""

# Single source of truth — pyproject.toml reads this via hatch.version.
__version__ = "0.1.59"

from .a2a_client import (
    A2AClient,
    CallResult,
    HttpA2AClient,
    InMemoryA2AClient,
)
from .agent import (
    A2AAgent,
    ParamSpec,
    SkillInputError,
    SkillInvocationError,
    SkillNotFound,
    SkillSpec,
    skill,
)
from .discovery import (
    ControlPlaneDiscovery,
    DiscoveredAgent,
    DiscoveryClient,
    InMemoryDiscovery,
)
from .dsl import (
    AGENT_DSL_SCHEMA_VERSION,
    AgentDsl,
    AgentDslAuth,
    AgentDslEntrypoint,
    AgentDslAuthStrategy,
    AgentDslLanguage,
    AgentDslSkill,
    compile_agent_to_dsl,
)
from .dag import (
    MAX_DAG_NODES,
    MAX_PARALLEL_NODES,
    DagLimits,
    DagNode,
    context_node_caller,
    execute_dag,
    execute_dag_nodes,
    node_wire,
    parse_dag,
    plan_dag,
    render_args,
    resolve_path,
    summarize_result,
    topological_rounds,
    validate_dag_nodes,
)
from .deepagents import WorkspaceBackend, WorkspaceDeepAgentsBackend
from .gitea_backend import GiteaAuthError, GiteaBackend, GiteaError
from .consumer_setup import ConsumerSetup, ConsumerSetupField
from .composition import (
    CompositionBudget,
    CompositionLimitExceeded,
    DEFAULT_MAX_COMPOSITION_CALLS,
    DEFAULT_MAX_COMPOSITION_DEPTH,
)
from .grants import (
    DEFAULT_MAX_DELEGATION_DEPTH,
    Grant,
    GrantDelegationDenied,
    GrantInvalid,
    delegate_grant,
    mint_grant,
    sign_grant,
    verify_grant,
)
from .receipts import (
    ExecutionReceipt,
    FileOps as ReceiptFileOps,
    Handoff as ReceiptHandoff,
    ReceiptInvalid,
    ToolCall as ReceiptToolCall,
    hash_input,
    seal_receipt,
    sign_receipt,
    verify_receipt,
)
from .replay import (
    EVENT_KINDS,
    EventRecorder,
    ReplayEvent,
    ReplayInvalid,
    ReplaySession,
    filter_events,
    iter_events,
    seal_replay_session,
    sign_replay_session,
    verify_replay_session,
)
from .replay_doubles import (
    ReplayDivergence,
    ReplayLLM,
    ReplayToolCaller,
    ReplayWorkspaceClient,
    replay_session,
)
from .frontend import (
    FrontendConfig,
    PackedFrontend,
    frontend_config_payload,
    load_frontend_config,
    mount_packed_frontend,
    resolve_packed_frontend,
)
from .mcp import (
    MCP_PROTOCOL_VERSION,
    MCPServer,
    build_http_app as build_mcp_http_app,
    mount_connector_http,
    mount_http as mount_mcp_http,
    skills_to_tools,
)
from .memory import (
    ControlPlaneMemoryClient,
    MemoryClient,
    MemoryLogEntry,
    MemoryRecord,
    memory_tools,
)
from .meta_runs import MetaAgentRunRecord, MetaAgentRunsClient, MetaRunPlan, MetaRunPlanNode
from .protocol_simulations import (
    ProtocolRegistryRecord,
    ProtocolRuntimeReadinessRecord,
    ProtocolScenarioRecord,
    ProtocolSimulationRecord,
    ProtocolSimulationsClient,
)
from .meta_engine import MetaDagPlanner, run_meta_agent_goal
from .meta_agent import (
    MetaAgent,
    MetaAgentPlannerError,
    MetaPlannerLLM,
    ResolvedSubAgent,
    build_manifest_dag_planner,
    build_meta_planner_messages,
    call_meta_planner_llm,
    parse_meta_planner_response,
    resolve_manifest_subagents,
    sanitize_meta_dag,
)
from .auth import (
    APIKeyAuth,
    APIKeyAuthResolver,
    AuthError,
    AuthResolver,
    JWTAuth,
    NoAuth,
    NoAuthResolver,
    OIDCUserInfoAuthResolver,
    PlatformUserAuth,
    PlatformUserAuthResolver,
    RemoteBearerAuthResolver,
    StaticAuthResolver,
)
from .card import AgentCard, SkillCard
from .context import (
    AgentEvent,
    ArtifactRef,
    CancelledByCaller,
    ConsumerSetupMissing,
    LLMCreds,
    LocalRunContext,
    MissingScopes,
    RunContext,
)
from .runtime import (
    AgentRuntime,
    AgentComposition,
    AgentGoal,
    AgentMemory,
    CompositionSubAgent,
    EgressPolicy,
    Lifecycle,
    LLMProvisioning,
    MetaAgentManifest,
    Pricing,
    Resources,
    Sandbox,
    SkillPolicy,
    State,
    TemplateLineage,
    TemplateUpdatePolicy,
    apply_project_manifest,
)
from .sandbox import (
    ExecResult,
    HttpSandboxClient,
    HttpSandboxHandle,
    SandboxClient,
    SandboxHandle,
    SandboxSpec,
    SandboxRuntimeError,
    SandboxUnavailable,
)
from .sidecar import (
    HttpSidecarWorker,
    SidecarInvokeIn,
    SidecarWorkerRequest,
    SidecarWorkerResponse,
    build_sidecar_app,
    load_agent_dsl,
    serve_sidecar,
)
from .subagents import SubAgentToolkit, subagent_tools
from .workspace import (
    FileMatch,
    FileType,
    FileSystemWorkspaceClient,
    LocalWorkspaceClient,
    LocalWorkspaceView,
    MinIOWorkspaceClient,
    MinIOWorkspaceView,
    WorkspaceAccess,
    WorkspaceClient,
    WorkspaceDenied,
    WorkspaceGrant,
    WorkspaceMode,
    WorkspacePatch,
    WorkspaceView,
)

__all__ = [
    "A2AAgent",
    "A2AClient",
    "AGENT_DSL_SCHEMA_VERSION",
    "APIKeyAuth",
    "APIKeyAuthResolver",
    "AgentCard",
    "AgentDsl",
    "AgentDslAuth",
    "AgentDslAuthStrategy",
    "AgentDslEntrypoint",
    "AgentDslLanguage",
    "AgentDslSkill",
    "AgentComposition",
    "AgentEvent",
    "AgentGoal",
    "AgentMemory",
    "AgentRuntime",
    "ArtifactRef",
    "AuthError",
    "AuthResolver",
    "CallResult",
    "CancelledByCaller",
    "ConsumerSetup",
    "ConsumerSetupField",
    "ConsumerSetupMissing",
    "ControlPlaneDiscovery",
    "ControlPlaneMemoryClient",
    "CompositionSubAgent",
    "CompositionBudget",
    "CompositionLimitExceeded",
    "DagLimits",
    "DagNode",
    "DiscoveredAgent",
    "DiscoveryClient",
    "EgressPolicy",
    "ExecResult",
    "FileMatch",
    "FileSystemWorkspaceClient",
    "FileType",
    "FrontendConfig",
    "GiteaBackend",
    "GiteaAuthError",
    "GiteaError",
    "EVENT_KINDS",
    "EventRecorder",
    "ExecutionReceipt",
    "Grant",
    "GrantDelegationDenied",
    "GrantInvalid",
    "DEFAULT_MAX_DELEGATION_DEPTH",
    "DEFAULT_MAX_COMPOSITION_CALLS",
    "DEFAULT_MAX_COMPOSITION_DEPTH",
    "ReceiptFileOps",
    "ReceiptHandoff",
    "ReceiptInvalid",
    "ReceiptToolCall",
    "ReplayDivergence",
    "ReplayEvent",
    "ReplayInvalid",
    "ReplayLLM",
    "ReplaySession",
    "ReplayToolCaller",
    "ReplayWorkspaceClient",
    "replay_session",
    "filter_events",
    "hash_input",
    "delegate_grant",
    "iter_events",
    "seal_receipt",
    "seal_replay_session",
    "sign_receipt",
    "sign_replay_session",
    "verify_receipt",
    "verify_replay_session",
    "HttpA2AClient",
    "HttpSandboxClient",
    "HttpSandboxHandle",
    "HttpSidecarWorker",
    "InMemoryA2AClient",
    "InMemoryDiscovery",
    "JWTAuth",
    "LLMCreds",
    "LLMProvisioning",
    "Lifecycle",
    "LocalRunContext",
    "MAX_DAG_NODES",
    "MAX_PARALLEL_NODES",
    "MCP_PROTOCOL_VERSION",
    "MCPServer",
    "MetaAgent",
    "MetaAgentManifest",
    "MetaAgentPlannerError",
    "build_mcp_http_app",
    "mount_connector_http",
    "mount_mcp_http",
    "skills_to_tools",
    "LocalWorkspaceClient",
    "LocalWorkspaceView",
    "MinIOWorkspaceClient",
    "MinIOWorkspaceView",
    "MissingScopes",
    "MemoryClient",
    "MemoryLogEntry",
    "MemoryRecord",
    "MetaAgentRunRecord",
    "MetaAgentRunsClient",
    "MetaRunPlan",
    "MetaRunPlanNode",
    "ProtocolRegistryRecord",
    "ProtocolRuntimeReadinessRecord",
    "ProtocolScenarioRecord",
    "ProtocolSimulationRecord",
    "ProtocolSimulationsClient",
    "MetaDagPlanner",
    "MetaPlannerLLM",
    "NoAuth",
    "NoAuthResolver",
    "OIDCUserInfoAuthResolver",
    "ParamSpec",
    "PlatformUserAuth",
    "PlatformUserAuthResolver",
    "Pricing",
    "PackedFrontend",
    "Resources",
    "ResolvedSubAgent",
    "RemoteBearerAuthResolver",
    "RunContext",
    "Sandbox",
    "mint_grant",
    "sign_grant",
    "verify_grant",
    "SandboxClient",
    "SandboxHandle",
    "SandboxSpec",
    "SandboxRuntimeError",
    "SandboxUnavailable",
    "SidecarInvokeIn",
    "SidecarWorkerRequest",
    "SidecarWorkerResponse",
    "SkillCard",
    "SkillInputError",
    "SkillInvocationError",
    "SkillNotFound",
    "SkillPolicy",
    "SkillSpec",
    "State",
    "StaticAuthResolver",
    "SubAgentToolkit",
    "TemplateLineage",
    "TemplateUpdatePolicy",
    "WorkspaceAccess",
    "WorkspaceBackend",
    "WorkspaceClient",
    "WorkspaceDenied",
    "WorkspaceDeepAgentsBackend",
    "WorkspaceGrant",
    "WorkspaceMode",
    "WorkspacePatch",
    "WorkspaceView",
    "apply_project_manifest",
    "build_manifest_dag_planner",
    "build_meta_planner_messages",
    "build_sidecar_app",
    "compile_agent_to_dsl",
    "call_meta_planner_llm",
    "context_node_caller",
    "execute_dag",
    "execute_dag_nodes",
    "frontend_config_payload",
    "load_frontend_config",
    "load_agent_dsl",
    "memory_tools",
    "mount_packed_frontend",
    "node_wire",
    "parse_dag",
    "parse_meta_planner_response",
    "plan_dag",
    "render_args",
    "resolve_packed_frontend",
    "resolve_manifest_subagents",
    "resolve_path",
    "run_meta_agent_goal",
    "sanitize_meta_dag",
    "serve_sidecar",
    "skill",
    "subagent_tools",
    "summarize_result",
    "topological_rounds",
    "validate_dag_nodes",
]
