Skip to content

Writes

All mutations in WarmHub flow through one operation pipeline. Operations apply one at a time, and each data change is recorded as a new version on its thing’s own history (wh thing history) — not in a separate commit or batch record; a rename changes the name in place without creating a version. Each operation succeeds or fails on its own, so a later failure does not undo earlier operations in the same request.

Terminal window
wh commit submit --add temp-1 --shape Sensor \
--data '{"location": "Building A", "type": "temperature"}' \
-m "Add sensor"

This assumes the repository already has a Sensor shape; see Shapes to define one. Add --json to get the per-operation results, each with status set to applied, noop, or error.

NeedPage
Every operation kind in full — fields, conditional writes, and no-op semanticsOperations
What happens when one operation in a request fails, and how to chain operationsAtomicity
The stages each operation passes through, from validation to a recorded versionThe Pipeline
Submit from the CLI, MCP, SDK, or streaming surfaces, and set a committerSubmitting Operations
Read the version trail for a thing, with attribution per versionWrite History
Type-safe SDK write calls and the shape of the result they returnWrite Methods
How results and receipts differ across the CLI, SDK, and MCPOperation Results
Branch recovery logic on a failed operation’s structured detailsStructured error details
Recover from a timeout, a retry, or a partial submissionTransient Retry
Validate a batch before committing it, or drive writes from the CLIwh commit submit
Submit operations from an agent over MCPwarmhub_thing_create and the other write tools
Write from an HTTP-oriented client, and validate without committingHTTP writes
Fire a webhook when an operation landsSubscriptions
Understand the wref an operation namesWrefs