pb.capture and pb.extract open one, stage into it, and commit it for you in a
single call; pb.deltas.* is that same primitive, exposed for when you want to
stage and review before anything lands.
pb.capture
Stage a single structured entity.The entity type.
The entity’s fields, matching the shape for its type.
A display name. Derived from content when omitted.
Edges to other entities, by index within this capture or by existing node id.
Commit immediately. Set
false to stage only.Required when your key spans more than one project.
status ("staged" or "applied"), deltaId,
entityIds, and a validation summary.
pb.extract
Run text through a shape to extract entities and relationships into a delta. Requires a shape that exists in the target project and an extraction-capable key.The text to extract from — a plain string, or an object with
text plus
optional type, external_id, timestamp, and metadata.The id of the shape to extract through. Use
shape to reference a shape by
name instead.Commit the extracted entities, or stage them with
false.Run extraction without staging anything.
pb.deltas
The staged-write primitive. Build a delta, add entities and relationships, then submit and apply.| Method | Description |
|---|---|
pb.deltas.create(input) | Open a new delta. |
pb.deltas.get(id) | Read a delta and its staged contents. |
pb.deltas.addEntities(id, entities) | Stage entities. |
pb.deltas.addRelationships(id, rels) | Stage relationships. |
pb.deltas.submit(id) | Mark the delta ready. |
pb.deltas.plan(id) | Preview how applying it would change the graph. |
pb.deltas.apply(id) | Commit the delta. |
pb.deltas.revertPreview(id) | Preview a revert. |
pb.deltas.revert(id) | Revert an applied delta. |