export type ShellOutputCapturePermission = "shell:output:capture";
export type ShellOutputCaptureBoundary = "input" | "permission" | "scope" | "resource" | "contract";
export type ShellOutputStream = "stdout" | "stderr" | "combined";
export type ShellOutputCaptureContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    grantedPermissions?: readonly ShellOutputCapturePermission[];
    allowedSessionIds?: readonly string[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellOutputChunk = {
    stream: ShellOutputStream;
    text: string;
    receivedAtMs?: number;
};
export type ShellOutputCaptureTarget = {
    sessionId: string;
    streams?: readonly ShellOutputStream[];
    maxBytes?: number;
    chunks?: readonly ShellOutputChunk[];
    redactionPatterns?: readonly string[];
};
export type ShellOutputCaptureRequest = {
    target?: Partial<ShellOutputCaptureTarget>;
    context?: ShellOutputCaptureContext;
};
export type ShellOutputCaptureErrorCode = "MISSING_SESSION_ID" | "INVALID_STREAM" | "INVALID_CHUNK" | "INVALID_MAX_BYTES" | "INVALID_REDACTION_PATTERN" | "PERMISSION_DENIED" | "SCOPE_REJECTED" | "REAL_CAPTURE_BLOCKED";
export type ShellOutputCaptureError = {
    code: ShellOutputCaptureErrorCode;
    message: string;
    boundary: ShellOutputCaptureBoundary;
    publicSafe: true;
    internalDetailExposed: false;
};
export type ShellOutputCaptureAuditEvent = {
    type: string;
    toolId: "shell.outputCapture";
    invocationId: string;
    dryRun: boolean;
    sessionId?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellCapturedOutputChunk = {
    stream: ShellOutputStream;
    text: string;
    bytes: number;
    receivedAtMs?: number;
};
export type ShellOutputCaptureOutput = {
    kind: "agentCore.basicTool.shell.outputCapture";
    sessionId: string;
    streams: readonly ShellOutputStream[];
    chunks: readonly ShellCapturedOutputChunk[];
    totalBytes: number;
    truncated: boolean;
    requiredPermission: ShellOutputCapturePermission;
    dryRun: boolean;
    realBufferReadBlocked: boolean;
    unsafeSideEffects: false;
};
export type ShellOutputCaptureResult = {
    ok: true;
    toolId: "shell.outputCapture";
    output: ShellOutputCaptureOutput;
    audit: readonly ShellOutputCaptureAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.outputCapture";
    error: ShellOutputCaptureError;
    audit: readonly ShellOutputCaptureAuditEvent[];
    events: readonly string[];
};
export declare const shellOutputCaptureDescriptor: {
    readonly toolId: "shell.outputCapture";
    readonly capability: "shell-output-capture";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.shellInteraction";
    readonly defaultDryRun: true;
    readonly defaultStreams: readonly ["stdout", "stderr"];
    readonly defaultMaxBytes: 64000;
    readonly requiredPermission: "shell:output:capture";
    readonly tapOwnsApproval: true;
    readonly unsafeSideEffects: false;
};
export declare function captureShellOutput(request?: ShellOutputCaptureRequest): ShellOutputCaptureResult;
