/**
 * PrimaryLink — link a deployed gateway to an upstream/primary gateway as a
 * browseable filesystem node.
 *
 * When `JAIT_PRIMARY_GATEWAY` is configured, this gateway opens an outbound
 * WebSocket to the primary, registers itself via `fs.register-node`, and then
 * answers the primary's `fs.browse-request` / `fs.roots-request` /
 * `fs.op-request` messages from its own local disk. This makes the node appear
 * (and be openable/editable) in the primary's Open Project modal — mirroring
 * exactly what the Electron desktop client does, so the primary needs zero
 * changes (it reuses its existing proxyFsBrowse/proxyFsRoots/proxyFsOp paths).
 *
 * The link is purely additive and off by default: with no primary configured,
 * nothing here runs.
 */
export interface PrimaryLinkOptions {
    /** Primary gateway URL — http(s)://, ws(s)://, or bare host:port. */
    primaryGateway: string;
    /** Optional bearer token (JWT) for the primary's WS auth. */
    primaryToken?: string;
    /** Display name for this node (defaults to hostname). */
    nodeName?: string;
    /** Optional provider list to advertise (e.g. detected CLIs). */
    providers?: string[];
}
export declare class PrimaryLink {
    private readonly opts;
    private ws;
    private stopped;
    private reconnectDelay;
    private readonly maxReconnectDelay;
    private reconnectTimer;
    private readonly terminalSessions;
    private readonly nodeId;
    constructor(opts: PrimaryLinkOptions);
    start(): void;
    stop(): void;
    private connect;
    private scheduleReconnect;
    private send;
    private handleMessage;
    private terminalOp;
    private roots;
    private browse;
    private fsOp;
    private toolOp;
    private runCommand;
    private searchProject;
}
//# sourceMappingURL=primary-link.d.ts.map