@signal-tree/vue 15.3.1 → 15.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +15 -3
  2. package/llms.txt +92 -15
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -97,14 +97,26 @@ state used for the server output before hydration.
97
97
 
98
98
  ## Transaction failures
99
99
 
100
- Read [Transaction failures and current v15 limitations](https://github.com/JBorgia/signal-tree/blob/fix/15.3.1-link-rollback-and-strand/docs/guides/transaction-failures-v15.md)
100
+ Read [Transaction failure policy and the 15.3.1 failure inventory](https://github.com/JBorgia/signal-tree/blob/v15.3.1/docs/guides/transaction-failures-v15.md)
101
101
  before combining transactions, undo, or persistence. Explicit rollback refusal
102
102
  leaves state unchanged and the handle pending but releases consequences in v15. The
103
- unreleased 15.3.1 candidate commits surviving writes on automatic refusal
103
+ 15.3.1 release commits surviving writes on automatic refusal
104
104
  before a handle returns and still throws. An error does not guarantee undo;
105
105
  never blindly retry the entire operation.
106
106
 
107
- Candidate containment applies to deferred write subscribers and transaction
107
+ 15.3.1 containment applies to deferred write subscribers and transaction
108
108
  turn listeners, not all Vue effects. Vue rethrows watcher errors in development
109
109
  but logs them in production, so only the former can trigger automatic rollback
110
110
  at transaction closure.
111
+
112
+ ## Independent editors and connections
113
+
114
+ Keep shared records in an owned tree. Give each independently closable editor or
115
+ connection its own lifetime; native local form state may be enough for a draft.
116
+ A declared EntityMap supports dynamic data membership, not runtime installation
117
+ of composite slices. Separate trees do not share transactions or undo history.
118
+ Destroy directly created trees at their ownership boundary.
119
+
120
+ See the [owned sessions guide](../../docs/guides/owned-sessions.md) for the Angular
121
+ reference demo, stale-save policy, same-ID replacement and cleanup tests. Use this
122
+ package’s own reactive/lifecycle integration when applying the pattern.
package/llms.txt CHANGED
@@ -1,7 +1,11 @@
1
1
  # SignalTree
2
2
 
3
- SignalTree is framework-neutral reactive application state with causal
4
- semantics. The public v15 construction model is
3
+ This reference describes the 15.4.0 package version, with explicitly marked
4
+ 15.3.1 comparisons. Consult the [npm package page](https://www.npmjs.com/package/@signal-tree/kernel?activeTab=versions)
5
+ for published versions.
6
+
7
+ SignalTree keeps nested state, entity identity, transactions, undo, external
8
+ updates and reactive publication consistent across frameworks. The v15 construction model is
5
9
  `signalTree(initialState, { derived, enhancers })`; state is read through
6
10
  `tree.$`.
7
11
 
@@ -94,9 +98,15 @@ locations and observes selected state through `useSignalTree(owner, selector)`.
94
98
  EntityMap query and field leaves follow the same carrier rule; EntityMap command
95
99
  methods such as `setAll()` and `updateOne()` do not change.
96
100
 
101
+ Replace atomic values through their location. In-place mutation of a returned
102
+ object, array, Map or Set is not a recorded write; restoration does not provide
103
+ deep-copy isolation for mutable payloads.
104
+
97
105
  Plain objects normally become traversable branches. `leaf(value)` explicitly
98
- ends topology so an object remains one atomic location. Callable values always
99
- use `leaf()` because a bare function argument is the updater syntax:
106
+ ends topology so an object remains one atomic location. Declare function-valued
107
+ fields with `leaf(fn)`. At a callable write boundary, use `leaf(fn)` to distinguish
108
+ a stored function from an updater. Native Angular `.set(fn)` assigns the function
109
+ directly, as shown below:
100
110
 
101
111
  ```typescript
102
112
  import { signalTree, leaf } from '@signal-tree/angular';
@@ -189,7 +199,8 @@ of the same model.
189
199
  ## Canonical Sources
190
200
 
191
201
  - `AGENTS.md` — contributor and consumer rules
192
- - `RELEASE-1.0.md` — v15 release invariants and current release state
202
+ - `RELEASE-CURRENT.md` — active candidate, current release work and blockers
203
+ - `RELEASE-1.0.md` — historical derivations, failures and prior checkpoints
193
204
  - `README.md` — public package overview
194
205
  - `packages/kernel/README.md` — kernel API and examples
195
206
  - `packages/angular/README.md` — Angular realization
@@ -203,16 +214,15 @@ of the same model.
203
214
 
204
215
  ## Transaction failure guidance
205
216
 
206
- The guide below links to the active v15 candidate branch because `main` tracks
207
- v16. The absolute repository URL also works independently of the hosted
208
- `llms.txt` path; the demo does not serve this guide at `/docs/guides/`. The
209
- candidate documentation and release publication are pending; this branch link
210
- is not evidence that 15.3.1 has shipped.
217
+ The failure behavior in this section describes published SignalTree 15.3.1.
218
+ The release-tag link below is fixed to 15.3.1 to preserve that historical
219
+ comparison; it is not a list of defects in 15.4.0. Check versioned changes against
220
+ the installed version; source changes do not update an existing tarball.
211
221
 
212
- Read [Transaction failures and current v15 limitations](https://github.com/JBorgia/signal-tree/blob/fix/15.3.1-link-rollback-and-strand/docs/guides/transaction-failures-v15.md)
222
+ Read [Transaction failures and limitations in 15.3.1](https://github.com/JBorgia/signal-tree/blob/v15.3.1/docs/guides/transaction-failures-v15.md)
213
223
  before generating optimistic writes or persistence. Explicit `pending.rollback()`
214
224
  refusal leaves state unchanged and the handle pending, but releases consequences
215
- in existing v15. In the unreleased 15.3.1 candidate, automatic refusal before a
225
+ in existing v15. In 15.3.1, automatic refusal before a
216
226
  handle returns records surviving writes as committed, retains eligible undo
217
227
  history, releases consequences, and still throws. Successful automatic rollback
218
228
  reverses recorded writes. Error does not guarantee undo: never blindly retry the
@@ -220,8 +230,75 @@ whole operation or use `undo()`/`jumpTo()` for request reconciliation. Removing
220
230
  pending-created row after a confirmed edit does not necessarily clear its
221
231
  rollback dependency. Recoverable pending refusal is a v16 target, not v15 API.
222
232
 
223
- Candidate containment covers deferred write subscribers and transaction turn
233
+ 15.3.1 containment covers deferred write subscribers and transaction turn
224
234
  listeners, not all framework effects. Vue watcher failures differ between
225
235
  development and production; an enclosing Solid `batch()` can defer errors until
226
- after a handle returns. The guide lists the remaining Link, branch-key,
227
- coalesce, pending undo, ordering, notification, and retention failures.
236
+ after a handle returns. The guide lists the Link, branch-key, coalesce, pending undo, ordering,
237
+ notification, and retention failures documented for 15.3.1.
238
+
239
+
240
+ ## Collection identity and independent store instances
241
+
242
+ Declare the store structure and enhancers at construction. `entityMap()` supports
243
+ dynamic entity membership; it is not an API for installing new composite slices
244
+ with nested marker/enhancer lifecycles. Component/dialog-owned trees are valid:
245
+ create one per independent editing session, and call `destroy()` at its owner’s
246
+ teardown. A repeated entity ID is not an editing-session ID.
247
+
248
+ `setAll()` is replacement by key. Repeated incoming keys collapse to the last
249
+ value for that key, not distinct rows. Use a required stable ID where available;
250
+ validate missing IDs at ingress rather than assigning a shared fallback. Numeric
251
+ and string keys remain distinct. Do not depend on a development warning to reject
252
+ invalid input. Version 15.3.1 does not warn for non-null duplicate incoming keys.
253
+
254
+ Version 15.4.0 checks `setAll()` staging after user callbacks.
255
+ If an interceptor or ID selector changes collection membership, keys or order,
256
+ the outer replacement refuses before applying its staged writes. The callback's
257
+ already-completed writes remain. Field-only callback writes do not trigger this
258
+ structural refusal. Prefer interceptors that validate or transform input instead
259
+ of changing the same collection's topology.
260
+
261
+ In published 15.3.1, calling Link `settled()` immediately after a write can return
262
+ before the newly queued send finishes. Version 15.4.0 repairs this same-turn race:
263
+ `settled()` waits for the send queued by the preceding write. It is still not proof
264
+ of backend durability, and one generic delay is not a universal synchronization
265
+ barrier. The repair does not change the published 15.3.1 artifact.
266
+
267
+ ## Choosing ownership for editors and devices
268
+
269
+ See `docs/guides/owned-sessions.md` and the demo `/owned-sessions`. Keep shared
270
+ entities in one owned tree. Give each independent editor a unique session ID and
271
+ a local draft (native form state or a separate tree); do not key drafts only by
272
+ entity ID. Validate against the current application revision and entity lifetime
273
+ before applying. Refuse stale saves while keeping the draft, and never silently
274
+ retarget it to a replacement record. These are application policies, not kernel
275
+ MVCC or remote concurrency protection. A backend must enforce its own version
276
+ check. The demo's Apply locally does not acknowledge a server write.
277
+
278
+ Each connection owns its subscription and tree. Register cleanup and guard late
279
+ callbacks. Destroy that session when closed and all remaining sessions at owner
280
+ teardown. Keep resources out of serializable rows. Combine display with computed
281
+ reads over a registry, not copied state, root grafting or Link mirroring.
282
+
283
+ Do not invent dynamic slice APIs, draft/fork primitives, or cross-tree settlement.
284
+ Use one framework import root. Angular and Solid write `leaf.set(value)`, Vue
285
+ writes `leaf.value = value`, and React/neutral write `leaf(value)`. The demo is
286
+ Angular-specific evidence, not a cross-framework lifecycle proof.
287
+
288
+ ## Runtime observation (15.4.0)
289
+
290
+ Tooling can use `transactionLifecycleReader`, `restorationReader`,
291
+ `entityMembershipReader`, and `linkStateReader` from
292
+ `@signal-tree/kernel/internals`. Each reader exposes a current `snapshot()` and
293
+ `subscribe(listener)` for subsequent events. `stateLocationReader(tree).locate()`
294
+ maps an effect's or write's position, entity lifetime and `fieldSegments` to its
295
+ current structured location, or `undefined` when no longer reachable. Missing capability is not empty
296
+ history. These readers do not install enhancers or retain terminal history.
297
+
298
+ Use actual tree + collection + entity lifetime identity and typed keys; displayed
299
+ paths are labels and must never be split into addressing segments. Confirmation
300
+ means local settlement, never server acceptance. Link queued jobs are reconciliation
301
+ work, not a FIFO of application values. A tool recording these events owns its
302
+ bounded retention and must show interruptions, omissions and unsupported sources.
303
+ Unsubscribe on view teardown and destroy bounded-lifetime trees. See
304
+ [Runtime observation in 15.4.0](https://github.com/JBorgia/signal-tree/blob/v15.4.0/docs/guides/runtime-observation.md) for contracts and examples.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signal-tree/vue",
3
- "version": "15.3.1",
3
+ "version": "15.4.0",
4
4
  "description": "Vue observation for SignalTree.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  "llms.txt"
26
26
  ],
27
27
  "dependencies": {
28
- "@signal-tree/kernel": "15.3.1"
28
+ "@signal-tree/kernel": "15.4.0"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "tslib": "^2.0.0",