import { type SourceConfig, type SourceRuntimeStatus } from "../../hub/index.js";
export interface LoadPeerSourceConfigsOptions {
    cwd: string;
    agentDir: string;
    globalDir?: string;
}
export interface LoadedPeerSourceConfigs {
    configs: SourceConfig[];
    configPathByName: Map<string, string>;
}
export declare function loadPeerSourceConfigs(options: LoadPeerSourceConfigsOptions): LoadedPeerSourceConfigs;
export interface PeerSourceRuntimeHost {
    start(): Promise<void>;
    stop(): Promise<void>;
    getStatuses(): SourceRuntimeStatus[];
    pauseSource(resourceId: string): Promise<void>;
    restartSource(resourceId: string): Promise<void>;
    removeSource(resourceId: string): Promise<void>;
}
export interface PeerSourceRuntimeOptions {
    cwd: string;
    agentDir: string;
    globalDir?: string;
    peerId: string;
    isHubRunning: () => boolean;
    targetAgentId?: () => string;
    emitSourceMessage: (sourceName: string, text: string, agentId?: string) => Promise<void>;
    host?: PeerSourceRuntimeHost;
}
export declare class PeerSourceRuntime {
    private readonly options;
    private host;
    private configPathByName;
    private configPathByResourceId;
    private configuredAgentIdByName;
    constructor(options: PeerSourceRuntimeOptions);
    start(): Promise<void>;
    stop(): Promise<void>;
    getStatuses(): Array<SourceRuntimeStatus & {
        origin: "peer";
        peerId: string;
    }>;
    hasLocalSourceResourceId(resourceId: string): boolean;
    getMatchingLocalSourceResourceIds(resourceId: string): string[];
    pauseSource(resourceId: string): Promise<void>;
    restartSource(resourceId: string): Promise<void>;
    removeSource(resourceId: string): Promise<void>;
    private loadSources;
    private requireHost;
    private requireConfigPath;
}
//# sourceMappingURL=peer-source-runtime.d.ts.map