@adcp/sdk API Reference - v10.0.1
    Preparing search index...

    Interface RegistrySyncConfig

    interface RegistrySyncConfig {
        client: RegistryClient;
        transport?: "auto" | "stream" | "poll";
        pollIntervalMs?: number;
        types?: string;
        feedPageLimit?: number;
        streamPollIntervalSeconds?: number;
        streamIdleTimeoutMs?: number;
        streamReconnectMinMs?: number;
        streamReconnectMaxMs?: number;
        maxStreamFailures?: number;
        indexes?: {
            agents?: boolean;
            authorizations?: boolean;
            brandHierarchies?: boolean;
        };
        cursorStore?: CursorStore;
        onError?: (error: Error) => void;
    }
    Index

    Properties

    RegistryClient instance to use for API calls.

    transport?: "auto" | "stream" | "poll"

    Feed transport for tailing changes after bootstrap:

    • 'auto' (default): try the SSE stream, fall back to polling on an unsupported endpoint (404/406), proxy/network failure, or stream parse failure.
    • 'stream': SSE only; reconnect on failure and never fall back to polling.
    • 'poll': polling only.
    pollIntervalMs?: number

    Polling interval in milliseconds. Default: 30000 (30s).

    types?: string

    Comma-separated event type filter (glob, e.g. authorization.*) applied to every feed read (bootstrap drain, polling, and SSE).

    A persisted cursor is scoped to the logical types subscription it was minted under: a cursor from a broader subscription can skip events that were filtered out previously. This is NOT enforced by the cursor store (the store holds only the cursor string), so if you change types you must reset() before start(). With a persistent FileCursorStore that survives restarts, changing types between deploys against the same store path will silently resume from a foreign cursor — point each subscription at its own store path, or clear the store when the filter changes.

    feedPageLimit?: number

    Max events requested per feed page (polling and SSE). Default: 1000.

    streamPollIntervalSeconds?: number

    Server-side caught-up interval hint for the SSE stream, in seconds (5–60, default 15) — maps to the poll_interval_seconds query param. Note the unit: pollIntervalMs and streamIdleTimeoutMs are milliseconds.

    streamIdleTimeoutMs?: number

    Client-side idle watchdog: reconnect the stream if no feed page or heartbeat arrives within this window. Must exceed the server poll interval. Default: 90000 (90s).

    streamReconnectMinMs?: number

    Reconnect backoff floor in ms. Default: 1000.

    streamReconnectMaxMs?: number

    Reconnect backoff ceiling in ms. Default: 30000.

    maxStreamFailures?: number

    Consecutive stream failures (with no successful message in between) before 'auto' mode falls back to polling. Default: 3. Ignored in 'stream' mode.

    indexes?: {
        agents?: boolean;
        authorizations?: boolean;
        brandHierarchies?: boolean;
    }

    Choose which indexes to maintain.

    Type Declaration

    • Optionalagents?: boolean

      Agent inventory profiles. Default: true.

    • Optionalauthorizations?: boolean

      Authorization entries (agent→domain mappings). Default: true.

    • OptionalbrandHierarchies?: boolean

      Ordered brand hierarchy chains (self → parents → house). Default: true.

    cursorStore?: CursorStore

    Optional cursor store for persisting the feed cursor between restarts.

    onError?: (error: Error) => void

    Called on errors during polling/bootstrap.