export type SearchFetchPermission = "network:read" | "search:fetch";
export type SearchFetchBoundary = "input" | "scope" | "permission" | "resource" | "governance" | "provider";
export type SearchFetchMethod = "GET" | "HEAD";
export type SearchFetchGate = {
    accepted?: boolean;
    allowed?: boolean;
    reason?: string;
};
export type SearchFetchContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: SearchFetchGate;
    networkAccess?: SearchFetchGate;
    grantedPermissions?: readonly SearchFetchPermission[];
    allowedDomains?: readonly string[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type SearchFetchTarget = {
    url: string;
    method: SearchFetchMethod;
    expectedContentType?: string;
    maxBytes: number;
    timeoutMs?: number;
};
export type SearchFetchExecution = {
    status: number;
    headers: Readonly<Record<string, string>>;
    body: string;
    finalUrl?: string;
};
export type SearchFetchExecutor = (request: {
    url: string;
    method: SearchFetchMethod;
    expectedContentType?: string;
    maxBytes?: number;
    timeoutMs?: number;
    context?: SearchFetchContext;
}) => SearchFetchExecution | Promise<SearchFetchExecution>;
export type SearchFetchRequest = {
    target?: Partial<SearchFetchTarget>;
    context?: SearchFetchContext;
    executor?: SearchFetchExecutor;
    provider?: SearchFetchExecutor;
    metadata?: Readonly<Record<string, unknown>>;
    url?: string;
    method?: SearchFetchMethod;
    expectedContentType?: string;
    maxBytes?: number;
    timeoutMs?: number;
};
export type SearchFetchErrorCode = "INVALID_REQUEST" | "INVALID_CONTEXT" | "MISSING_URL" | "INVALID_URL" | "UNSUPPORTED_PROTOCOL" | "DOMAIN_NOT_ALLOWED" | "INVALID_METHOD" | "INVALID_EXPECTED_CONTENT_TYPE" | "INVALID_MAX_BYTES" | "INVALID_TIMEOUT" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED" | "PROVIDER_RESULT_INVALID";
export type SearchFetchError = {
    code: SearchFetchErrorCode;
    message: string;
    boundary: SearchFetchBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type SearchFetchAuditEvent = {
    type: string;
    toolId: "search.fetch";
    invocationId: string;
    dryRun: boolean;
    url?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type SearchFetchOutput = {
    kind: "agentCore.basicTool.search.fetch";
    target: SearchFetchTarget;
    requestPreview: SearchFetchTarget;
    dispatch: "dry-run" | "runtime-fetch";
    dryRun: boolean;
    executionBlocked: boolean;
    permissionsRequired: readonly SearchFetchPermission[];
    unsafeSideEffects: false;
    resultEnvelope: {
        url: string;
        finalUrl?: string;
        status?: number;
        headers: Readonly<Record<string, string>>;
        bodyPreview: string;
        bytesRead: number;
        truncated: boolean;
        contentType?: string;
    };
};
export type SearchFetchResult = {
    ok: true;
    toolId: "search.fetch";
    output: SearchFetchOutput;
    audit: readonly SearchFetchAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "search.fetch";
    error: SearchFetchError;
    audit: readonly SearchFetchAuditEvent[];
    events: readonly string[];
};
export declare const searchFetchDescriptor: {
    readonly toolId: "search.fetch";
    readonly capability: "fetch-remote-content";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.searchBase";
    readonly defaultDryRun: true;
    readonly defaultMethod: "GET";
    readonly defaultMaxBytes: 1048576;
    readonly permissionsRequired: readonly ["network:read", "search:fetch"];
    readonly tapOwnsApproval: true;
    readonly unsafeSideEffects: false;
};
export declare function planSearchFetch(request?: SearchFetchRequest): Promise<SearchFetchResult>;
export declare const executeSearchFetch: typeof planSearchFetch;
