/** * TypeScript planner: the Apps Script effect judgment semantics in TS. * * This module ports `effectOperationScript.ts`'s `requireEffect_`, * `findRow_`, `currentHash_`, `validateDeletion_`, `result_`, * `makeReceipt_`, and the apply-effects planning loop. Every decision that * the Code.gs source makes before mutation (receipt replay, row lookup, * create-if-missing, visible/candidate/repair guards, deletion shape) is * reproduced here against the typed preflight context. Outcomes are * discriminated unions, never nullable status markers. * * The module is split into focused files; this entry keeps the planner core * (`planEffectBatch`, `requireProviderEffect`). The shared plan/outcome/row * types live in `plannerContracts`, and the moved helpers live in: * * - `plannerWorkingRow` — working-row lifecycle, replay, hashing, lookup * - `plannerDeletion` — full-row deletion guard and kind predicates * - `plannerReceipt` — receipt construction and result encoding */ import { type SyncProjectionEffect, type ApplySyncEffectsRequest } from "../../../../contracts/sheets/syncSheets.js"; import type { PreflightContext } from "./preflightTypes.js"; import type { EffectPlan } from "./plannerContracts.js"; /** * Plans one applyEffects request against a preflight context. * * All effects are planned (including beyond the transport byte budget); the * batch builder decides which prefix is actually sent. Deleted working rows * are removed from the anchor/identity indexes so later effects in the same * batch observe the mutations of earlier ones. */ export declare function planEffectBatch(request: ApplySyncEffectsRequest, context: PreflightContext): readonly EffectPlan[]; /** Runtime validation of one effect against its request route (fail closed). */ export declare function requireProviderEffect(effect: SyncProjectionEffect, request: ApplySyncEffectsRequest, context: PreflightContext): void; //# sourceMappingURL=planner.d.ts.map