export type ShellExitCodeCheckingPermission = "shell:observe";
export type ShellExitCodeCheckingBoundary = "input" | "permission" | "contract" | "runtime";
export type ShellExitCodeStatus = "success" | "allowed-failure" | "failed" | "terminated" | "unknown";
export type ShellExitCodeCheckingContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: {
        allowed?: boolean;
        accepted?: boolean;
        reason?: string;
    };
    grantedPermissions?: readonly ShellExitCodeCheckingPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellExitCodeCheckingPolicy = {
    allowedExitCodes?: readonly number[];
    treatSignalAsFailure?: boolean;
};
export type ShellExitCodeCheckingRequest = {
    executionId?: string;
    command?: string;
    exitCode?: number | null;
    signal?: string | null;
    timedOut?: boolean;
    policy?: ShellExitCodeCheckingPolicy;
    context?: ShellExitCodeCheckingContext;
};
export type ShellExitCodeCheckingErrorCode = "MISSING_EXECUTION_ID" | "MISSING_EXIT_OBSERVATION" | "INVALID_EXIT_CODE" | "INVALID_ALLOWED_EXIT_CODE" | "INVALID_SIGNAL" | "INVALID_ARGUMENT" | "PERMISSION_DENIED" | "REAL_EXECUTION_BLOCKED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type ShellExitCodeCheckingError = {
    code: ShellExitCodeCheckingErrorCode;
    message: string;
    boundary: ShellExitCodeCheckingBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type ShellExitCodeCheckingAuditEvent = {
    type: string;
    toolId: "shell.exitCodeChecking";
    invocationId: string;
    dryRun: boolean;
    executionId?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellExitCodeCheckingOutput = {
    kind: "agentCore.basicTool.shell.exitCodeChecking";
    executionId: string;
    command?: string;
    exitCode?: number;
    signal?: string;
    timedOut: boolean;
    status: ShellExitCodeStatus;
    allowedExitCodes: readonly number[];
    reasons: readonly string[];
    requiredPermission: ShellExitCodeCheckingPermission;
    dryRun: boolean;
    providerCalled: boolean;
    executionObservedOnly: true;
    unsafeSideEffects: false;
};
export type ShellExitCodeCheckingResult = {
    ok: true;
    toolId: "shell.exitCodeChecking";
    output: ShellExitCodeCheckingOutput;
    audit: readonly ShellExitCodeCheckingAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.exitCodeChecking";
    error: ShellExitCodeCheckingError;
    audit: readonly ShellExitCodeCheckingAuditEvent[];
    events: readonly string[];
};
export declare const shellExitCodeCheckingDescriptor: {
    readonly toolId: "shell.exitCodeChecking";
    readonly capability: "shell-exit-code-checking";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.executionMonitoring";
    readonly defaultDryRun: true;
    readonly requiredPermission: "shell:observe";
    readonly unsafeSideEffects: false;
};
export type ShellExitCodeCheckingProviderRequest = {
    executionId: string;
    command?: string;
    exitCode?: number | null;
    signal?: string | null;
    timedOut?: boolean;
    policy?: ShellExitCodeCheckingPolicy;
};
export type ShellExitCodeCheckingProviderResult = Partial<Pick<ShellExitCodeCheckingRequest, "command" | "exitCode" | "signal" | "timedOut">>;
export type ShellExitCodeCheckingProvider = (request: ShellExitCodeCheckingProviderRequest, context: ShellExitCodeCheckingContext) => Promise<ShellExitCodeCheckingProviderResult> | ShellExitCodeCheckingProviderResult;
export declare function checkShellExitCode(request?: ShellExitCodeCheckingRequest): ShellExitCodeCheckingResult;
