import type { CodeToolResult } from "../../_shared/baseToolAdapter.js";
export type CodeScanBoundary = "input" | "contract" | "governance" | "scope" | "resource" | "execution" | "provider";
export type CodeScanGate = {
    accepted?: boolean;
    allowed?: boolean;
    reason?: string;
};
export type CodeScanEntry = {
    path: string;
    kind: "file" | "directory" | "symbol" | "unknown";
    sizeBytes?: number;
    language?: string;
};
export type CodeScanProvider = (request: {
    directoryPath: string;
    maxEntries: number;
    includeGlobs: readonly string[];
    excludeGlobs: readonly string[];
    depth: number;
    offset: number;
    context?: CodeScanContext;
}) => readonly CodeScanEntry[] | Promise<readonly CodeScanEntry[]>;
export type CodeScanContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: CodeScanGate;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    workspaceRoot?: string;
    allowedRoots?: readonly string[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type CodeScanRequest = {
    context?: CodeScanContext;
    toolCallId?: string;
    workspaceRoot?: string;
    directoryPath?: string;
    maxEntries?: number;
    depth?: number;
    offset?: number;
    includeGlobs?: readonly string[];
    excludeGlobs?: readonly string[];
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    governance?: CodeScanGate;
    dryRun?: boolean;
    scanner?: CodeScanProvider;
    provider?: CodeScanProvider;
    metadata?: Readonly<Record<string, unknown>>;
};
export type CodeScanErrorCode = "INVALID_REQUEST" | "MISSING_DIRECTORY_PATH" | "ABSOLUTE_DIRECTORY_PATH" | "DIRECTORY_PATH_OUTSIDE_SCOPE" | "NUL_BYTE_IN_PATH" | "INVALID_MAX_ENTRIES" | "INVALID_DEPTH" | "INVALID_OFFSET" | "INVALID_GLOB" | "SCOPE_DENIED" | "GOVERNANCE_REJECTED" | "SCANNER_NOT_INJECTED" | "SCANNER_REJECTED";
export type CodeScanError = {
    code: CodeScanErrorCode;
    message: string;
    boundary: CodeScanBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type CodeScanAudit = {
    tool: "code.scan";
    toolCallId: string;
    directoryPath: string;
    workspaceRoot?: string;
    requestedScopes: readonly string[];
    acceptedScopes: readonly string[];
    dryRun: boolean;
    unsafeSideEffects: false;
    metadata: Readonly<Record<string, unknown>>;
};
export type CodeScanPlan = {
    kind: "agentCore.basicTool.code.scan.plan";
    operation: "scan-directory-or-code-structure";
    directoryPath: string;
    maxEntries: number;
    depth: number;
    offset: number;
    includeGlobs: readonly string[];
    excludeGlobs: readonly string[];
    dispatch: "dry-run" | "injected-scanner";
    scansFileSystemDirectly: false;
};
export type CodeScanOutput = {
    kind: "agentCore.basicTool.code.scan.output";
    directoryPath: string;
    entries: readonly CodeScanEntry[];
    offset: number;
    maxEntries: number;
    truncated: boolean;
    unsafeSideEffects: false;
};
export type CodeScanResult = {
    ok: true;
    plan: CodeScanPlan;
    audit: CodeScanAudit;
    output?: CodeScanOutput;
    events: readonly string[];
} | {
    ok: false;
    error: CodeScanError;
    events: readonly string[];
};
export declare const codeScanDescriptor: {
    readonly tool: "code.scan";
    readonly toolId: "code.scan";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.codeBase.explore";
    readonly purpose: "prepare or run a governed directory/code-structure scan through an injected scanner envelope";
    readonly defaultDispatch: "dry-run";
    readonly unsafeSideEffects: false;
    readonly defaultMaxEntries: 200;
    readonly defaultDepth: 1;
};
export declare function planCodeScan(request?: unknown): Promise<CodeScanResult>;
export declare function executeCodeScan(request?: CodeScanRequest): Promise<CodeToolResult<CodeScanOutput, CodeScanErrorCode>>;
