/** * Action-layer telemetry, persistence, and health/state reporting for the runtime. * * @module */ import type { Action, ActionConfig, ActionResult, HookEvent } from "./types.js"; import type { ActionExecutionRecord, ActionLatestState, ActionTelemetry } from "./store/types.js"; import type { ActionComponentHealthStatus, ActionSystemState, ComponentHealth, StateStatusProvider } from "../health/types.js"; /** * Resolves JSONL retention from an action’s optional `params.history_retention_hours` (hours). * * @param config - Parsed action config; reads `config.params.history_retention_hours` when set to a positive number or numeric string. * @returns Retention window in milliseconds (default 24h). */ export declare function resolveHistoryRetentionMs(config: ActionConfig): number; /** * Per-action health from counters and last run (actions are event-driven, no "overdue"). */ export declare function deriveActionHealth(telemetry: ActionTelemetry): ComponentHealth; export interface ActionRuntimeModuleOptions { stateDir: string; now?: () => number; } /** * Wraps action execution with telemetry, audit records, and health aggregation. */ export declare class ActionRuntimeModule implements StateStatusProvider { private readonly actionStore; private readonly now; private readonly telemetry; private readonly configs; constructor(options: ActionRuntimeModuleOptions); /** * Registers an action instance for health reporting and seeds telemetry from persisted `latest.json` * so cumulative counters survive process restarts. */ registerAction(address: string, actionName: string, config: ActionConfig): Promise; /** * Wraps `action.handle(event)` with timing, persistence, and counter updates. */ wrapHandle(address: string, action: Action, config: ActionConfig, event: HookEvent): Promise; /** Reads persisted latest snapshot (for gateway/CLI). */ readLatest(address: string, actionName: string): Promise; /** Reads rolling history (for gateway/CLI). */ readHistory(address: string, actionName: string, opts?: import("./store/types.js").ReadActionHistoryOptions): Promise; /** Lists latest snapshots across strategies (for gateway list command). */ readAllLatest(filter?: import("./store/types.js").ActionFilter): Promise; getHealthStatus(): Promise; getSystemState(): Promise; private ensureTelemetry; private applyResultToTelemetry; private buildRecord; private buildLatestState; } //# sourceMappingURL=action-runtime-module.d.ts.map