Skip to main content

Encode, decode, and patch

Operational transforms run on an initialized Ecp instance. They do not emit full run lifecycle hooks the way run does.

Result shape

Encode / decode / patch results use protocol schemas with success, .result, validation, and diagnostics — not legacy .content / .document fields.

Encode

Omit .uses(...) for canonical JSON passthrough. CLI:

Decode

Notes:
  • Decode input field is input in extension payloads.
  • Fluent decode is not supported — use ecp compile for TypeScript → JSON.

Patch

Patch paths target steps by id: steps[<stepId>].field. Workflow builders assign unique step ids so patches stay unambiguous. Target schema: @executioncontrolprotocol.patch (and @executioncontrolprotocol.patch.result for outcomes).

Next steps