export type ShellSessionDetectionPermission = "shell:session:detect" | "shell:process:read";
export type ShellSessionDetectionBoundary = "input" | "scope" | "permission" | "contract" | "governance" | "provider";
export type ShellSessionKind = "interactive" | "non-interactive" | "unknown";
export type ShellSessionDetectionContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: {
        allowed?: boolean;
        accepted?: boolean;
        reason?: string;
    };
    allowedSessionIds?: readonly string[];
    allowedProcessIds?: readonly number[];
    grantedPermissions?: readonly ShellSessionDetectionPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellSessionDetectionTarget = {
    sessionId?: string;
    processId?: number;
    tty?: string;
    shellExecutable?: string;
    knownInteractive?: boolean;
};
export type ShellSessionDetectionRequest = {
    target?: Partial<ShellSessionDetectionTarget>;
    context?: ShellSessionDetectionContext;
    provider?: ShellSessionDetectionProvider;
};
export type ShellSessionDetectionErrorCode = "MISSING_SESSION_TARGET" | "INVALID_PROCESS_ID" | "INVALID_SESSION_ID" | "INVALID_SHELL_EXECUTABLE" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "REAL_DETECTION_BLOCKED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type ShellSessionDetectionError = {
    code: ShellSessionDetectionErrorCode;
    message: string;
    boundary: ShellSessionDetectionBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type ShellSessionDetectionAuditEvent = {
    type: string;
    toolId: "shell.sessionDetection";
    invocationId: string;
    dryRun: boolean;
    sessionId?: string;
    processId?: number;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellSessionDetectionOutput = {
    kind: "agentCore.basicTool.shell.sessionDetection";
    target: ShellSessionDetectionTarget;
    detected: {
        sessionKind: ShellSessionKind;
        interactive: boolean | "unknown";
        hasTty: boolean;
        shellKind: string;
    };
    permissionsRequired: readonly ShellSessionDetectionPermission[];
    dryRun: boolean;
    executionBlocked: boolean;
    unsafeSideEffects: false;
    detectionEnvelope: {
        operation: "detect-shell-session";
        realProcessReadRequired: boolean;
    };
};
export type ShellSessionDetectionProviderRequest = {
    target: ShellSessionDetectionTarget;
    context?: ShellSessionDetectionContext;
};
export type ShellSessionDetectionProvider = (request: ShellSessionDetectionProviderRequest) => ShellSessionDetectionOutput | Promise<ShellSessionDetectionOutput>;
export type ShellSessionDetectionResult = {
    ok: true;
    toolId: "shell.sessionDetection";
    output: ShellSessionDetectionOutput;
    audit: readonly ShellSessionDetectionAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.sessionDetection";
    error: ShellSessionDetectionError;
    audit: readonly ShellSessionDetectionAuditEvent[];
    events: readonly string[];
};
export declare const shellSessionDetectionDescriptor: {
    readonly toolId: "shell.sessionDetection";
    readonly capability: "detect-shell-session";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.shellDetection";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly permissionsRequired: readonly ["shell:session:detect"];
    readonly unsafeSideEffects: false;
};
export declare function detectShellSession(request?: ShellSessionDetectionRequest): ShellSessionDetectionResult;
export declare function executeShellSessionDetection(request?: ShellSessionDetectionRequest): Promise<ShellSessionDetectionResult>;
