koota-kit 0.6.0 → 0.7.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.
@@ -13,6 +13,7 @@ rng ──────────────────> seedrandom + seed
13
13
  world ────────────────> koota + rng
14
14
  schedule ─────────────> world (advanceClock) + WorldHandle scratch
15
15
  eventLog ─────────────> WorldHandle scratch
16
+ coordination ─────────> koota (borrowed World, no sibling runtime dependency)
16
17
  react ────────────────> koota/react + react + world (type only)
17
18
  index ────────────────> public re-exports only (never react)
18
19
  ```
@@ -44,6 +45,25 @@ than carrying it, so one huge dt cannot cause a catch-up storm.
44
45
  `eventLog` uses the handle's scratch map so event lifetime matches world
45
46
  lifetime. It does not use a process-global queue.
46
47
 
48
+ `coordination` accepts an existing raw Koota `World` and attaches only its
49
+ own ownership and registration traits. Its immutable snapshot is a completed
50
+ metadata projection, not a second World or ECS serializer. The World retains
51
+ authority over caller entities and traits. Each binding owns an opaque marker
52
+ held on that World and registration records tagged with that marker, so it can
53
+ remove only its own records. Bindings may coexist only for disjoint entities.
54
+ `CoordinationBinding` and `CoordinationRegistration` have one identity per
55
+ module format; consumers should not mix package formats in a single Koota World.
56
+
57
+ Before a publication, coordination validates every update and produces a new
58
+ immutable view sorted by caller-authored stable ID. Koota raw trait callbacks
59
+ may see the individual mirror writes, so the completed view changes only after
60
+ all mirror writes succeed and is the sole atomic observer boundary. Producers
61
+ share a binding to form one atomic cohort; disjoint bindings are independent
62
+ cohorts. Listener callbacks cannot mutate the registry while delivery
63
+ is active. There is no event-log drain: every coordination subscriber is
64
+ independent. Entity destruction is detected by `World.has` and becomes a
65
+ published removal only when the caller explicitly invokes `prune`.
66
+
47
67
  `react` is the only module that imports React, through `koota/react`. It is
48
68
  reachable only from the `koota-kit/react` subpath: `index` does not re-export it,
49
69
  and `react` is an optional peer dependency, so an application that never imports
@@ -70,6 +90,10 @@ it reaches `react` or `koota/react`.
70
90
  delivered at any frame rate runs the same steps in the same order, as long
71
91
  as no single tick owes more than `maxSteps` (beyond that, the excess is
72
92
  dropped by design, so a one-second frame and sixty 1/60 s frames differ).
93
+ 11. A coordination snapshot publishes only fully validated completed metadata;
94
+ failed batch preparation leaves the prior projection visible.
95
+ 12. Coordination disposal never destroys or resets a caller-owned World,
96
+ entity, caller trait, provider, or geometry buffer.
73
97
 
74
98
  ## Performance choices
75
99
 
@@ -78,6 +102,9 @@ it reaches `react` or `koota/react`.
78
102
  through JSON.
79
103
  - Event logs allocate on first push, leave scratch untouched for empty reads,
80
104
  truncate in place on drain, and expose a non-allocating `size` operation.
105
+ - Coordination snapshots are rebuilt only after a completed registration,
106
+ publication, removal, or explicit prune. Equal completed revisions retain
107
+ the prior snapshot identity and do not notify subscribers.
81
108
  - The package is not bundled. ESM and CommonJS outputs preserve small subpath
82
109
  entry points and let application bundlers tree-shake normally.
83
110
 
@@ -92,3 +119,7 @@ it reaches `react` or `koota/react`.
92
119
  passes, so the application still owns stable domain keys.
93
120
  - No multi-consumer queue semantics: publish separate logs when two systems
94
121
  must independently consume the same fact.
122
+ - No geometry, broadphase, exact-query, source/provenance, topology, unit,
123
+ frame, pose, renderer, React, or AI adapter: those are later explicit
124
+ producer/query contracts. A coordination revision is not evidence that a
125
+ provider's buffers are immutable or fresh.
@@ -20,8 +20,9 @@ Sourcey site.
20
20
  Branch from `main`, make a focused Conventional Commit, open an upstream pull
21
21
  request, and keep the branch current by merging `main` into it when necessary.
22
22
  The protected path uses automated checks rather than a routine human approval;
23
- merge commits preserve the constituent history. Do not hand-edit versions or
24
- `CHANGELOG.md`: Release Please owns them.
23
+ merge commits preserve the constituent history and GitHub release notes list
24
+ each merged pull request once. Do not hand-edit versions or `CHANGELOG.md`:
25
+ Release Please owns them.
25
26
 
26
27
  Read the repository [contribution guide](https://github.com/jbcom/koota-kit/blob/main/CONTRIBUTING.md)
27
28
  and [agent instructions](https://github.com/jbcom/koota-kit/blob/main/AGENTS.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koota-kit",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Deterministic Koota simulation conventions: world lifecycle, dual RNG streams, safe object traits, and world-scoped event logs.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -83,6 +83,16 @@
83
83
  "default": "./dist/cjs/eventLog.cjs"
84
84
  }
85
85
  },
86
+ "./coordination": {
87
+ "import": {
88
+ "types": "./dist/esm/coordination.d.ts",
89
+ "default": "./dist/esm/coordination.js"
90
+ },
91
+ "require": {
92
+ "types": "./dist/cjs/coordination.d.cts",
93
+ "default": "./dist/cjs/coordination.cjs"
94
+ }
95
+ },
86
96
  "./react": {
87
97
  "import": {
88
98
  "types": "./dist/esm/react.d.ts",
@@ -204,6 +214,9 @@
204
214
  "eventLog": [
205
215
  "./dist/esm/eventLog.d.ts"
206
216
  ],
217
+ "coordination": [
218
+ "./dist/esm/coordination.d.ts"
219
+ ],
207
220
  "react": [
208
221
  "./dist/esm/react.d.ts"
209
222
  ],