import { type ServerSpecDocument } from '../../../domain/server-spec/ServerSpecDocument.js'; /** * Rendering seam (ADR-0003 §3). Infrastructure, not a port: only the * repository adapter calls a renderer. #641 adds a Kubernetes renderer. */ export interface RenderContext { root: string; templatesDir: string; hostIps: string[]; /** Current content of a file (generated files without their mcctl header), undefined when missing. */ read(path: string): string | undefined; } export interface RenderedFile { path: string; content: string; /** Generated from the spec: carries the mcctl header and is checked for hand edits. Otherwise merged. */ guarded: boolean; } export interface ServerSpecRenderer { render(doc: ServerSpecDocument, ctx: RenderContext): RenderedFile[]; } /** config.env keys and values of a spec: managed keys, then env (ADR-0003 §3). */ export declare function projectConfigEnv(doc: ServerSpecDocument): Map; /** Docker Compose output: config.env, the server docker-compose.yml and its servers/compose.yml entry. */ export declare class DockerComposeRenderer implements ServerSpecRenderer { render(doc: ServerSpecDocument, ctx: RenderContext): RenderedFile[]; } /** The compose files servers/compose.yml text includes ([] when missing or unreadable). */ export declare function includeEntries(text: string | undefined): string[]; /** Whether servers/compose.yml text has an include entry for `/docker-compose.yml`. */ export declare function hasIncludeEntry(text: string | undefined, name: string): boolean; /** * The include entries pointing inside servers// that mcctl did not * write: all of them unless they are one string `/docker-compose.yml` * (#735). Throws when the text does not parse. */ export declare function handWrittenIncludeEntries(current: string, name: string): unknown[]; /** Add `/docker-compose.yml` unless an entry already names it; never rewrite a file it cannot read. */ export declare function renderInclude(name: string, current: string | undefined): string; /** * servers/compose.yml text without the entry mcctl writes for the server, the * string `/docker-compose.yml`; unchanged without one. Every other entry * stays as written (delete refuses hand-written ones for the server first, #735). */ export declare function removeIncludeEntry(current: string, name: string): string; //# sourceMappingURL=DockerComposeRenderer.d.ts.map