/** * Deep observation orchestration (#1014) — call one lexicon's * `observeResourcesDeep()`, put the declared trees in the same shape, and diff. * * The sibling of ./observe.ts on the thin path, and it inherits that path's * rules: a reader that throws does not vanish, it reports every declared entity * NOT-OBSERVED with `read-failed` (#1089); a multi-stack read merges with * present > not-observed > absent. A deep read that fails is a hole with a * reason, never a thin-but-clean answer. * * The normalization is applied here, on both sides, with the lexicon's own * hooks. The reader already normalized what it returned — that is the contract * — but only core can normalize the *declared* tree, and only core knows which * paths exist on the other side, which is what * {@link import("../deep-observation.js").DeepNode.counterpart} needs for default * subtraction. Re-running the pass over an already-normalized live tree is * idempotent for every hook that does not consult `counterpart`. */ import type { ObservationLexicon } from "../lexicon.js"; import { type DeepNormalizationHooks, type NormalizedDeepObservation } from "../deep-observation.js"; import { type DeepDiffResult } from "./deep-diff.js"; import type { BaselineLexicon } from "./observation-baseline.js"; /** Declared entities for one lexicon, in the shape the observe paths pass around. */ export type DeclaredEntities = Map; }>; export interface DeepObserveOptions { environment: string; buildOutput: string; entities: DeclaredEntities; /** Deployed stack for a multi-stack project (#932). */ stack?: string; /** Region that stack is deployed in (#1267). Same contract as the thin path * (#1261): a multi-region estate reads each stack in its own region, not in * whichever one the shell is set to. */ region?: string; /** Component projects deploy one stack per component; read them all and merge. */ componentStacks?: string[]; owned?: boolean; } /** * Merge several deep observations of the same lexicon (the multi-stack read). * Precedence matches the thin contract: present > not-observed > absent. */ export declare function mergeDeepObservations(parts: Iterable): NormalizedDeepObservation; /** * Read one lexicon's live property trees. Never throws: a thrown reader becomes * a NOT-OBSERVED verdict for every declared entity, with the error as the * detail, so the caller sees a hole rather than an empty tree that reads as * "no properties drifted". */ export declare function observeDeep(plugin: ObservationLexicon, opts: DeepObserveOptions): Promise; /** * Normalize both sides into the same shape, then diff. * * Split out from {@link deepDiffForLexicon} so the pure half is testable * without a plugin: given declared entities, a live observation and a baseline, * this is a deterministic function. */ export declare function diffDeepObservation(entities: DeclaredEntities, live: NormalizedDeepObservation, hooks?: DeepNormalizationHooks, baseline?: BaselineLexicon): DeepDiffResult; /** Read one lexicon deeply and diff it against source and the accepted baseline. */ export declare function deepDiffForLexicon(plugin: ObservationLexicon, opts: DeepObserveOptions & { baseline?: BaselineLexicon; }): Promise; //# sourceMappingURL=deep-observe.d.ts.map