AG-UI STATE_DELTA events carry RFC-6902 operations. Rather than take a hard
dependency on fast-json-patch (last released 2022) or require consumers to
have @ag-ui/client's applier, this implements the standard's six operations
directly. It is small, dependency-free, and fully unit-tested.
Immutability: every op returns a NEW document; the input is never mutated.
Supported ops: add, replace, remove, move, copy, test.
Pointers follow RFC-6901 (/a/b/0), including the - array-append token and
~1/~0 escapes for / and ~.
agent/json-patch.ts — Minimal RFC-6902 JSON Patch applier.
AG-UI
STATE_DELTAevents carry RFC-6902 operations. Rather than take a hard dependency onfast-json-patch(last released 2022) or require consumers to have@ag-ui/client's applier, this implements the standard's six operations directly. It is small, dependency-free, and fully unit-tested.Immutability: every op returns a NEW document; the input is never mutated.
Supported ops: add, replace, remove, move, copy, test. Pointers follow RFC-6901 (
/a/b/0), including the-array-append token and~1/~0escapes for/and~.