import type Conf from 'conf'; import type { InfinicodeConfig } from '../kernel/setup.js'; import type { MaintenanceReport, Kernel, RoleContext } from '../kernel/index.js'; export interface MaintainOptions { name?: string; gateway?: string; gatewayToken?: string; gatewayPassword?: string; taskName?: string; } interface CachedTask { taskPrompt: string; taskName?: string; } export declare function loadLastMaintenanceTask(storageDir?: string): CachedTask | null; /** * Pure execution: run one maintenance task on an ALREADY-BUILT kernel and * return the report — no push, no process.exit. Shared by the standalone * `infinicode maintain` CLI command (builds its own short-lived kernel) and * `infinicode serve`'s inbound-command poller (reuses the node's live * kernel, since that process is already running one). */ export declare function runMaintenanceTask(kernel: Kernel, taskPrompt: string, opts: { nodeId: string; role: RoleContext | null; taskName?: string; }): Promise; export declare function maintain(config: Conf, taskPrompt: string, opts: MaintainOptions): Promise; export {};