export type SearchEngineProvider = "generic" | "browser" | "custom";
export type SearchEnginePermission = "network:search";
export type SearchEngineBoundary = "input" | "scope" | "permission" | "resource" | "governance" | "provider";
export type SearchEngineGate = {
    accepted?: boolean;
    allowed?: boolean;
    reason?: string;
};
export type SearchEngineContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: SearchEngineGate;
    allowedProviders?: readonly SearchEngineProvider[];
    grantedPermissions?: readonly SearchEnginePermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type SearchEngineTarget = {
    query: string;
    provider: SearchEngineProvider;
    maxResults: number;
    recencyDays?: number;
    safeSearch: boolean;
    locale?: string;
};
export type SearchEngineResultItem = {
    title: string;
    url: string;
    snippet?: string;
    raw?: unknown;
};
export type SearchEngineExecution = {
    results: readonly SearchEngineResultItem[];
    providerMetadata?: Readonly<Record<string, unknown>>;
    raw?: unknown;
};
export type SearchEngineExecutor = (request: {
    provider: SearchEngineProvider;
    query: string;
    maxResults?: number;
    recencyDays?: number;
    safeSearch?: boolean;
    locale?: string;
    context?: SearchEngineContext;
}) => SearchEngineExecution | Promise<SearchEngineExecution>;
export type SearchEngineRequest = {
    target?: Partial<SearchEngineTarget>;
    context?: SearchEngineContext;
    executor?: SearchEngineExecutor;
    provider?: SearchEngineExecutor;
    metadata?: Readonly<Record<string, unknown>>;
};
export type SearchEngineErrorCode = "INVALID_REQUEST" | "INVALID_CONTEXT" | "MISSING_QUERY" | "INVALID_PROVIDER" | "PROVIDER_NOT_ALLOWED" | "INVALID_MAX_RESULTS" | "INVALID_RECENCY" | "INVALID_LOCALE" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED" | "PROVIDER_RESULT_INVALID";
export type SearchEngineError = {
    code: SearchEngineErrorCode;
    message: string;
    boundary: SearchEngineBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type SearchEngineAuditEvent = {
    type: string;
    toolId: "search.searchEngine";
    invocationId: string;
    dryRun: boolean;
    provider?: SearchEngineProvider;
    metadata: Readonly<Record<string, unknown>>;
};
export type SearchEngineOutput = {
    kind: "agentCore.basicTool.search.searchEngine";
    target: SearchEngineTarget;
    requestPreview: SearchEngineTarget;
    dispatch: "dry-run" | "runtime-search";
    dryRun: boolean;
    providerCalled: boolean;
    executionBlocked: boolean;
    permissionsRequired: readonly SearchEnginePermission[];
    unsafeSideEffects: false;
    runtimeEntry: {
        port: "BaseToolExecutorPort.network.search";
        provider: SearchEngineProvider;
        runtimeOwnsNetwork: true;
        baseToolOwnsProviderClient: false;
    };
    resultEnvelope: {
        query: string;
        results: readonly SearchEngineResultItem[];
        providerMetadata?: Readonly<Record<string, unknown>>;
        raw?: unknown;
    };
};
export type SearchEngineResult = {
    ok: true;
    toolId: "search.searchEngine";
    output: SearchEngineOutput;
    audit: readonly SearchEngineAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "search.searchEngine";
    error: SearchEngineError;
    audit: readonly SearchEngineAuditEvent[];
    events: readonly string[];
};
export declare const searchEngineDescriptor: {
    readonly toolId: "search.searchEngine";
    readonly capability: "external-search-engine-query";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.searchBase";
    readonly defaultDryRun: true;
    readonly permissionsRequired: readonly ["network:search"];
    readonly tapOwnsApproval: true;
    readonly unsafeSideEffects: false;
    readonly runtimeEntryPort: "BaseToolExecutorPort.network.search";
};
export declare function planSearchEngineQuery(request?: SearchEngineRequest): Promise<SearchEngineResult>;
export declare const executeSearchEngineQuery: typeof planSearchEngineQuery;
