/** * Service Audit - Validate installed service configuration against current state * * Checks for: * - Version mismatch (installed vs current) * - Token drift (service token vs config token) * - Missing program binary * - Port mismatch * - Platform-specific configuration issues */ import type { GatewayService, GatewayServiceEnv } from './types.js'; export type ServiceAuditCode = 'version-mismatch' | 'token-drift' | 'missing-program' | 'temporary-program' | 'port-mismatch' | 'launchd-keep-alive' | 'launchd-run-at-load'; export interface ServiceAuditIssue { code: ServiceAuditCode; message: string; detail?: string; level?: 'recommended' | 'aggressive'; } export interface ServiceAuditResult { ok: boolean; issues: ServiceAuditIssue[]; } /** Audit installed service configuration against current config and version */ export declare function auditGatewayServiceConfig(params: { service: GatewayService; env?: GatewayServiceEnv; expectedToken?: string; expectedPort?: number; currentVersion?: string; }): Promise; /** * Check if the service's embedded token differs from the config file token. * Returns an issue if drift is detected. */ export declare function checkTokenDrift(params: { serviceToken: string | undefined; configToken: string | undefined; }): ServiceAuditIssue | null;