/** * Shared invariant-fact evaluation for AXM-owned projection units. * * Adapters read their native output and report a normalized observation here. * Lint and sync consume the resulting facts without repeating adapter probes. * * @experimental This API is unstable and may change without notice. */ import * as Effect from "effect/Effect"; import * as FileSystem from "effect/FileSystem"; import * as Layer from "effect/Layer"; import * as Path from "effect/Path"; import * as ServiceMap from "effect/Context"; import { HookManager } from "../hooks/manager.js"; import { KnowledgeManager } from "../knowledge/manager.js"; import { RuleManager } from "../rules/manager.js"; import { WorkspaceMutations } from "../workspace/service-interface.js"; import { SubagentManager } from "../subagents/manager.js"; import type { WorkspaceScope } from "../workspace/scope.js"; import type { OwnershipUnitId } from "./units.js"; export declare const PROJECTION_INVARIANT_PREDICATE: "workspace/projection-current"; export type ProjectionObservationStatus = "current" | "missing" | "incomplete" | "stale" | "obsolete" | "unavailable"; /** Adapter readback from one independently owned output unit. */ export interface ProjectionUnitObservation { readonly unitId: OwnershipUnitId; readonly path: string; /** Marker provenance owner for comment-bearing managed-region units. */ readonly owner?: string; /** Whether the AXM-owned unit itself is present, not merely its surrounding file. */ readonly present: boolean; /** Whether the complete expected rendering byte-for-byte matches the output. */ readonly current: boolean; readonly expectedContributors: ReadonlyArray; /** Contributor identities recovered from the output unit itself. */ readonly observedContributors: ReadonlyArray; } export interface ProjectionInvariantFact { readonly predicate: typeof PROJECTION_INVARIANT_PREDICATE; readonly subject: { readonly unitId: OwnershipUnitId; readonly path: string; readonly scope: WorkspaceScope; readonly owner?: string; }; readonly authority: { readonly source: "desired-state-graph"; readonly contributors: ReadonlyArray; }; readonly observation: { readonly status: ProjectionObservationStatus; readonly contributors: ReadonlyArray; readonly reasonCode?: string; readonly message?: string; }; readonly expectation: { readonly status: "current"; readonly contributors: ReadonlyArray; }; readonly affectedContributors: ReadonlyArray; } export declare const makeProjectionInvariantFact: (unit: ProjectionUnitObservation, scope: WorkspaceScope) => ProjectionInvariantFact; export declare const projectionFactIsViolation: (fact: ProjectionInvariantFact) => boolean; /** Sync work implied by an intrinsic violation or an unready required unit. */ export declare const projectionFactRequiresReconciliation: (fact: ProjectionInvariantFact) => boolean; export interface WorkspaceInvariantFactsService { readonly projectionFacts: Effect.Effect>; } declare const WorkspaceInvariantFacts_base: ServiceMap.ServiceClass; export declare class WorkspaceInvariantFacts extends WorkspaceInvariantFacts_base { } export declare const WorkspaceInvariantFactsLive: Layer.Layer; export {}; //# sourceMappingURL=invariant-facts.d.ts.map