import { RelayHistoryError, type CatalogSource, type SessionScope } from './sdk-common.js'; import type { HistorySource, SourceObservationKey, SourceObservationState, ShallowSourceSession } from './source-contracts.js'; import type { HistoryPluginRegistry } from './delivery-plugins.js'; export interface SourcePluginOptions { dbPath?: string; /** * Which connectors may run: `remote` ones for `remote`, `local` ones for * `local`, both for `all`. Omitted means every selected connector. */ scope?: SessionScope; sourceConnectors?: string[]; sources?: CatalogSource[]; sessionId?: string; limit?: number; signal?: AbortSignal; acquisitionTimeoutMs?: number; /** See `DiscoverSessionsOptions.skipProtectedFolderIdentity`. */ skipProtectedFolderIdentity?: boolean; onUnavailable?: (source: string, error: RelayHistoryError) => void; } export declare function sourceAcquisitionError(error: unknown): RelayHistoryError; export declare function sourceAcquisitionTimeout(value?: number): number; export declare function throwIfSourceAborted(signal?: AbortSignal): void; /** Whether a connector at `location` may run for a request at `scope`. */ export declare function connectorRunsInScope(connector: HistorySource, scope: SessionScope | undefined): boolean; /** * The registered connectors a request at `scope` would run, after the * caller's explicit `sourceConnectors` selection. */ export declare function sourceConnectorsInScope(registry: HistoryPluginRegistry, ids: readonly string[] | undefined, scope: SessionScope | undefined): HistorySource[]; export declare function getSourceObservation(key: SourceObservationKey, options?: { dbPath?: string; }): Promise; export declare function discoverSourcePlugins(registry: HistoryPluginRegistry, options?: SourcePluginOptions): Promise<{ connector: HistorySource; observations: ShallowSourceSession[]; summary: Record; }[]>; export declare function hydrateSourcePlugin(connector: HistorySource, identity: { source: CatalogSource; sessionId: string; }, options?: { dbPath?: string; signal?: AbortSignal; acquisitionTimeoutMs?: number; includeRelated?: boolean; }): Promise>; /** Convert only the typed result envelope; evidence payloads never pass here. */ export declare function camelSourceResult(value: Record): Record; //# sourceMappingURL=source-plugins.d.ts.map