import type { JamDeps } from "../deps.js"; import type { WriteApplyReceipt } from "../domain/write.js"; export type ApplyWriteRequest = { planId: string; }; /** * Execute a plan JAM made, then go and look at what happened. * * Three things happen in order, and none of them can be skipped: * * 1. Re-read the issue and compare its revision to the plan's. A plan that * was valid is not the same as a plan that is still valid. * 2. Send the mutation the plan recorded. The caller never supplies it, so * there is no path from "an agent wants to write X" to "JAM writes X" * that does not pass through planning. * 3. Read the issue again and check the intended result is actually there. * Jira accepting a request is not evidence that the issue changed - a * transition can be accepted and land somewhere else, a field update can * be silently dropped by a screen configuration. * * A write that cannot be confirmed is never reported as success. Depending on * why, that is JAM_WRITE_VERIFICATION_FAILED (Jira answered, and shows * something else) or JAM_WRITE_UNCERTAIN (we do not know whether it landed). */ export declare function applyWritePlan(deps: JamDeps, request: ApplyWriteRequest): Promise;