export type ShellInvocationEventPhase = "planned" | "started" | "completed" | "failed";
export type ShellInvocationEventBoundary = "input" | "contract" | "governance" | "runtime-state" | "scope";
export type ShellInvocationEventErrorCode = "MISSING_RUNTIME_ID" | "MISSING_SESSION_ID" | "MISSING_INVOCATION_ID" | "MISSING_COMMAND" | "RUNTIME_NOT_READY" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "REAL_EXECUTION_BLOCKED";
export type ShellInvocationEventGate = {
    accepted: boolean;
    reason?: string;
};
export type ShellInvocationEventTrace = {
    correlationId?: string;
    callerId?: string;
    sessionId?: string;
};
export type ShellInvocationEventRequest = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    command?: string;
    cwd?: string;
    phase?: ShellInvocationEventPhase;
    runtimeReady?: boolean;
    dryRun?: boolean;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: ShellInvocationEventGate;
    governance?: ShellInvocationEventGate;
    trace?: ShellInvocationEventTrace;
    observedAt?: string;
};
export type ShellInvocationEvent = {
    kind: "basicTool.shell.invocation";
    tool: "shell";
    eventId: string;
    runtimeId: string;
    sessionId: string;
    invocationId: string;
    command: string;
    cwd?: string;
    phase: ShellInvocationEventPhase;
    requestedScopes: readonly string[];
    grantedScopes: readonly string[];
    deniedScopes: readonly string[];
    trace: ShellInvocationEventTrace;
    observedAt: string;
    dryRun: true;
    shellExecutionPlanned: false;
    unsafeSideEffects: false;
};
export type ShellInvocationEventError = {
    code: ShellInvocationEventErrorCode;
    message: string;
    boundary: ShellInvocationEventBoundary;
    publicSafe: true;
};
export type ShellInvocationEventResult = {
    ok: true;
    event: ShellInvocationEvent;
    events: readonly string[];
} | {
    ok: false;
    error: ShellInvocationEventError;
    events: readonly string[];
};
export declare function exposeShellInvocationEvent(request?: ShellInvocationEventRequest): ShellInvocationEventResult;
