export type OfficeDocRipgrepBoundary = "input" | "scope" | "governance" | "permission" | "execution";
export type OfficeDocRipgrepPermission = "filesystem:read" | "office:read";
export type OfficeDocRipgrepGate = {
    accepted: boolean;
    reason?: string;
};
export type OfficeDocRipgrepContext = {
    toolCallId?: string;
    workspaceRoot?: string;
    dryRun?: boolean;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    allowedDocumentRoots?: readonly string[];
    grantedPermissions?: readonly OfficeDocRipgrepPermission[];
    governance?: OfficeDocRipgrepGate;
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type OfficeDocRipgrepRequest = {
    documentPath?: string;
    query?: string;
    fileGlob?: string;
    maxMatches?: number;
    literal?: boolean;
    caseSensitive?: boolean;
    context?: OfficeDocRipgrepContext;
    executor?: OfficeDocRipgrepExecutor;
};
export type OfficeDocRipgrepMatch = {
    documentPath: string;
    section?: string;
    line?: number;
    text: string;
};
export type OfficeDocRipgrepExecution = {
    exitCode: number;
    matches: readonly OfficeDocRipgrepMatch[];
    stderr?: string;
};
export type OfficeDocRipgrepExecutor = (request: {
    commandPreview: readonly string[];
    documentPath: string;
    query: string;
    maxMatches: number;
}) => OfficeDocRipgrepExecution | Promise<OfficeDocRipgrepExecution>;
export type OfficeDocRipgrepErrorCode = "MISSING_DOCUMENT_PATH" | "MISSING_QUERY" | "NUL_BYTE_IN_PATH" | "ABSOLUTE_DOCUMENT_PATH" | "DOCUMENT_PATH_OUTSIDE_SCOPE" | "INVALID_MAX_MATCHES" | "SCOPE_DENIED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "EXECUTOR_NOT_INJECTED" | "EXECUTOR_REJECTED" | "DOCUMENT_RIPGREP_FAILED";
export type OfficeDocRipgrepError = {
    code: OfficeDocRipgrepErrorCode;
    message: string;
    boundary: OfficeDocRipgrepBoundary;
    publicSafe: true;
};
export type OfficeDocRipgrepAudit = {
    tool: "office.docRipgrep";
    toolCallId: string;
    documentPath?: string;
    workspaceRoot?: string;
    dryRun: boolean;
    requestedScopes: readonly string[];
    acceptedScopes: readonly string[];
    permissionsRequired: readonly OfficeDocRipgrepPermission[];
    unsafeSideEffects: false;
    metadata: Readonly<Record<string, unknown>>;
};
export type OfficeDocRipgrepPlan = {
    kind: "agentCore.basicTool.office.docRipgrep.plan";
    operation: "document-text-search";
    documentPath: string;
    query: string;
    fileGlob?: string;
    maxMatches: number;
    commandPreview: readonly string[];
    dispatch: "dry-run" | "injected-executor";
    readsFileDirectly: false;
};
export type OfficeDocRipgrepOutput = {
    kind: "agentCore.basicTool.office.docRipgrep.output";
    matches: readonly OfficeDocRipgrepMatch[];
    exitCode: number;
    stderr?: string;
    unsafeSideEffects: false;
};
export type OfficeDocRipgrepResult = {
    ok: true;
    plan: OfficeDocRipgrepPlan;
    audit: OfficeDocRipgrepAudit;
    output?: OfficeDocRipgrepOutput;
    events: readonly string[];
} | {
    ok: false;
    error: OfficeDocRipgrepError;
    audit: OfficeDocRipgrepAudit;
    events: readonly string[];
};
export declare const officeDocRipgrepDescriptor: {
    readonly tool: "office.docRipgrep";
    readonly route: "toolabilityPool.officeBase.documentations";
    readonly purpose: "plan a governed office-document text search without spawning ripgrep directly";
    readonly permissionsRequired: readonly ["filesystem:read", "office:read"];
    readonly defaultDispatch: "dry-run";
    readonly unsafeSideEffects: false;
    readonly tapOwnsApproval: true;
};
export declare function planOfficeDocRipgrep(request?: OfficeDocRipgrepRequest): Promise<OfficeDocRipgrepResult>;
