import type { CodeToolResult } from "../../_shared/baseToolAdapter.js";
export type CodeSearchRipgrepBoundary = "input" | "contract" | "governance" | "scope" | "resource" | "execution" | "provider";
export type CodeSearchRipgrepGate = {
    accepted?: boolean;
    allowed?: boolean;
    reason?: string;
};
export type CodeSearchRipgrepMatch = {
    path: string;
    line: number;
    column?: number;
    text: string;
};
export type CodeSearchRipgrepExecution = {
    exitCode: number;
    matches: readonly CodeSearchRipgrepMatch[];
    stderr?: string;
};
export type CodeSearchRipgrepExecutor = (request: {
    command: readonly string[];
    query: string;
    directoryPath: string;
    fileGlob?: string;
    maxMatches: number;
    literal: boolean;
    caseSensitive: boolean;
    includeHidden: boolean;
    multiline: boolean;
    contextLines: number;
    context?: CodeSearchRipgrepContext;
}) => CodeSearchRipgrepExecution | Promise<CodeSearchRipgrepExecution>;
export type CodeSearchRipgrepContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: CodeSearchRipgrepGate;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    workspaceRoot?: string;
    allowedRoots?: readonly string[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type CodeSearchRipgrepRequest = {
    context?: CodeSearchRipgrepContext;
    toolCallId?: string;
    workspaceRoot?: string;
    query?: string;
    pattern?: string;
    directoryPath?: string;
    fileGlob?: string;
    maxMatches?: number;
    literal?: boolean;
    caseSensitive?: boolean;
    includeHidden?: boolean;
    multiline?: boolean;
    contextLines?: number;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    governance?: CodeSearchRipgrepGate;
    dryRun?: boolean;
    executor?: CodeSearchRipgrepExecutor;
    provider?: CodeSearchRipgrepExecutor;
    metadata?: Readonly<Record<string, unknown>>;
};
export type CodeSearchRipgrepErrorCode = "INVALID_REQUEST" | "MISSING_QUERY" | "MISSING_DIRECTORY_PATH" | "ABSOLUTE_DIRECTORY_PATH" | "DIRECTORY_PATH_OUTSIDE_SCOPE" | "NUL_BYTE_IN_PATH" | "INVALID_MAX_MATCHES" | "INVALID_CONTEXT_LINES" | "INVALID_GLOB" | "SCOPE_DENIED" | "GOVERNANCE_REJECTED" | "EXECUTOR_NOT_INJECTED" | "EXECUTOR_REJECTED" | "RIPGREP_FAILED";
export type CodeSearchRipgrepError = {
    code: CodeSearchRipgrepErrorCode;
    message: string;
    boundary: CodeSearchRipgrepBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type CodeSearchRipgrepAudit = {
    tool: "code.search_Ripgrep";
    toolCallId: string;
    directoryPath: string;
    workspaceRoot?: string;
    requestedScopes: readonly string[];
    acceptedScopes: readonly string[];
    dryRun: boolean;
    unsafeSideEffects: false;
    metadata: Readonly<Record<string, unknown>>;
};
export type CodeSearchRipgrepPlan = {
    kind: "agentCore.basicTool.code.search_Ripgrep.plan";
    operation: "ripgrep-text-search";
    query: string;
    directoryPath: string;
    fileGlob?: string;
    maxMatches: number;
    literal: boolean;
    caseSensitive: boolean;
    includeHidden: boolean;
    multiline: boolean;
    contextLines: number;
    command: readonly string[];
    dispatch: "dry-run" | "injected-executor";
    spawnsProcessDirectly: false;
};
export type CodeSearchRipgrepOutput = {
    kind: "agentCore.basicTool.code.search_Ripgrep.output";
    matches: readonly CodeSearchRipgrepMatch[];
    exitCode: number;
    stderr?: string;
    truncated: boolean;
    unsafeSideEffects: false;
};
export type CodeSearchRipgrepResult = {
    ok: true;
    plan: CodeSearchRipgrepPlan;
    audit: CodeSearchRipgrepAudit;
    output?: CodeSearchRipgrepOutput;
    events: readonly string[];
} | {
    ok: false;
    error: CodeSearchRipgrepError;
    events: readonly string[];
};
export declare const codeSearchRipgrepDescriptor: {
    readonly tool: "code.search_Ripgrep";
    readonly toolId: "code.search_Ripgrep";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.codeBase.explore";
    readonly purpose: "prepare or run a governed ripgrep search through an injected process envelope";
    readonly defaultDispatch: "dry-run";
    readonly unsafeSideEffects: false;
    readonly defaultMaxMatches: 50;
};
export declare function planCodeSearchRipgrep(request?: unknown): Promise<CodeSearchRipgrepResult>;
export declare function executeCodeSearchRipgrep(request?: CodeSearchRipgrepRequest): Promise<CodeToolResult<CodeSearchRipgrepOutput, CodeSearchRipgrepErrorCode>>;
