import { readLedgerV3Since } from "../events/v3/index.js"; import { type SemanticOnceReport } from "./once.js"; import { type SemanticServiceStatus, type SemanticServiceStatusRecord } from "./service-status.js"; export { readSemanticServiceStatus, SEMANTIC_SERVICE_STATUS_SCHEMA_VERSION, type SemanticServiceErrorCode, type SemanticServiceState, type SemanticServiceStatus, type SemanticServiceStatusRecord, } from "./service-status.js"; export declare const SEMANTIC_SERVICE_DEFAULT_DEBOUNCE_MS = 5000; export declare const SEMANTIC_SERVICE_DEFAULT_WAKE_MS = 1000; export declare const SEMANTIC_SERVICE_DEFAULT_HEARTBEAT_MS = 5000; export declare const SEMANTIC_SERVICE_DEFAULT_IDLE_WAKE_MAX_MS = 30000; export interface RunSemanticServiceDaemonInput { coordRoot: string; callsPerHour?: number; debounceMs?: number; wakeIntervalMs?: number; idleWakeMaxMs?: number; heartbeatIntervalMs?: number; maxSweeps?: number; now?: () => Date; readSince?: typeof readLedgerV3Since; runOnce?: (input: { coordRoot: string; callsPerHour?: number; debounceMs: number; shouldStop: () => boolean; }) => Promise; waitForWake?: (milliseconds: number) => Promise; } export type EnsureSemanticServiceState = "running" | "started" | "paused" | "inactive" | "unavailable"; export interface EnsureSemanticServiceResult { state: EnsureSemanticServiceState; status?: SemanticServiceStatus; error?: string; } export interface EnsureSemanticServiceDependencies { readStatus: (coordRoot: string) => SemanticServiceStatus; start: (coordRoot: string) => Promise; isPaused: (coordRoot: string) => boolean; isActive: (coordRoot: string) => boolean; } export declare function spawnSemanticService(coordRootRaw: string, options?: { callsPerHour?: number; }): Promise; /** * Start semantic reading when V3 is active, unless an operator paused it. * * Dashboard hosts call this before launching their web process. A failed * semantic launch is reported as data instead of throwing so the read-only * dashboard remains available. */ export declare function ensureSemanticServiceRunning(coordRootRaw: string, overrides?: Partial): Promise; export declare function requestSemanticServiceStop(coordRootRaw: string): SemanticServiceStatus; export declare function runSemanticServiceDaemon(input: RunSemanticServiceDaemonInput): Promise; export declare function acquireSemanticServiceLease(coordRootRaw: string): () => void; export declare function appendSemanticServiceDiagnostic(coordRoot: string, entry: Record): "shared" | "legacy"; //# sourceMappingURL=service.d.ts.map