/** OpenClaw gateway reload modes that determine how config changes are applied. */ export type GatewayReloadMode = "off" | "restart" | "hot" | "hybrid"; /** * Result of evaluating whether the auto-updater can trigger an automatic * gateway restart after a plugin update. When `capable` is `false`, * `reasons` explains why (e.g. wrong reload mode, missing config helpers). */ export interface GatewayRestartCapability { capable: boolean; reasons: string[]; mode?: GatewayReloadMode; config?: Record; } /** Inputs required to evaluate gateway restart capability. */ export interface RestartCapabilityInputs { /** Snapshot of the OpenClaw config captured at plugin construction time (may be stale). */ configFromApi?: unknown; /** Loads the live OpenClaw config from disk -- preferred over `configFromApi` when available. */ loadConfig?: () => Promise; /** Writes a modified OpenClaw config back to disk to trigger a config-change reload. */ writeConfigFile?: (config: unknown) => Promise; pluginId: string; } /** * Determine whether the gateway can be restarted automatically. * * Restart is only possible when: * - The OpenClaw config is accessible (via `loadConfig` or `configFromApi`). * - `gateway.reload.mode` is `"restart"` or `"hybrid"`, or omitted / invalid (treated * as `"hybrid"`, matching OpenClaw's default). Modes `"hot"` and `"off"` block auto-restart. * - Both `loadConfig` and `writeConfigFile` helpers are available. * - The plugin entry exists under `plugins.entries.`. * * Prefers `loadConfig()` (fresh) over `configFromApi` (stale snapshot). * * @remarks A negative result means the restart trigger must not be written at * all — the caller notifies the operator to restart manually instead. Dependent * processes (e.g. trading runtimes) are never stopped here or by the caller; * the gateway drains the plugin through its own `stop()` lifecycle hook. */ export declare function evaluateGatewayRestartCapability(inputs: RestartCapabilityInputs): Promise; /** * Write a `lastRestartTrigger` timestamp into the plugin's `autoUpdate` * config block, causing OpenClaw's config-file watcher to detect a change * and restart the gateway (when effective reload mode is `restart` or `hybrid`, * including OpenClaw's default when `gateway.reload.mode` is omitted). * * @throws When the plugin config path cannot be resolved in the config tree. */ export declare function triggerGatewayRestartViaConfigBump(options: { loadedConfig: unknown; writeConfigFile: (config: unknown) => Promise; pluginId: string; triggerValue: string; }): Promise; //# sourceMappingURL=gateway-restart.d.ts.map