import type { VaultMemoryApi } from './cloud.js'; export type CcsExcludeReason = 'sibling-wall' | 'manual' | 'stripper' | 'secure-isolation'; export type CcsConflictCode = 'SHADOW_HOUSE' | 'DENY_ALLOW' | 'DRIFT' | 'CLOCK_HEADER'; export interface CcsObservation { id: string; type: string; title?: string | null; subtitle?: string | null; facts?: string[]; createdAt?: string | null; created_at?: string | null; project?: string | null; agentId?: string | null; agent_id?: string | null; } export interface CcsMiddleRecord { v: 1; id: string; type: string; title: string | null; createdAt: string | null; project: string | null; agentId: string | null; source: 'vault'; line: string; } export interface CcsExcludeMark { observationId: string; toolUseIds: string[]; reason: CcsExcludeReason; markedAt: string; markedBy: 'ccs-align'; } export interface CcsRulesInput { house: string[]; project: string[]; seat: string[]; } export interface CcsRulesConflict { code: CcsConflictCode; layer: 'project' | 'seat'; line: string; detail: string; } export declare function readCcsMiddle(home: string, viewerId: string): CcsMiddleRecord[]; declare function landCcsObservationsUnlocked(home: string, viewerId: string, observations: CcsObservation[], now?: Date): { added: number; total: number; excluded: number; truncated: boolean; }; declare function addCcsExcludeUnlocked(home: string, viewerId: string, observationId: string, toolUseIds?: string[], reason?: CcsExcludeReason, now?: Date): { observationId: string; excluded: boolean; marks: number; }; declare function removeCcsExcludeUnlocked(home: string, viewerId: string, observationId: string): { observationId: string; excluded: boolean; marks: number; rebuildRequired: boolean; }; export declare function runCcsAlignCycle(home: string, cloud: VaultMemoryApi, options: { viewerId: string; triggerTypes: string[]; projectId?: string; }): Promise<{ healthy: false; miss: string; added?: never; total?: never; newestObservationId?: never; } | { healthy: true; added: number; total: number; newestObservationId: null; miss?: never; } | { newestObservationId: string; added: number; total: number; excluded: number; truncated: boolean; healthy: true; miss?: never; }>; export declare function ccsAlignHealth(home: string, viewerId: string): { viewerId: string; cached: number; excluded: number; hasCursor: boolean; hasRulesReport: boolean; }; declare function checkCcsRulesUnlocked(home: string, viewerId: string, input: CcsRulesInput, now?: Date): { conflicts: CcsRulesConflict[]; reportPath: string; patchesApplied: number; }; export declare function landCcsObservations(...args: Parameters): { added: number; total: number; excluded: number; truncated: boolean; }; export declare function addCcsExclude(...args: Parameters): { observationId: string; excluded: boolean; marks: number; }; export declare function removeCcsExclude(...args: Parameters): { observationId: string; excluded: boolean; marks: number; rebuildRequired: boolean; }; export declare function checkCcsRules(...args: Parameters): { conflicts: CcsRulesConflict[]; reportPath: string; patchesApplied: number; }; export {};