/** * Apply graduation for the strangler-fig carve (#197) — the last step. * * After a resource is emitted (`carve emit`) and the survivors are bridged * (`carve bridge`), it sits at the observe position: chant has the source, but * the live resource is an orphan carrying no chant ownership. Graduation is the * dial-turn to apply: mark the resource chant-owned so `chant carve` / status * recognize it, and finalize the ordered apply runbook. * * This is BYOL-honest: it does NOT call the cloud. It resolves the ownership * marker (reusing core's `ownershipEntries`) and produces the graduation * artifacts + runbook. The apply itself is whatever lifecycle you brought — * the native CLI, a CI pipeline, an ApplyOp — and it stamps the marker the * emitted source now carries. */ import { type ChannelKeys, type OwnershipMarker } from "../ownership.js"; import type { CarveReport } from "./carve.js"; /** * Default tag channel, mirroring the AWS lexicon's `AWS_TAG_OWNERSHIP_KEYS` * (`lexicons/aws/src/ownership.ts`). Core cannot import a lexicon, so the * convention is duplicated here; the values match so the graduation plan shows * the tags the AWS apply path will actually stamp. */ export declare const DEFAULT_TAG_OWNERSHIP_KEYS: ChannelKeys; export interface GraduationPlan { target: string; marker: OwnershipMarker; /** The ownership tags the emitted resource must carry to be chant-owned. */ ownershipTags: Record; /** The finalized, ordered apply runbook. */ steps: string[]; warnings: string[]; } export interface GraduationOptions { /** Chant stack name for the ownership marker (defaults to the resource name). */ stack?: string; /** Environment identity for the marker. */ env?: string; /** Override the tag channel (e.g. for a non-AWS lexicon). */ channel?: ChannelKeys; } export declare function graduationPlan(report: CarveReport, opts?: GraduationOptions): GraduationPlan; /** * Stamp the ownership tags into an emitted chant source file (`carve apply * --write-source`). The emitted source is machine-generated (`adoptFromState`), * so its shape is known: one prop per line, `Tags` as a single-line JSON array. * Merges into an existing `Tags` prop (replacing stale chant keys) or inserts * one into the constructor's props object. Returns null when the file has no * recognizable constructor to stamp. */ export declare function stampOwnershipIntoSource(content: string, tags: Record): { content: string; changed: boolean; } | null; //# sourceMappingURL=graduate.d.ts.map