import { MemoryCoherenceScheduler } from '../memory/memory-coherence-scheduler.js'; import { type FeishuTenantAccessToken } from '../feishu/client.js'; import type { AgentConfig } from '../../shared/agent-config.js'; import { type ProviderRuntimeCommandsConfig } from '../../shared/provider-runtime-commands.js'; import { AgentRestartCommandStore } from './agent-restart-command.store.js'; import { AgentHealthStore } from './agent-health.store.js'; import { type RunningAgentHandle } from './agent-runner.js'; import type { RuntimeWorkerConfig } from './types.js'; import { TeamRunLimiter } from './team-run-limiter.js'; export interface RuntimeHostOptions { agent?: string; pollIntervalMs?: number; } export type { RunningAgentHandle } from './agent-runner.js'; export interface StartAgentOptions { forceStopAfterMs: number; providerCommand: string; runLimiter: TeamRunLimiter; startTimeoutMs: number; } export interface RuntimeHostDependencies { animaHome?: string; forceRestartTimeoutMs?: number; loadAgents?: (opts: RuntimeHostOptions) => Promise; loadProviderCommands?: () => Promise; ensureDefaultSkills?: () => Promise; healthIntervalMs?: number; healthStore?: AgentHealthStore; logger?: Pick; memoryCoherenceScheduler?: Pick; restartCommands?: AgentRestartCommandStore; startAgent?: (agent: AgentConfig, animaHome: string, options: StartAgentOptions) => Promise; startAgentTimeoutMs?: number; syncSlackDisplayInfo?: (agent: AgentConfig) => Promise; validateAgent?: (agent: AgentConfig) => Promise | void; } export declare function startRuntimeHost(opts?: RuntimeHostOptions): Promise; export declare class RuntimeHost { private readonly opts; private readonly agents; private readonly animaHome; private readonly loadAgents; private readonly loadProviderCommands; private readonly ensureDefaultSkills; private readonly logger; private readonly memoryCoherenceScheduler; private readonly restartCommands; private readonly health; private readonly healthIntervalMs; private readonly forceRestartTimeoutMs; private readonly startAgentTimeoutMs; private readonly runLimiter; private readonly startAgent; private readonly syncSlackDisplayInfo; private readonly validateAgent; private pollTimer?; private healthTimer?; private reconcile?; private healthPublish?; private readonly configWatchers; private restartCommandWatcher?; private configWatchDebounce?; private bootHealthInitialized; private lastHandoffCleanupAt; constructor(opts?: RuntimeHostOptions, deps?: RuntimeHostDependencies); start(): Promise; stop(): Promise; reconcileOnce(): Promise; runningAgentIds(): string[]; private reconcileAgents; private cleanupExpiredHandoffs; private managedAgent; private reconcileMemoryCoherence; private initializeBootHealth; private forceRestartAgent; private reconcileRunningAgent; /** * When a config/account reload is blocked on active work or Claude background * tasks, wait for provider quiescence (and poll for active-item clearance), * then re-reconcile. Stale waiters re-check handle identity + generation so * they cannot stop a newer runtime. */ private armConfigReloadWait; private clearConfigReloadWait; private startAndStore; private startAgentWithTimeout; private agentAfterSlackDisplayInfoSync; private stopMissingAgents; private clearMissingRestartCommands; private publishKnownHealthSnapshots; private publishHealthForAgent; private resolveMissingHandleHealth; private writeUnknownHealth; private writeFailedHealth; private writeRestartPending; private writeRestartFailed; private resolveStaleRestartItem; private logAgentStatus; private syncConfigWatchers; private scheduleConfigReconcile; private closeConfigWatchers; private syncRestartCommandWatcher; private closeRestartCommandWatcher; private shutdownStopOptions; } export declare function loadRuntimeAgents(opts?: RuntimeHostOptions): Promise; export declare function invalidateConfigCacheForWatchEvent(key: string, path: string, filename: Buffer | string | null): boolean; export declare function managedProviderEnvForAgent(agent: AgentConfig, animaHome: string, botToken?: string, deps?: { fetchFeishuTenantAccessToken?: (config: AgentConfig['feishu']) => Promise; }): Promise>; export declare function runtimeWorkerConfigForAgent(agent: AgentConfig): RuntimeWorkerConfig; //# sourceMappingURL=host.d.ts.map