Prometheus Entity Management API
    Preparing search index...

    agent/json-patch.ts — Minimal RFC-6902 JSON Patch applier.

    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 ~.

    interface JsonPatchOp {
        from?: string;
        op: "replace" | "add" | "remove" | "copy" | "move" | "test";
        path: string;
        value?: unknown;
    }
    Index
    from?: string

    For move/copy.

    op: "replace" | "add" | "remove" | "copy" | "move" | "test"
    path: string
    value?: unknown

    For add/replace/test.