Set a value at a dot-separated path, producing a new root object.
Does not mutate the input — returns a shallow-updated copy at each level.
Refuses paths whose segments name a prototype-polluting property
(__proto__, constructor, prototype). Such a path could otherwise
mutate Object.prototype (or similar) through the assignment, planting
fields visible to every plain object in the runtime. The input root
is returned unchanged so the caller's onChange handler treats the
write as a no-op rather than propagating a poisoned state. This
matches the silent-refusal semantics of dereference in core/ref.ts
when a JSON Pointer segment names a prototype-polluting key.
Set a value at a dot-separated path, producing a new root object. Does not mutate the input — returns a shallow-updated copy at each level.
Refuses paths whose segments name a prototype-polluting property (
__proto__,constructor,prototype). Such a path could otherwise mutateObject.prototype(or similar) through the assignment, planting fields visible to every plain object in the runtime. The inputrootis returned unchanged so the caller's onChange handler treats the write as a no-op rather than propagating a poisoned state. This matches the silent-refusal semantics ofdereferenceincore/ref.tswhen a JSON Pointer segment names a prototype-polluting key.