Interface: AgreementData
Defined in: src/lib/agreements/render.ts:16
Deterministic agreement template renderer.
The live merge (src/lib/agreements/merge.ts) is a flat 8-token substitution. The Phase-2
agreement bodies also need repeating rows (scope (a)–(h), the facility list, the Exhibit B
comp table) and conditional sections (which exhibits/clauses to include). This adds those on
top of scalar substitution while staying fully deterministic — the same AgreementData always
yields byte-identical output — which is required because the merged text is what gets hashed at
sign time (no divergence between the body a contractor sees and the body we hash).
Order: conditionals → loops → scalars. Blocks are flat (no nesting / no interleaving #if+^if),
which is all the contractor package needs. Unknown scalar tokens are left intact (a missing value
stays visible as {{token}} rather than silently blanking); unknown loops/flags render empty.
Properties
flags?
optionalflags?:Record<string,boolean>
Defined in: src/lib/agreements/render.ts:19
loops?
optionalloops?:Record<string,Record<string,string>[]>
Defined in: src/lib/agreements/render.ts:18
tokens
tokens:
Record<string,string>
Defined in: src/lib/agreements/render.ts:17