export interface StoreHealthCheckOptions { storeConfig: { backend: string; options?: Record; } | undefined; /** Probe timeout in milliseconds. Defaults to 5_000. */ timeoutMs?: number; /** * Override for the SPARQL HTTP transport. Tests inject a mock to * exercise reachable / unreachable / 404-namespace-missing branches; * defaults to `globalThis.fetch`. */ fetch?: typeof globalThis.fetch; } export interface StoreHealthCheckResult { ok: boolean; /** Always populated for external backends, regardless of ok. */ endpoint?: string; /** Backend name passed through for log-formatting convenience. */ backend?: string; /** Human-readable failure reason. Undefined on success. */ error?: string; /** * True when the probe surfaced an HTTP 404, which typically indicates * the namespace doesn't exist on the SPARQL server (Blazegraph) rather * than the server being down. Callers use this to bias the error * message towards "create the namespace" rather than "fix the * network". */ namespaceMissing?: boolean; } export declare function checkExternalStoreReachable(opts: StoreHealthCheckOptions): Promise; export interface StoreIdentityTagOptions { storeConfig: { backend: string; options?: Record; } | undefined; /** Operator-chosen node name from `~/.dkg/config.json`. */ nodeName: string; fetch?: typeof globalThis.fetch; /** Probe timeout in milliseconds. Defaults to 5_000. */ timeoutMs?: number; } export type StoreIdentityTagResult = { ok: true; action: 'skipped'; reason: 'local-backend' | 'unknown-backend'; } | { ok: true; action: 'matched'; nodeName: string; } | { ok: true; action: 'tagged'; nodeName: string; } | { ok: false; action: 'mismatch'; existingNodeName: string; expectedNodeName: string; error: string; } | { ok: false; action: 'transport-error'; error: string; }; /** * Read the existing identity tag (if any) and either accept it, write * a new one, or refuse to start on mismatch. * * Implemented with raw fetch against the SPARQL Query / Update * endpoints so it doesn't need the agent runtime — runs as part of * boot before the agent exists. */ export declare function checkOrSetStoreIdentity(opts: StoreIdentityTagOptions): Promise; /** * Format an identity-tag mismatch into an operator-facing log block. * Multi-line, names both sides, includes the cleanup recipe. */ export declare function formatIdentityTagMismatch(result: StoreIdentityTagResult): string; /** * Format a failed health-check result into an operator-facing log block. * Multi-line, includes the URL, the error, and a remediation hint chosen * based on the failure mode. */ export declare function formatHealthCheckFailure(result: StoreHealthCheckResult): string; //# sourceMappingURL=store-health-check.d.ts.map