/**
 * WS5.2 §5.1 — fetch each online peer's account inventory for cross-machine depth detection.
 *
 * Extracts the `?scope=pool` fan-out into a standalone, injectable, unit-testable function: it
 * queries each registered ONLINE peer's PLAIN `/subscription-pool` (NEVER `?scope=pool` — no
 * recursion) and maps the result into the depth adapter's `MachinePoolView[]`. A peer that reports
 * an account in its own plain pool HOLDS it locally (it has a config-home there), so those rows
 * are `locallyHeld: true` — exactly what the detector needs to tell a depth-zero peer from one
 * that can serve. Dark/slow/erroring peers are TOLERATED (skipped), never a throw — mirroring the
 * existing scope=pool "classified per-peer failure, never a 500" discipline.
 *
 * Pure over injected deps (peer list, fetch, auth) ⇒ unit-testable with a mock fetch; the route/
 * server wires the real peer URLs (resolvePeerUrls) + the agent's authToken.
 */
import type { MachinePoolView } from './accountFollowMeDepth.js';
export interface PeerRef {
    machineId: string;
    nickname: string;
    /** Base URL of the peer's instar server (no trailing slash needed). */
    url: string;
}
export interface FetchPeerViewsDeps {
    /** Online, registered peers (excluding self). */
    peers: () => PeerRef[] | Promise<PeerRef[]>;
    /** Injected fetch (real `fetch` in prod; a stub in tests). */
    fetchImpl: (url: string, init?: {
        headers?: Record<string, string>;
        signal?: AbortSignal;
    }) => Promise<{
        ok: boolean;
        status: number;
        json: () => Promise<unknown>;
    }>;
    /** Bearer token for the peer's authenticated `/subscription-pool` read. */
    authToken: string;
    /** Per-peer timeout (ms). Default 4000. */
    timeoutMs?: number;
    log?: (msg: string) => void;
}
/**
 * Fetch peer views. Tolerant: a peer that is down / slow / non-200 / unparseable contributes
 * NOTHING (skipped, logged) rather than failing the whole detection — a dark peer must not block
 * depth detection on the others.
 */
export declare function fetchPeerSubscriptionViews(deps: FetchPeerViewsDeps): Promise<MachinePoolView[]>;
//# sourceMappingURL=fetchPeerSubscriptionViews.d.ts.map