Skip to content

StateDeltaInspector

stable

AG-UI shared-state inspector: renders a StateSnapshot as a collapsible tree with RFC 6902 JSON Patch ops (StateDelta) highlighted in place — temporal tint on patched values, agency accent on agent-written path labels, strikethrough ghost rows for removes. Optional before/after snapshot toggle and prev/next history stepper. Malformed patch entries render as warning rows, never crashes.

OrchestrationInteractive/Storybook ↗
import { StateDeltaInspector } from "@nodus/design-system/patterns"
Loading demo…

Props

staterequired
Type Record<string, unknown>Default

The shared state object (AG-UI StateSnapshot).

patchesrequired
Type Array<{ op: 'add' | 'replace' | 'remove'; path: string; value?: unknown }>Default

RFC 6902 JSON Patch operations (AG-UI StateDelta), in arrival order. Malformed entries degrade to warning rows.

snapshotToggle
Type booleanDefault false

Show a BEFORE / AFTER toggle to view the state with or without patches applied.

historyScrub
Type booleanDefault false

Show a PREV / NEXT stepper scrubbing through the patch history (index into the patches array).

semantictypebordersurfacespace
Design Rationale

This component was designed to express:

Explore Related

Was this helpful?