/** * The ONE document write and the trail it leaves: the version append, the * optimistic-concurrency bracket, the §9.9 announcement, and the intent slots * that carry an `edit`'s own words into the save `authored` makes for it. * * Lifted out of `createApps` unchanged. */ import { type AppId, type RunContext } from "@vendoai/core"; import { type AppDocument, type AdmissionOrigin } from "../../contract/index.js"; import type { AppsRuntimeContext } from "../runtime/runtime-context.js"; import type { EditResult, VersionEntry } from "../runtime/types.js"; export declare const rungFor: (app: AppDocument, declared?: VersionEntry["rung"]) => VersionEntry["rung"]; /** A document without its id, the shape every generation module speaks. */ export declare const withoutId: (app: AppDocument) => Omit; /** The edit-journal slice of `createApps`' closure. */ export declare const createEditJournal: (deps: Pick) => { assembleEdit: (appId: AppId, instruction: string, ctx: RunContext) => Promise< /** `say` is the run's own closing words, and it travels for the same reason * the create arm's does: only the thing that changed the screen knows what * is on it now. */ { kind: "assembled"; app: AppDocument; say?: string; } /** The CHANGE needs the builder — the escalation ladder, from an app that * already exists. `why` is the escalating agent's own one line; the * document is untouched and still serving. */ | { kind: "escalate"; why: string; } | { kind: "failed"; issues: string[]; }>; editIntents: Map; editVersions: Map; editRefusals: Map; replaySources: Map; takeEditRefusal: (appId: AppId, instruction: string) => string | undefined; takeEditVersion: (appId: AppId, instruction: string) => VersionEntry | undefined; takeReplaySource: (appId: AppId) => string | undefined; persistEdit: (previous: AppDocument, app: AppDocument, version: VersionEntry, subject: string, options: { /** Who is writing, for the admission audit. Required, because this is the * ONE document write and every rung reaches it: a default would let a * path write anonymously. It never changes what the door CHECKS — the * same document is admitted or refused identically on every origin. */ origin: AdmissionOrigin; }) => Promise; reportDocumentEdit: (previous: AppDocument, next: AppDocument, subject: string) => Promise; discardVersion: (appId: AppId, versionId: string) => Promise; pruneHistory: (appId: AppId) => Promise; failedEdit: (app: AppDocument, instruction: string, issues: string[], retryable?: boolean) => EditResult; rungFor: (app: AppDocument, declared?: VersionEntry["rung"]) => VersionEntry["rung"]; }; //# sourceMappingURL=edit-journal.d.ts.map