export type InvocationEnvelopeKind = "agent" | "interface" | "batch" | "tool" | "model" | "stream";
export type InvocationEnvelopeSource = "application" | "official-module" | "runtime-surface" | "inspection" | "debug";
export type InvocationEnvelopeErrorCode = "MISSING_RUNTIME_ID" | "MISSING_TARGET_ID" | "MISSING_INVOCATION_KIND" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED";
export type InvocationEnvelopeError = {
    code: InvocationEnvelopeErrorCode;
    message: string;
    boundary: "input" | "runtime-state" | "contract" | "governance" | "scope";
};
export type InvocationEnvelopeGate = {
    accepted: boolean;
    reason?: string;
};
export type InvocationEnvelopeTrace = {
    correlationId?: string;
    callerId?: string;
    sessionId?: string;
};
export type InvocationEnvelopeRequest = {
    runtimeId: string;
    targetId: string;
    invocationKind: InvocationEnvelopeKind;
    source: InvocationEnvelopeSource;
    payload?: unknown;
    runtimeReady?: boolean;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: InvocationEnvelopeGate;
    governance?: InvocationEnvelopeGate;
    trace?: InvocationEnvelopeTrace;
};
export type InvocationEnvelope = {
    envelopeId: string;
    runtimeId: string;
    targetId: string;
    invocationKind: InvocationEnvelopeKind;
    source: InvocationEnvelopeSource;
    requestedScopes: readonly string[];
    grantedScopes: readonly string[];
    deniedScopes: readonly string[];
    trace: InvocationEnvelopeTrace;
    payload?: unknown;
    accepted: true;
    dryRun: true;
    unsafeSideEffects: false;
};
export type InvocationEnvelopeResult = {
    ok: true;
    envelope: InvocationEnvelope;
    events: readonly string[];
} | {
    ok: false;
    error: InvocationEnvelopeError;
    events: readonly string[];
};
export declare function createInvocationEnvelope(request: InvocationEnvelopeRequest): InvocationEnvelopeResult;
