bimtex
For agents

Editing

Four atomic operations, one stable index and a semantic diff before commit.

import { applyOps, diffCompiled, getIndex } from 'bimtex';
OperationMeaning
setmerge fields into an entity by id
moveapply a coordinate delta to one entity or group
addinsert one complete entity
removedelete an entity and report dependent references

A batch is atomic: one rejected operation rejects the whole batch, so the model never has to reason about a half-applied edit.

getIndex() supplies stable lookups by id, type, level and authored group. Group tags let one edit move a dining fitout or façade package without reconstructing which entities belong together.

diffCompiled(before, after) is the check before commit: it compiles both states and returns the semantic delta — which solids changed, appeared or disappeared, and how the quantities moved. Commit the same operation list you checked — not a second model-generated rewrite — so the change that was verified is the change that lands.