/**
 * Worker mode bootstrap for the orchestrator.
 *
 * Workers are orchestrators in 'worker' mode. They connect to a coordinator
 * via PeerClient, receive rerouted jobs, dispatch them to local agents,
 * and report progress back to the coordinator.
 *
 * Workers do NOT have:
 * - Database access (no PG, no Kysely, no migrations)
 * - Platform relay connection
 * - Raft consensus
 * - Secrets management (secrets arrive pre-resolved in job.reroute)
 * - Webhook handling, dedup, event routing, trust store
 * - Registration/source management
 * - Cache infra (bundle/dep cache, build coordinator)
 * - Concurrency tracking, ownership tracking
 * - Config reloader
 *
 * Workers DO have:
 * - ScalerManager (local scaler backends)
 * - AgentRegistry (in-memory agent tracking)
 * - Dispatcher (local agent dispatch)
 * - PeerClient (coordinator connection)
 * - PeerRegistry (coordinator tracking)
 * - InMemoryExecutionTracker (local state with forwarding)
 * - InMemoryJobQueue (no-op queue)
 * - StaticAgentTokenStore (in-memory tokens)
 * - StepLogBuffer (log chunk buffering)
 * - ObserverRegistry (CLI observer support)
 * - HTTP server with /health and agent WS endpoint
 */
import type { AppConfig } from './config.js';
import { AgentRegistry } from './agent/registry.js';
import { Dispatcher } from './agent/dispatcher.js';
import { PeerClient, PeerRegistry } from './cluster/index.js';
import { InMemoryExecutionTracker } from './worker/in-memory-execution-tracker.js';
import { InMemoryJobQueue } from './worker/in-memory-job-queue.js';
import { StaticAgentTokenStore } from './worker/static-agent-token-store.js';
import { StepLogBuffer } from './reporting/step-log-buffer.js';
import { ObserverRegistry } from './ws/observer-registry.js';
import { ScalerManager } from './scaler/index.js';
import type { ScalerConfig } from './scaler/index.js';
/**
 * Subsystems available in worker mode.
 * Subset of OrchestratorSubsystems with in-memory replacements.
 */
interface WorkerSubsystems {
    config: AppConfig;
    agentRegistry: AgentRegistry;
    dispatcher: Dispatcher;
    peerRegistry: PeerRegistry;
    /** Outbound PeerClients keyed by coord URL. Workers fan out so every coord can dispatch directly. */
    peerClients: Map<string, PeerClient>;
    /** Convenience: first PeerClient (deterministic insertion order) for legacy single-client APIs. */
    peerClient: PeerClient;
    executionTracker: InMemoryExecutionTracker;
    jobQueue: InMemoryJobQueue;
    tokenStore: StaticAgentTokenStore;
    stepLogBuffer: StepLogBuffer;
    observerRegistry: ObserverRegistry;
    scalerManager: ScalerManager | null;
    scalerConfig: ScalerConfig | null;
}
/**
 * Bootstrap the orchestrator in worker mode.
 *
 * Initializes only worker-relevant subsystems, connects to the coordinator
 * via PeerClient, and starts an HTTP server with agent WS and health endpoints.
 */
export declare function bootstrapWorker(config: AppConfig, _opts?: {
    otelSdk?: unknown;
}): Promise<WorkerSubsystems>;
export {};
//# sourceMappingURL=worker-core.d.ts.map