import { type ApplicationBridgeCandidate, type ApplicationBridgeCapability, type ApplicationBridgeFormat, type ApplicationCompatibilityGate, type ApplicationCompatibilityReport } from "./applicationCompatibilityCheck.js";
export type ApplicationAdapterBoundary = "input" | "contract" | "governance" | "scope" | "compatibility" | "invocation";
export type ApplicationModelMessage = {
    role: "system" | "user" | "assistant" | "tool" | string;
    content: string;
};
export type ApplicationModelInvocationInput = {
    invocationId?: string;
    prompt?: string;
    messages?: readonly ApplicationModelMessage[];
    metadata?: Readonly<Record<string, unknown>>;
};
export type ApplicationModelOutput = {
    kind: "agentCore.modelAdapter.applicationInvocationOutput";
    content: unknown;
    dryRun: boolean;
    providerPayloadCreated: false;
    unsafeSideEffects: false;
};
export type ApplicationModelInvocationErrorCode = "MISSING_INVOCATION_INPUT" | "MISSING_MODEL_INPUT" | "INVOKER_REJECTED";
export type ApplicationModelInvocationError = {
    code: ApplicationModelInvocationErrorCode;
    message: string;
    boundary: "input" | "invocation";
    safeForRuntimeInspection: true;
};
export type ApplicationModelInvocationResult = {
    ok: true;
    invocationId: string;
    output: ApplicationModelOutput;
    events: readonly string[];
} | {
    ok: false;
    error: ApplicationModelInvocationError;
    events: readonly string[];
};
export type ApplicationModelInvoker = (input: ApplicationModelInvocationInput) => ApplicationModelInvocationResult | Promise<ApplicationModelInvocationResult>;
export type ApplicationAdapterRequest = {
    runtimeId?: string;
    adapterId?: string;
    candidate?: ApplicationBridgeCandidate;
    compatibility?: ApplicationCompatibilityReport;
    requiredCapabilityIds?: readonly string[];
    requiredFormatIds?: readonly string[];
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: ApplicationCompatibilityGate;
    governance?: ApplicationCompatibilityGate;
    invoker?: ApplicationModelInvoker;
};
export type ApplicationAdapterErrorCode = "MISSING_RUNTIME_ID" | "MISSING_ADAPTER_ID" | "MISSING_BRIDGE_CANDIDATE" | "RUNTIME_MISMATCH" | "COMPATIBILITY_REJECTED" | "INCOMPATIBLE_BRIDGE_CANDIDATE";
export type ApplicationAdapterError = {
    code: ApplicationAdapterErrorCode;
    message: string;
    boundary: ApplicationAdapterBoundary;
    safeForRuntimeInspection: true;
};
export type ApplicationModelAdapter = {
    kind: "agentCore.modelAdapter.applicationAdapter";
    runtimeId: string;
    adapterId: string;
    candidateId: string;
    readiness: "ready";
    capabilities: readonly ApplicationBridgeCapability[];
    formats: readonly ApplicationBridgeFormat[];
    acceptedScopes: readonly string[];
    providerPayloadCreated: false;
    unsafeSideEffects: false;
    invoke(input?: ApplicationModelInvocationInput): Promise<ApplicationModelInvocationResult>;
};
export type ApplicationAdapterResult = {
    ok: true;
    adapter: ApplicationModelAdapter;
    compatibility: ApplicationCompatibilityReport;
    events: readonly string[];
} | {
    ok: false;
    error: ApplicationAdapterError;
    events: readonly string[];
};
export declare const applicationAdapterDescriptor: {
    readonly capability: "application-adapter";
    readonly route: "agent_modelAdapter.bridgingLayer";
    readonly purpose: "wrap a compatible abstraction-layer model candidate as agentCore's direct internal model capability";
    readonly providerPayloadCreated: false;
    readonly unsafeSideEffects: false;
};
export declare function createApplicationModelAdapter(request?: ApplicationAdapterRequest): ApplicationAdapterResult;
