/**
 * Remote Substrate — Public API
 *
 * Barrel export and `createRemoteSubstrate()` factory.
 *
 * The remote substrate layer covers identity, handshake, sync, and transport:
 * - Durable identity stable across reconnects
 * - Handshake tokens with epoch tracking
 * - Typed transport messages (control / data / ack / failure)
 * - Reconnect engine with exponential backoff and replay
 * - State sync into runtime store domains
 * - Observability panel data provider
 */
import { RemoteObservabilityProvider } from '@pellux/goodvibes-sdk/platform/runtime/remote/observability';
import type { RemoteSubstrateConfig, RemoteSession, RemoteTask, RemoteHealth, DurableIdentity } from '@pellux/goodvibes-sdk/platform/runtime/remote/types';
import type { SyncStoreCallbacks } from '@pellux/goodvibes-sdk/platform/runtime/remote/sync';
import type { TransportAdapter } from '@pellux/goodvibes-sdk/platform/runtime/remote/reconnect';
export type { DurableIdentity, HandshakeToken, ReplayConfig, RemoteSession, RemoteTask, RemoteHealth, RemoteSubstrateConfig, RemoteConnectionHealth, RemoteRunnerContract, RemoteRunnerCapabilityCeiling, RemoteExecutionArtifact, RemoteRunnerEvidenceSummary, TransportMessage, ControlMessage, DataMessage, AckMessage, FailureMessage, TransportMessageBase, TransportMessageClass, TransportErrorCategory, RetryPolicy, AuthProvider, } from '@pellux/goodvibes-sdk/platform/runtime/remote/types';
export type { IdentitySnapshot, } from '@pellux/goodvibes-sdk/platform/runtime/remote/identity';
export type { ConnectOutcome, TransportAdapter, ReconnectEngineCallbacks, } from '@pellux/goodvibes-sdk/platform/runtime/remote/reconnect';
export type { SyncStoreCallbacks, } from '@pellux/goodvibes-sdk/platform/runtime/remote/sync';
export type { RemoteConnectionSnapshot, RemoteTaskSnapshot, RemoteObservabilitySnapshot, } from '@pellux/goodvibes-sdk/platform/runtime/remote/observability';
export { CONTROL_RETRY_POLICY, DATA_RETRY_POLICY, ACK_RETRY_POLICY, FAILURE_RETRY_POLICY, createControlMessage, createDataMessage, createAckMessage, createFailureMessage, computeRetryDelay, shouldRetry, } from '@pellux/goodvibes-sdk/platform/runtime/remote/transport-contract';
export type { ControlMessageType, DataMessageType, ControlPayloads, DataPayloads, } from '@pellux/goodvibes-sdk/platform/runtime/remote/transport-contract';
export { CURRENT_PROTOCOL_VERSION, TRANSPORT_COMPATIBILITY_MATRIX, VersionMismatchError, negotiateProtocolVersion, } from '@pellux/goodvibes-sdk/platform/runtime/remote/transport-contract';
export type { ProtocolVersion, CompatibilityMatrix, CompatibilityEntry, VersionNegotiationResult, NegotiatedProtocol, DowngradeReason, } from '@pellux/goodvibes-sdk/platform/runtime/remote/types';
export { DurableIdentityManager } from '@pellux/goodvibes-sdk/platform/runtime/remote/identity';
export { ReconnectEngine, generateIdempotencyKey } from '@pellux/goodvibes-sdk/platform/runtime/remote/reconnect';
export { RemoteStateSyncer, createNoOpSyncCallbacks, buildAcpConnectionEntry, countActiveRemoteConnections, extractRemoteTaskIds } from '@pellux/goodvibes-sdk/platform/runtime/remote/sync';
export { RemoteObservabilityProvider } from '@pellux/goodvibes-sdk/platform/runtime/remote/observability';
export { deriveRemoteCapabilities, } from '@pellux/goodvibes-sdk/platform/runtime/remote/capabilities';
export type { RemoteCapabilityId, RemoteCapabilitySnapshot, } from '@pellux/goodvibes-sdk/platform/runtime/remote/capabilities';
export { deriveRemoteHeartbeat, } from '@pellux/goodvibes-sdk/platform/runtime/remote/heartbeat';
export type { RemoteHeartbeatSnapshot, } from '@pellux/goodvibes-sdk/platform/runtime/remote/heartbeat';
export { deriveRemoteNegotiation, } from '@pellux/goodvibes-sdk/platform/runtime/remote/negotiation';
export type { RemoteNegotiationSnapshot, } from '@pellux/goodvibes-sdk/platform/runtime/remote/negotiation';
export { deriveRemoteRecoveryActions, } from '@pellux/goodvibes-sdk/platform/runtime/remote/recovery';
export type { RemoteRecoveryAction, } from '@pellux/goodvibes-sdk/platform/runtime/remote/recovery';
export { buildRemoteSessionStateSnapshot, } from '@pellux/goodvibes-sdk/platform/runtime/remote/session-state';
export type { RemoteSessionStateSnapshot, } from '@pellux/goodvibes-sdk/platform/runtime/remote/session-state';
export { RemoteSupervisor, } from './supervisor.js';
export type { RemoteSupervisorSnapshot, } from './supervisor.js';
export { RemoteRunnerRegistry, exportRemoteArtifactForAgent, importRemoteArtifact, } from './runner-registry.js';
export type { DistributedPeerKind, DistributedPairRequestStatus, DistributedPeerStatus, DistributedWorkPriority, DistributedWorkStatus, DistributedWorkType, DistributedSessionBridge, DistributedApprovalBridge, DistributedAutomationBridge, DistributedRuntimePairRequest, DistributedPeerTokenRecord, DistributedPeerRecord, DistributedPendingWork, DistributedRuntimeAuditRecord, DistributedPeerAuth, DistributedNodeHostContract, } from '@pellux/goodvibes-sdk/platform/runtime/remote/distributed-runtime';
export { DistributedRuntimeManager, getDistributedNodeHostContract, } from '@pellux/goodvibes-sdk/platform/runtime/remote/distributed-runtime';
/**
 * RemoteSubstrate — high-level facade wiring together all remote substrate components.
 *
 * This class composes DurableIdentityManager, ReconnectEngine, RemoteStateSyncer,
 * and RemoteObservabilityProvider into a single, lifecycle-managed unit.
 *
 * Callers supply a TransportAdapter (the actual I/O layer) and optional
 * SyncStoreCallbacks (to apply state changes to local store domains).
 *
 * @example
 * ```ts
 * const substrate = createRemoteSubstrate({
 *   endpoint: 'wss://remote.example.com/agent',
 *   identity: identityManager.current,
 *   authProvider: { getToken: async () => 'bearer-token' },
 * });
 *
 * substrate.attach(wsAdapter, storeCallbacks);
 * await substrate.connect();
 *
 * // Panel rendering:
 * const obs = substrate.observability;
 * obs.subscribe(() => renderRemotePanel(obs.getSnapshot()));
 * ```
 */
export declare class RemoteSubstrate {
    private readonly config;
    private adapter;
    private readonly _identity;
    private readonly _observability;
    private _syncer;
    private _engine;
    private _session;
    private _epoch;
    private _disposed;
    constructor(config: RemoteSubstrateConfig, adapter?: TransportAdapter | null);
    /** The observability panel data provider for this substrate. */
    get observability(): RemoteObservabilityProvider;
    /** Current remote session snapshot. */
    get session(): RemoteSession;
    /** Current durable identity. */
    get identity(): DurableIdentity;
    /**
     * Attach a transport adapter and store callbacks.
     *
     * Must be called before `connect()`. Can be called again after reconnection
     * with a new adapter (e.g. replacing a failed WebSocket with a fresh one).
     *
     * @param adapter - The transport I/O adapter.
     * @param storeCallbacks - Optional store mutation callbacks for state sync.
     */
    attach(adapter: TransportAdapter, storeCallbacks?: SyncStoreCallbacks): void;
    /**
     * Establish the initial connection to the remote substrate.
     *
     * @returns True if connected successfully, false on terminal failure.
     */
    connect(): Promise<boolean>;
    /**
     * Drive the reconnect loop after a connection failure.
     *
     * @returns True if eventually reconnected, false on terminal failure.
     */
    reconnect(): Promise<boolean>;
    /**
     * Acknowledge a received message offset.
     *
     * @param offset - The message offset to acknowledge.
     */
    ackOffset(offset: number): void;
    /**
     * Apply an incoming remote task update.
     *
     * @param task - Remote task snapshot from the transport.
     */
    receiveTaskUpdate(task: RemoteTask): void;
    /**
     * Apply an incoming remote health update.
     *
     * @param health - Remote health snapshot from the transport.
     */
    receiveHealthUpdate(health: RemoteHealth): void;
    /** Dispose the substrate, cancelling any pending reconnects. */
    dispose(): void;
    private _buildInitialSession;
    private _rebuildEngine;
    private _getAuthToken;
}
/**
 * Create a new RemoteSubstrate instance.
 *
 * @param config - Remote substrate configuration.
 * @param adapter - Optional transport adapter (can be attached later via `attach()`).
 * @returns A new RemoteSubstrate instance.
 *
 * @example
 * ```ts
 * const substrate = createRemoteSubstrate({
 *   endpoint: 'wss://remote.example.com/agent',
 *   identity: {
 *     sessionId: crypto.randomUUID(),
 *     taskId: crypto.randomUUID(),
 *     agentId: crypto.randomUUID(),
 *     createdAt: Date.now(),
 *     generation: 1,
 *   },
 * });
 *
 * substrate.attach(myTransportAdapter, storeCallbacks);
 * const connected = await substrate.connect();
 * ```
 */
export declare function createRemoteSubstrate(config: RemoteSubstrateConfig, adapter?: TransportAdapter): RemoteSubstrate;
//# sourceMappingURL=index.d.ts.map