export type ShellTypeKind = "bash" | "zsh" | "fish" | "powershell" | "cmd" | "sh" | "unknown";
export type ShellTypeDetectionBoundary = "input" | "contract" | "governance" | "scope" | "permission" | "provider";
export type ShellTypeDetectionGate = {
    accepted?: boolean;
    allowed?: boolean;
    reason?: string;
};
export type ShellTypeDetectionContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: ShellTypeDetectionGate;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellTypeDetectionRequest = {
    context?: ShellTypeDetectionContext;
    shellPath?: string;
    executableName?: string;
    envShell?: string;
    platform?: string;
    provider?: ShellTypeDetectionProvider;
    metadata?: Readonly<Record<string, unknown>>;
};
export type ShellTypeDetectionErrorCode = "MISSING_RUNTIME_ID" | "MISSING_SHELL_HINT" | "INVALID_SHELL_HINT" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "REAL_SHELL_PROBE_NOT_ALLOWED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type ShellTypeDetectionError = {
    code: ShellTypeDetectionErrorCode;
    message: string;
    boundary: ShellTypeDetectionBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type ShellTypeDetectionReport = {
    toolId: "shell.typeDetection";
    capability: "detect-shell-type";
    runtimeId: string;
    invocationId: string;
    detectedType: ShellTypeKind;
    confidence: "high" | "medium" | "low";
    normalizedShellName: string;
    source: "shellPath" | "executableName" | "envShell";
    platform?: string;
    requiredPermissions: readonly ("shell:detect:dry-run" | "shell:detect")[];
    requiresTapApproval: true;
    dispatch: "dry-run" | "provider";
    dryRun: boolean;
    unsafeSideEffects: false;
    acceptedScopes: readonly string[];
    audit: {
        event: "basicTool.shell.typeDetection.detected";
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type ShellTypeDetectionOutput = ShellTypeDetectionReport;
export type ShellTypeDetectionAuditEvent = {
    type: string;
    toolId: "shell.typeDetection";
    invocationId: string;
    dryRun: boolean;
    metadata?: Readonly<Record<string, unknown>>;
};
export type ShellTypeDetectionProviderRequest = {
    shellPath?: string;
    executableName?: string;
    envShell?: string;
    platform?: string;
    context?: ShellTypeDetectionContext;
};
export type ShellTypeDetectionProvider = (request: ShellTypeDetectionProviderRequest) => ShellTypeDetectionOutput | Promise<ShellTypeDetectionOutput>;
export type ShellTypeDetectionResult = {
    ok: true;
    report: ShellTypeDetectionReport;
    events: readonly string[];
} | {
    ok: false;
    error: ShellTypeDetectionError;
    events: readonly string[];
};
export type ShellTypeDetectionToolResult = {
    ok: true;
    toolId: "shell.typeDetection";
    output: ShellTypeDetectionOutput;
    audit: readonly ShellTypeDetectionAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.typeDetection";
    error: ShellTypeDetectionError;
    audit: readonly ShellTypeDetectionAuditEvent[];
    events: readonly string[];
};
export declare const shellTypeDetectionDescriptor: {
    readonly toolId: "shell.typeDetection";
    readonly capability: "detect-shell-type";
    readonly layer: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.shellDetection";
    readonly defaultDispatch: "dry-run";
    readonly unsafeSideEffects: false;
    readonly requiresTapApproval: true;
};
export declare function detectShellType(request?: ShellTypeDetectionRequest): ShellTypeDetectionResult;
export declare function executeShellTypeDetection(request?: ShellTypeDetectionRequest): Promise<ShellTypeDetectionToolResult>;
