/** * Surface Guard Policy — pure logic migrated from openclaw-plugin. * * No I/O, no fs, no network. Operates on PLUGIN_SURFACE_REGISTRY (same * directory) and in-memory module-level Set for once-only log state. * * The guardService generic constraint was relaxed from * (a plugin type) to because the * function body only passes the service through — it never accesses * OpenClawPluginService properties. Callers pass concrete service types, * so TypeScript infers T correctly without the constraint. */ export interface SurfaceGuardResult { passed: boolean; enabledCoreSurfaces: string[]; disabledNonCoreSurfaces: string[]; violations: string[]; warnings: string[]; } type LoggerLike = { info?: (msg: string) => void; debug?: (msg: string) => void; }; /** * Reset the per-process surface-guard skip log bookkeeping. Intended for tests * that need to assert on the first-fire log without cross-test pollution. * Not part of the production API surface; do not call from runtime code. */ export declare function __resetSurfaceGuardSkipLogStateForTests(): void; export declare function checkSurfaceGuard(): SurfaceGuardResult; export declare function getSurfaceIdForHook(hookEvent: string, label?: string): string; export declare function getSurfaceIdForService(serviceName: string): string; export declare function isSurfaceEnabled(surfaceId: string, overrides?: Record): { enabled: boolean; reason?: string; }; export type HookHandler = (event: E, ctx: C) => R | Promise; export declare function guardHook(surfaceId: string, logger: LoggerLike | undefined, handler: HookHandler): HookHandler; export declare function guardService(surfaceId: string, service: T, logger?: LoggerLike): T | null; export {}; //# sourceMappingURL=surface-guard-policy.d.ts.map