export type ShellExecutionPermission = "shell:validate" | "shell:execute" | "filesystem:read" | "filesystem:write" | "network:access";
export type ShellPermissionControlBoundary = "input" | "scope" | "permission" | "approval" | "contract" | "governance" | "provider";
export type ShellPermissionDecision = "granted" | "denied" | "approval-required";
export type ShellPermissionControlContext = {
    runtimeId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: {
        allowed?: boolean;
        accepted?: boolean;
        reason?: string;
    };
    grantedPermissions?: readonly ShellExecutionPermission[];
    allowedWorkingDirectories?: readonly string[];
    approval?: {
        accepted: boolean;
        approvalId?: string;
        reason?: string;
    };
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type ShellPermissionControlRequest = {
    command?: string;
    workingDirectory?: string;
    requestedPermissions?: readonly ShellExecutionPermission[];
    riskLevel?: "low" | "medium" | "high";
    context?: ShellPermissionControlContext;
};
export type ShellPermissionControlErrorCode = "MISSING_COMMAND" | "MISSING_REQUESTED_PERMISSIONS" | "INVALID_PERMISSION" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "APPROVAL_REQUIRED" | "APPROVAL_REJECTED" | "REAL_EXECUTION_BLOCKED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type ShellPermissionControlError = {
    code: ShellPermissionControlErrorCode;
    message: string;
    boundary: ShellPermissionControlBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type ShellPermissionControlAuditEvent = {
    type: string;
    toolId: "shell.permissionControl";
    invocationId: string;
    dryRun: boolean;
    workingDirectory?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type ShellPermissionControlOutput = {
    kind: "agentCore.basicTool.shell.permissionControl";
    command: string;
    workingDirectory?: string;
    requestedPermissions: readonly ShellExecutionPermission[];
    grantedPermissions: readonly ShellExecutionPermission[];
    missingPermissions: readonly ShellExecutionPermission[];
    decision: ShellPermissionDecision;
    approvalId?: string;
    dryRun: boolean;
    providerCalled: boolean;
    executionBlocked: boolean;
    finalAuthorizationGranted: false;
    runtimeGuardRequired: true;
    unsafeSideEffects: false;
};
export type ShellPermissionControlResult = {
    ok: true;
    toolId: "shell.permissionControl";
    output: ShellPermissionControlOutput;
    audit: readonly ShellPermissionControlAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "shell.permissionControl";
    error: ShellPermissionControlError;
    audit: readonly ShellPermissionControlAuditEvent[];
    events: readonly string[];
};
export declare const shellPermissionControlDescriptor: {
    readonly toolId: "shell.permissionControl";
    readonly capability: "shell-execution-permission-control";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.shellBase.executionGuard";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly unsafeSideEffects: false;
};
export declare const shellExecutionPermissionValues: readonly ["shell:validate", "shell:execute", "filesystem:read", "filesystem:write", "network:access"];
export declare function controlShellExecutionPermission(request?: ShellPermissionControlRequest): ShellPermissionControlResult;
