import { type Server } from "node:http";
export type JsonSchema = Record<string, unknown>;
export type AgentDslLanguage = "typescript" | "javascript";
export type AuthStrategy = "public" | "api_key" | "platform_user" | "jwt" | "custom";
export type AgentIdentity = {
    name: string;
    description: string;
    version?: string;
};
export type AgentDslAuth = {
    model: string;
    strategy: AuthStrategy;
    principal_schema: JsonSchema;
    resolver?: string | null;
    required: boolean;
};
export type SkillPolicy = {
    timeout_seconds?: number | null;
    idempotent?: boolean;
    max_retries?: number;
    cost_class?: string | null;
    allow_scope_expansion?: boolean;
    grant_mode?: string | null;
    grant_allow_patterns?: string[];
    grant_deny_patterns?: string[];
    grant_outputs_prefix?: string | null;
    grant_write_prefixes?: string[];
    grant_ttl_seconds?: number | null;
    grant_run_timeout_seconds?: number | null;
    grant_approval_timeout_seconds?: number | null;
    grant_scope_approval_timeout_seconds?: number | null;
};
export type SkillDeclaration = {
    name: string;
    description?: string;
    handler?: string;
    tags?: string[];
    scopes?: string[];
    stream?: boolean;
    policy?: SkillPolicy;
    input_schema: JsonSchema;
    output_schema: JsonSchema;
};
export type AgentRuntime = {
    lifecycle?: "ephemeral" | "session" | "warm";
    state?: "none" | "session" | "durable";
    sandbox?: "microsandbox";
    resources?: {
        cpu?: string;
        memory?: string;
        gpu?: number;
        max_runtime_seconds?: number;
    };
    concurrency?: number;
    egress?: {
        allow_hosts?: string[];
        allow_internal_services?: string[];
        deny_internet_by_default?: boolean;
    };
    tools_used?: string[];
    llm_provisioning?: "platform" | "platform_or_caller_provided" | "caller_provided" | "agent_byok";
    pricing?: {
        price_per_call_usd?: number;
        caller_pays_llm?: boolean;
        notes?: string;
    };
    wants_cp_jwt?: boolean;
};
export type AgentDslEntrypoint = {
    module?: string | null;
    class_name?: string | null;
    function?: string | null;
    command?: string[];
};
export type AgentDslSkill = Required<Pick<SkillDeclaration, "name" | "input_schema" | "output_schema">> & {
    description: string;
    handler: string;
    tags: string[];
    scopes: string[];
    stream: boolean;
    policy: Required<SkillPolicy>;
};
export type AgentDsl = {
    schema_version: "2026-06-04";
    language: AgentDslLanguage;
    name: string;
    description: string;
    version: string;
    entrypoint: AgentDslEntrypoint;
    skills: AgentDslSkill[];
    capabilities: Record<string, unknown>;
    input_modes: string[];
    output_modes: string[];
    required_secrets: string[];
    required_env: string[];
    consumer_setup: {
        fields: unknown[];
    };
    runtime: AgentRuntime;
    template_lineage?: unknown | null;
    meta_agent_manifest?: unknown | null;
    state_schema?: JsonSchema | null;
    workspace_access: Record<string, unknown>;
    config_schema?: JsonSchema | null;
    auth: AgentDslAuth;
    metadata: Record<string, unknown>;
};
export type AgentClass<T extends A2AAgent = A2AAgent> = {
    new (): T;
    agent: AgentIdentity;
    auth: AgentDslAuth;
    skills: SkillDeclaration[];
    capabilities: Record<string, unknown>;
    inputModes: string[];
    outputModes: string[];
    requiredSecrets: string[];
    requiredEnv: string[];
    consumerSetup: {
        fields: unknown[];
    };
    runtime: AgentRuntime;
    workspaceAccess: Record<string, unknown>;
    configSchema: JsonSchema | null;
    stateSchema: JsonSchema | null;
    templateLineage: unknown | null;
    metaAgentManifest: unknown | null;
};
export declare abstract class A2AAgent {
    static agent: AgentIdentity;
    static auth: AgentDslAuth;
    static skills: SkillDeclaration[];
    static capabilities: Record<string, unknown>;
    static inputModes: string[];
    static outputModes: string[];
    static requiredSecrets: string[];
    static requiredEnv: string[];
    static consumerSetup: {
        fields: unknown[];
    };
    static runtime: AgentRuntime;
    static workspaceAccess: Record<string, unknown>;
    static configSchema: JsonSchema | null;
    static stateSchema: JsonSchema | null;
    static templateLineage: unknown | null;
    static metaAgentManifest: unknown | null;
    dispatch(request: WorkerRequest): Promise<WorkerResponse>;
}
export type WorkerRequest = {
    agent: string;
    skill: string;
    handler: string;
    arguments: Record<string, unknown>;
    grant?: string | null;
    llm_creds?: Record<string, unknown> | null;
    composition?: Record<string, unknown> | null;
    consumer_config?: Record<string, unknown> | null;
    consumer_secrets?: Record<string, string> | null;
    cp_jwt?: string | null;
    cp_url?: string | null;
    auth?: Record<string, unknown> | null;
};
export type WorkerResponse = {
    result: unknown;
    events?: Record<string, unknown>[];
    artifacts?: Record<string, unknown>[];
};
export type Handler = (request: WorkerRequest) => WorkerResponse | Promise<WorkerResponse>;
export declare function publicAuth(): AgentDslAuth;
export declare function skill(declaration: SkillDeclaration): SkillDeclaration;
export declare function compileAgent(agentClass: AgentClass, options?: {
    language?: AgentDslLanguage;
    entrypoint?: AgentDslEntrypoint;
    metadata?: Record<string, unknown>;
}): AgentDsl;
export declare function writeAgentDsl(agentClass: AgentClass, path?: string, options?: Parameters<typeof compileAgent>[1]): Promise<AgentDsl>;
export declare function serveWorker(agentClass: AgentClass, handlers: Record<string, Handler>, options?: {
    port?: number;
    host?: string;
}): Server;
export declare function serveAgent(agentClass: AgentClass, options?: {
    port?: number;
    host?: string;
}): Server;
//# sourceMappingURL=index.d.ts.map