@oasys/oecs 0.5.2 → 0.5.4

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 (189) hide show
  1. package/CHANGELOG.md +208 -14
  2. package/README.md +198 -145
  3. package/dist/core/ecs/access_check.d.cts +3 -3
  4. package/dist/core/ecs/access_check.d.ts +3 -3
  5. package/dist/core/ecs/archetype.d.cts +103 -43
  6. package/dist/core/ecs/archetype.d.ts +103 -43
  7. package/dist/core/ecs/archetype.d.ts.map +1 -1
  8. package/dist/core/ecs/archetype_graph.d.cts +8 -8
  9. package/dist/core/ecs/archetype_graph.d.ts +8 -8
  10. package/dist/core/ecs/archetype_graph.d.ts.map +1 -1
  11. package/dist/core/ecs/builtin_relations.d.cts +1 -1
  12. package/dist/core/ecs/builtin_relations.d.ts +1 -1
  13. package/dist/core/ecs/command_log.d.cts +4 -4
  14. package/dist/core/ecs/command_log.d.ts +4 -4
  15. package/dist/core/ecs/command_log.d.ts.map +1 -1
  16. package/dist/core/ecs/component.d.cts +4 -4
  17. package/dist/core/ecs/component.d.ts +4 -4
  18. package/dist/core/ecs/deferred_commands.d.cts +1 -1
  19. package/dist/core/ecs/deferred_commands.d.ts +1 -1
  20. package/dist/core/ecs/deferred_commands.d.ts.map +1 -1
  21. package/dist/core/ecs/ecs.d.cts +85 -43
  22. package/dist/core/ecs/ecs.d.ts +85 -43
  23. package/dist/core/ecs/ecs.d.ts.map +1 -1
  24. package/dist/core/ecs/ecs_memory.d.cts +15 -15
  25. package/dist/core/ecs/ecs_memory.d.ts +15 -15
  26. package/dist/core/ecs/ecs_memory.d.ts.map +1 -1
  27. package/dist/core/ecs/entity_allocator.d.cts +6 -6
  28. package/dist/core/ecs/entity_allocator.d.ts +6 -6
  29. package/dist/core/ecs/entity_allocator.d.ts.map +1 -1
  30. package/dist/core/ecs/event.d.cts +2 -2
  31. package/dist/core/ecs/event.d.ts +2 -2
  32. package/dist/core/ecs/event_registry.d.cts +1 -1
  33. package/dist/core/ecs/event_registry.d.ts +1 -1
  34. package/dist/core/ecs/event_registry.d.ts.map +1 -1
  35. package/dist/core/ecs/facades.d.cts +15 -15
  36. package/dist/core/ecs/facades.d.ts +15 -15
  37. package/dist/core/ecs/facades.d.ts.map +1 -1
  38. package/dist/core/ecs/frame_trace.d.cts +2 -2
  39. package/dist/core/ecs/frame_trace.d.ts +2 -2
  40. package/dist/core/ecs/host_commands.d.cts +12 -12
  41. package/dist/core/ecs/host_commands.d.ts +12 -12
  42. package/dist/core/ecs/host_commands.d.ts.map +1 -1
  43. package/dist/core/ecs/index.d.cts +1 -1
  44. package/dist/core/ecs/index.d.ts +1 -1
  45. package/dist/core/ecs/index.d.ts.map +1 -1
  46. package/dist/core/ecs/observer.d.cts +9 -9
  47. package/dist/core/ecs/observer.d.ts +9 -9
  48. package/dist/core/ecs/observer.d.ts.map +1 -1
  49. package/dist/core/ecs/query.d.cts +91 -70
  50. package/dist/core/ecs/query.d.ts +91 -70
  51. package/dist/core/ecs/query.d.ts.map +1 -1
  52. package/dist/core/ecs/ref.d.cts +53 -1
  53. package/dist/core/ecs/ref.d.ts +53 -1
  54. package/dist/core/ecs/ref.d.ts.map +1 -1
  55. package/dist/core/ecs/relation.d.cts +15 -15
  56. package/dist/core/ecs/relation.d.ts +15 -15
  57. package/dist/core/ecs/relation.d.ts.map +1 -1
  58. package/dist/core/ecs/relation_service.d.cts +14 -14
  59. package/dist/core/ecs/relation_service.d.ts +14 -14
  60. package/dist/core/ecs/relation_service.d.ts.map +1 -1
  61. package/dist/core/ecs/resource.d.cts +1 -1
  62. package/dist/core/ecs/resource.d.ts +1 -1
  63. package/dist/core/ecs/resource_registry.d.cts +2 -2
  64. package/dist/core/ecs/resource_registry.d.ts +2 -2
  65. package/dist/core/ecs/resume.d.cts +3 -3
  66. package/dist/core/ecs/resume.d.ts +3 -3
  67. package/dist/core/ecs/resume.d.ts.map +1 -1
  68. package/dist/core/ecs/schedule.d.cts +22 -9
  69. package/dist/core/ecs/schedule.d.ts +22 -9
  70. package/dist/core/ecs/schedule.d.ts.map +1 -1
  71. package/dist/core/ecs/snapshot_service.d.cts +3 -3
  72. package/dist/core/ecs/snapshot_service.d.ts +3 -3
  73. package/dist/core/ecs/sparse_store.d.cts +6 -6
  74. package/dist/core/ecs/sparse_store.d.ts +6 -6
  75. package/dist/core/ecs/sparse_store.d.ts.map +1 -1
  76. package/dist/core/ecs/store.d.cts +189 -110
  77. package/dist/core/ecs/store.d.ts +189 -110
  78. package/dist/core/ecs/store.d.ts.map +1 -1
  79. package/dist/core/ecs/store_layout_listener.d.cts +2 -2
  80. package/dist/core/ecs/store_layout_listener.d.ts +2 -2
  81. package/dist/core/ecs/system.d.cts +8 -8
  82. package/dist/core/ecs/system.d.ts +8 -8
  83. package/dist/core/ecs/system.d.ts.map +1 -1
  84. package/dist/core/ecs/utils/error.d.cts +7 -0
  85. package/dist/core/ecs/utils/error.d.ts +7 -0
  86. package/dist/core/ecs/utils/error.d.ts.map +1 -1
  87. package/dist/core/store/action_ring.d.cts +7 -8
  88. package/dist/core/store/action_ring.d.ts +7 -8
  89. package/dist/core/store/action_ring.d.ts.map +1 -1
  90. package/dist/core/store/allocator.d.cts +58 -35
  91. package/dist/core/store/allocator.d.ts +58 -35
  92. package/dist/core/store/allocator.d.ts.map +1 -1
  93. package/dist/core/store/buffer_backed_column.d.cts +5 -6
  94. package/dist/core/store/buffer_backed_column.d.ts +5 -6
  95. package/dist/core/store/buffer_backed_column.d.ts.map +1 -1
  96. package/dist/core/store/column_store.d.cts +23 -23
  97. package/dist/core/store/column_store.d.ts +23 -23
  98. package/dist/core/store/column_store.d.ts.map +1 -1
  99. package/dist/core/store/command_dispatch.d.cts +1 -1
  100. package/dist/core/store/command_dispatch.d.ts +1 -1
  101. package/dist/core/store/command_ring.d.cts +6 -7
  102. package/dist/core/store/command_ring.d.ts +6 -7
  103. package/dist/core/store/command_ring.d.ts.map +1 -1
  104. package/dist/core/store/descriptor.d.cts +2 -2
  105. package/dist/core/store/descriptor.d.ts +2 -2
  106. package/dist/core/store/entity_index.d.cts +3 -3
  107. package/dist/core/store/entity_index.d.ts +3 -3
  108. package/dist/core/store/event_ring.d.cts +7 -7
  109. package/dist/core/store/event_ring.d.ts +7 -7
  110. package/dist/core/store/extend.d.cts +2 -2
  111. package/dist/core/store/extend.d.ts +2 -2
  112. package/dist/core/store/extend.d.ts.map +1 -1
  113. package/dist/core/store/grow.d.cts +1 -1
  114. package/dist/core/store/grow.d.ts +1 -1
  115. package/dist/core/store/grow.d.ts.map +1 -1
  116. package/dist/core/store/header.d.cts +9 -9
  117. package/dist/core/store/header.d.ts +9 -9
  118. package/dist/core/store/header.d.ts.map +1 -1
  119. package/dist/core/store/layout_ops.d.cts +25 -7
  120. package/dist/core/store/layout_ops.d.ts +25 -7
  121. package/dist/core/store/layout_ops.d.ts.map +1 -1
  122. package/dist/core/store/state_hash.d.cts +3 -3
  123. package/dist/core/store/state_hash.d.ts +3 -3
  124. package/dist/extensions/editor/editor.d.cts +4 -4
  125. package/dist/extensions/editor/editor.d.ts +4 -4
  126. package/dist/extensions/editor/editor.d.ts.map +1 -1
  127. package/dist/extensions/editor/field_handle.d.cts +1 -1
  128. package/dist/extensions/editor/field_handle.d.ts +1 -1
  129. package/dist/extensions/editor/index.d.cts +2 -2
  130. package/dist/extensions/editor/index.d.ts +2 -2
  131. package/dist/extensions/editor/index.development.js +4 -4
  132. package/dist/extensions/editor/index.js +4 -4
  133. package/dist/extensions/reactive/ecs_sync.d.cts +4 -4
  134. package/dist/extensions/reactive/ecs_sync.d.ts +4 -4
  135. package/dist/extensions/reactive/index.d.cts +4 -4
  136. package/dist/extensions/reactive/index.d.ts +4 -4
  137. package/dist/extensions/reactive/index.development.js +3 -3
  138. package/dist/extensions/reactive/index.js +3 -3
  139. package/dist/extensions/solid/index.d.cts +1 -1
  140. package/dist/extensions/solid/index.d.ts +1 -1
  141. package/dist/extensions/solid/index.development.js +1 -1
  142. package/dist/extensions/solid/index.js +1 -1
  143. package/dist/extensions/solid/kernel_solid.d.cts +1 -1
  144. package/dist/extensions/solid/kernel_solid.d.ts +1 -1
  145. package/dist/extensions/solid/kernel_solid.d.ts.map +1 -1
  146. package/dist/{host_commands-BI8pEmjH.js → host_commands-BlR3oZ3x.js} +473 -393
  147. package/dist/host_commands-C2cpU3yC.cjs +1 -0
  148. package/dist/index.cjs +1 -1
  149. package/dist/index.d.cts +2 -2
  150. package/dist/index.d.ts +2 -2
  151. package/dist/index.d.ts.map +1 -1
  152. package/dist/index.development.cjs +1 -1
  153. package/dist/index.development.js +3345 -2963
  154. package/dist/index.js +1496 -1131
  155. package/dist/{internal-BMDgWZbt.js → internal-BoxWl4dG.js} +410 -330
  156. package/dist/internal-CGBEwfeB.cjs +2 -0
  157. package/dist/internal.cjs +1 -1
  158. package/dist/internal.development.cjs +1 -1
  159. package/dist/internal.development.js +1 -1
  160. package/dist/internal.js +1 -1
  161. package/dist/primitives.development.js +1 -1
  162. package/dist/primitives.js +1 -1
  163. package/dist/reactive/index.d.cts +2 -2
  164. package/dist/reactive/index.d.ts +2 -2
  165. package/dist/reactive/index.development.js +1 -1
  166. package/dist/reactive/index.js +1 -1
  167. package/dist/reactive/kernel.d.cts +5 -5
  168. package/dist/reactive/kernel.d.ts +5 -5
  169. package/dist/reactive/shallow.d.cts +1 -1
  170. package/dist/reactive/shallow.d.ts +1 -1
  171. package/dist/{shallow-DfnAm9vG.js → shallow-Bs39EPh1.js} +1 -1
  172. package/dist/{shallow-9S1pY_Iw.js → shallow-CiFC70Dz.js} +1 -1
  173. package/dist/{shared-BU1Cd40h.js → shared-B4v0L1cw.js} +41 -35
  174. package/dist/shared-DU78k0pU.cjs +1 -0
  175. package/dist/shared.cjs +1 -1
  176. package/dist/shared.d.cts +1 -1
  177. package/dist/shared.d.ts +1 -1
  178. package/dist/shared.development.cjs +1 -1
  179. package/dist/shared.development.js +1 -1
  180. package/dist/shared.js +1 -1
  181. package/dist/type_primitives/typed_arrays/typed_arrays.d.cts +2 -2
  182. package/dist/type_primitives/typed_arrays/typed_arrays.d.ts +2 -2
  183. package/dist/{typed_arrays-BcXcnzB4.js → typed_arrays-DIVwVy5_.js} +1 -1
  184. package/dist/version.d.cts +2 -2
  185. package/dist/version.d.ts +2 -2
  186. package/package.json +1 -1
  187. package/dist/host_commands-CxhpzMx9.cjs +0 -1
  188. package/dist/internal-LiTSB_tG.cjs +0 -2
  189. package/dist/shared-BymrGTyR.cjs +0 -1
@@ -7,7 +7,7 @@ import { SCHEDULE, SystemEntry, SystemSet, SystemSetConfig } from './schedule.js
7
7
  import { Archetype, ArchetypeID } from './archetype.js';
8
8
  import { SystemContext, Query, QueryBuilder, QueryCache, QueryResolver } from './query.js';
9
9
  import { EntityID } from './entity.js';
10
- import { ReadonlyComponentRef } from './ref.js';
10
+ import { ComponentCursor, ReadonlyComponentCursor, ReadonlyComponentRef } from './ref.js';
11
11
  import { ComponentDef, ComponentHandle, ComponentRegisterOptions, ComponentSchema, CompleteFieldValues, Bundle, BundleOrDef, StrictBundles, DefsOf } from './component.js';
12
12
  import { SparseComponentDef, SparseComponentID } from './sparse_store.js';
13
13
  import { RelationDef } from './relation.js';
@@ -23,41 +23,41 @@ export interface ECSOptions {
23
23
  * dropped-ordering-edge warning). Defaults to `console.warn`. Mirrors the
24
24
  * `FrameTraceSink` seam's injectable style — no global logger. */
25
25
  onWarn?: (message: string) => void;
26
- /** How the world's memory is sized and backed (#682) — the single
26
+ /** How the world's memory is sized and backed — the single
27
27
  * sizing surface, replacing the pre-release `initialCapacity` +
28
28
  * `bufferAllocator` pair. Express intent through exactly one arm:
29
29
  * `{ budget: { entities } }` (derive everything), `{ maxBytes }`
30
30
  * (explicit cap), `{ wasm: { memory } | { maximumPages } }` (the SAB
31
31
  * IS a WebAssembly.Memory — zero-copy with a WASM `ComputeBackend`), or
32
- * `{ allocator }` (expert escape hatch, in-place-typed per ADR-0008).
32
+ * `{ allocator }` (expert escape hatch, in-place-typed).
33
33
  * Omitted ⇒ growable backing with a 256 MiB cap and 1024-row columns.
34
34
  * The resolved plan is exposed as `ECS.memoryPlan`. */
35
35
  memory?: ECSMemoryOptions;
36
- /** Consumer-declared SAB regions (#623), forwarded to `Store`. Each
36
+ /** Consumer-declared SAB regions, forwarded to `Store`. Each
37
37
  * `StoreRegionSpec` carries an opaque `region_id`, a precomputed byte size,
38
38
  * and an `init` closure; the engine lays them out generically and exposes
39
39
  * them via `regionHandle(id)` / `regionOffset(id)`. A game (e.g.
40
40
  * `@internal/sim`'s region specs) supplies these — the engine ships no
41
41
  * game regions of its own. Replaces the eight game-named region options
42
42
  * (`terrain_map_radius`, `spatial_grid_*`, `army_*`, `flow_field_*`,
43
- * `actionRingCapacitySlots`) the ECS used to carry. (ADR-0018.) */
43
+ * `actionRingCapacitySlots`) the ECS used to carry. */
44
44
  regions?: readonly StoreRegionSpec[];
45
- /** Byte size of the opt-in sim-bindings region (#625), forwarded to `Store`.
45
+ /** Byte size of the opt-in sim-bindings region, forwarded to `Store`.
46
46
  * A consumer that attaches a WASM `ComputeBackend` passes its own size — for
47
47
  * this game, `@internal/sim`'s `SIM_BINDINGS_BYTES` (computed from the binding
48
48
  * manifest) — so the host can publish the `(component_id, field_id)` IDs the
49
49
  * accelerated systems read. Omitted / 0 ⇒ no region: a pure-TS world pays
50
50
  * nothing for the WASM seam. The size is a runtime input, not an engine ABI
51
- * constant, since #625 de-welded it from the generated ABI. */
51
+ * constant; it is de-welded from the generated ABI. */
52
52
  bindingsRegionBytes?: number;
53
- /** Opt into the **determinism surface** (#626 / ADR-0020), forwarded to
53
+ /** Opt into the **determinism surface**, forwarded to
54
54
  * `Store`. Default `false`. When `false`, the canonical-ordering methods
55
55
  * (`stateHash`, `snapshotSparse`, `restoreSparse`) throw
56
56
  * `DETERMINISM_DISABLED`; when `true`, today's replay/hash behavior is
57
57
  * reproduced bit-for-bit. Determinism is the implementer's choice — our
58
58
  * server match opts in (replay verification), the client stays off (it rolls
59
59
  * back via diffs, not re-sim). The flag gates ONLY that surface: memory-safety
60
- * invariants (the in-place SAB allocator, ADR-0008) and the `enabled_count`
60
+ * invariants (the in-place SAB allocator) and the `enabled_count`
61
61
  * partition are always-on regardless. */
62
62
  deterministic?: boolean;
63
63
  }
@@ -65,7 +65,7 @@ export declare class ECS implements QueryResolver {
65
65
  private readonly store;
66
66
  private readonly schedule;
67
67
  private readonly ctx;
68
- /** Component observers (#517 §1 / ADR-0013). Inert until `observe(...)` is
68
+ /** Component observers. Inert until `observe(...)` is
69
69
  * called — the structural-flush fast path is byte-for-byte unchanged. */
70
70
  private readonly _observers;
71
71
  /** Relations: register/add/remove/has, wildcard + traversal reads,
@@ -93,7 +93,7 @@ export declare class ECS implements QueryResolver {
93
93
  private readonly _layoutSubscribers;
94
94
  private _backend;
95
95
  private readonly _memory;
96
- /** What `ECSOptions.memory` resolved to (#682): backing allocator kind,
96
+ /** What `ECSOptions.memory` resolved to: backing allocator kind,
97
97
  * column capacity, entity-index reservation, byte cap, and a
98
98
  * human-readable derivation trace. Diagnostics surface — log it when
99
99
  * sizing questions come up instead of reverse-engineering the SAB. */
@@ -121,7 +121,7 @@ export declare class ECS implements QueryResolver {
121
121
  * code. A `ComputeBackend` is subscribed automatically by `attachBackend`,
122
122
  * so most consumers call that rather than this directly. */
123
123
  onStoreLayoutPublished(listener: StoreLayoutListener): () => void;
124
- /** Attach an opt-in compute backend (#622). Default is none: a bare `ECS`
124
+ /** Attach an opt-in compute backend. Default is none: a bare `ECS`
125
125
  * runs pure-TS systems and the schedule's dispatch is byte-for-byte the
126
126
  * no-backend path. Once attached, a scheduled system carrying a
127
127
  * `backendHandle` (its `SystemConfig`) is executed via `backend.run(handle)`
@@ -139,13 +139,13 @@ export declare class ECS implements QueryResolver {
139
139
  get fixedTimestep(): number;
140
140
  set fixedTimestep(value: number);
141
141
  get fixedAlpha(): number;
142
- /** Attach (or detach with `null`) a per-world frame-trace sink (ADR-0030):
142
+ /** Attach (or detach with `null`) a per-world frame-trace sink:
143
143
  * the engine then fires structured `FrameTraceSink` events at each system,
144
144
  * flush, command, observer firing, and event during `update()`, so a consumer
145
145
  * can reconstruct exactly what travelled through the ECS each frame. The sink
146
146
  * also receives a `phaseBoundary(phase)` at each phase's post-flush settle
147
147
  * point — the safe seam to read `stateHash()` between phases of one frame and
148
- * bisect a divergence to the exact phase (#797 / ADR-0032). The seam is
148
+ * bisect a divergence to the exact phase. The seam is
149
149
  * `DEV`-gated end to end — in a production build this setter keeps an empty
150
150
  * body and the world never retains a sink. The sink only observes; it does not
151
151
  * perturb `stateHash`, ordering, or any behaviour. */
@@ -153,8 +153,8 @@ export declare class ECS implements QueryResolver {
153
153
  /**
154
154
  * Register a dense component and get back its typed handle. Record syntax
155
155
  * gives per-field type control; the array shorthand types every field the
156
- * same (default `"f64"` — rejected on a `{ deterministic: true }` world
157
- * (#777), pass an explicit integer type there). An empty schema `{}` is a
156
+ * same (default `"f64"` — rejected on a `{ deterministic: true }` world,
157
+ * pass an explicit integer type there). An empty schema `{}` is a
158
158
  * tag. `opts.name` labels dev-mode diagnostics (`'Pos' (component 5)`
159
159
  * instead of `component 5`) — diagnostic only, no behavioural effect.
160
160
  *
@@ -230,7 +230,7 @@ export declare class ECS implements QueryResolver {
230
230
  *
231
231
  * `_updating` scopes the guard to THIS world: the accessCheck slot is
232
232
  * process-global, so without it a system of world A mutating world B (a
233
- * supported #785 pattern — B is not mid-iteration) would false-throw. */
233
+ * supported pattern — B is not mid-iteration) would false-throw. */
234
234
  private _assertHostMutationOutsideSystem;
235
235
  /** Immediately destroy an entity — `ecs.despawn(e); ecs.isAlive(e)` is
236
236
  * `false` on the next line, matching the immediacy of every other host
@@ -273,7 +273,7 @@ export declare class ECS implements QueryResolver {
273
273
  * O(columns) via TypedArray.set() instead of O(N×columns).
274
274
  *
275
275
  * Takes an `ArchetypeID` (from `ArchetypeView.id`) rather than a concrete
276
- * `Archetype` — the concrete type is internal (issue #378).
276
+ * `Archetype` — the concrete type is internal.
277
277
  */
278
278
  batchAddComponent(src: ArchetypeID, def: ComponentDef<Record<string, never>>): this;
279
279
  batchAddComponent<S extends ComponentSchema>(src: ArchetypeID, def: ComponentDef<S>, values: CompleteFieldValues<S>): this;
@@ -285,7 +285,7 @@ export declare class ECS implements QueryResolver {
285
285
  */
286
286
  batchRemoveComponent(src: ArchetypeID, def: ComponentDef): this;
287
287
  getField<S extends ComponentSchema>(entityId: EntityID, def: ComponentDef<S>, field: string & keyof S): number;
288
- /** Host-side parity with `SystemContext.refRead` (POLISH_AUDIT M7): a
288
+ /** Host-side parity with `SystemContext.refRead`: a
289
289
  * read-only whole-component view for tooling/tests, instead of reading
290
290
  * field-by-field. Same advisory-`readonly` semantics as the ctx variant;
291
291
  * no `_changedTick` bump. Dev-throws on a dead entity, or when the entity
@@ -298,7 +298,42 @@ export declare class ECS implements QueryResolver {
298
298
  * only valid until the next structural mutation; treat it as an immediate
299
299
  * single-expression read and re-create it after any structural change. */
300
300
  refRead<S extends ComponentSchema>(def: ComponentDef<S>, entityId: EntityID): ReadonlyComponentRef<S>;
301
- /** Total sibling of {@link getField} (POLISH_AUDIT #9): `undefined` when the
301
+ /**
302
+ * A re-pointable single-entity cursor over `def` — the by-id sweep accessor.
303
+ *
304
+ * `refRead` resolves an entity one time, and each field after that is almost
305
+ * free. But it allocates one accessor for each entity. That allocation is the
306
+ * largest part of the cost of a read of one field by id, because to make an
307
+ * accessor and to read through it costs much more than to move an accessor
308
+ * that exists. In a loop over a list of entities, the allocation is not
309
+ * necessary: the code discards each accessor, and it then makes an equal
310
+ * accessor for the next entity. You make a cursor one time, and you then
311
+ * point it again:
312
+ *
313
+ * const p = ecs.cursor(Pos);
314
+ * for (let i = 0; i < ids.length; i++) {
315
+ * p.at(ids[i]);
316
+ * p.x += p.y;
317
+ * }
318
+ *
319
+ * Reach for it when you touch **many entities** by id; reach for `refRead` /
320
+ * `ref` for a single entity, and for `eachChunk` whenever a query can express
321
+ * the set. A column walk resolves nothing for each row, so it stays quicker
322
+ * than a cursor — a cursor removes the allocation, not the resolution.
323
+ *
324
+ * Mutable — every `at()` stamps the component's change tick, like `ctx.ref`.
325
+ * See `cursorRead` for the read-only variant.
326
+ *
327
+ * **Staleness:** safer than a held ref, because `at()` re-resolves the
328
+ * archetype and row each time — a structural mutation between two `at()` calls
329
+ * cannot make it read the wrong entity. Only the window between one `at()` and
330
+ * the field accesses following it must be free of structural mutation.
331
+ */
332
+ cursor<S extends ComponentSchema>(def: ComponentDef<S>): ComponentCursor<S>;
333
+ /** Read-only {@link cursor}: no change-tick stamp on `at()`. Advisory only —
334
+ * same caveat as `refRead` (the setters exist on the shared prototype). */
335
+ cursorRead<S extends ComponentSchema>(def: ComponentDef<S>): ReadonlyComponentCursor<S>;
336
+ /** Total sibling of {@link getField}: `undefined` when the
302
337
  * entity is dead or doesn't hold the component, instead of a dev throw /
303
338
  * prod garbage read. The safe way to probe-and-read in one call:
304
339
  * `ecs.tryGetField(e, Health, "current") ?? 0`. */
@@ -327,7 +362,16 @@ export declare class ECS implements QueryResolver {
327
362
  */
328
363
  query<T extends ComponentDef[]>(...defs: T): Query<T>;
329
364
  _nextQueryId(): number;
330
- /** QueryResolver implementation — creates or retrieves a cached Query. */
365
+ /** QueryResolver implementation — creates or retrieves a cached Query.
366
+ *
367
+ * **Mask ownership: borrowed.** The three mask arguments are read, never
368
+ * retained — the mint path copies each one into the `Query`, into the dedup
369
+ * entry, and (via `Store.registerQuery`) into the registered-query record.
370
+ * So callers may pass a scratch mask they intend to reuse (`ecs.query`) or
371
+ * a live mask they still own (`Query.and` / `.without` / `.anyOf` pass
372
+ * `this._include` etc.). Do NOT add a caller-side `.copy()` "for safety":
373
+ * on the cache-hit path that is a per-call BitSet + `number[]` allocation
374
+ * for nothing. */
331
375
  _resolveQuery(include: BitSet, exclude: BitSet | null, anyOf: BitSet | null, defs: readonly ComponentDef[]): Query<any>;
332
376
  /**
333
377
  * Register a system and get its scheduling handle. The config form is the
@@ -392,7 +436,7 @@ export declare class ECS implements QueryResolver {
392
436
  * whole set in one `extendColumnStore` call. Observers carry the same
393
437
  * access shape systems do (a synthesized `SystemDescriptor`), so an
394
438
  * observer that spawns/transitions gets its target archetype prewarmed
395
- * too rather than first-touching lazily mid-tick (#768). Exposed as
439
+ * too rather than first-touching lazily mid-tick. Exposed as
396
440
  * `private` because the only caller is `startup()`; visible to tests via
397
441
  * the `archetype_count` delta on the public ECS facade. */
398
442
  private prewarmArchetypes;
@@ -414,7 +458,7 @@ export declare class ECS implements QueryResolver {
414
458
  */
415
459
  update(dt: number): void;
416
460
  dispose(): void;
417
- /** Register an archetype template (#462). Resolves the component set +
461
+ /** Register an archetype template. Resolves the component set +
418
462
  * default field values to a target archetype once (creating it if absent —
419
463
  * fits the prewarm model), so later `spawn` / `spawnMany` calls land
420
464
  * entities directly in that archetype with **zero archetype transitions**.
@@ -428,18 +472,17 @@ export declare class ECS implements QueryResolver {
428
472
  * store's entry shape, so it lives here with the other real logic, not in the
429
473
  * delegation band. The big win is multi-component entities and bulk spawns; a
430
474
  * single-component spawn is no faster than `spawn` + `addComponent`, which
431
- * already bump-allocates a fresh entity into the target archetype. See
432
- * ADR-0010. */
475
+ * already bump-allocates a fresh entity into the target archetype. */
433
476
  template<Items extends readonly BundleOrDef[]>(...items: StrictBundles<Items>): Template<DefsOf<Items>>;
434
477
  /** Resolve a consumer-declared SAB region's byte offset by `region_id`, or
435
- * 0 when absent. Generic, de-gamed replacement (#623) for the removed
478
+ * 0 when absent. Generic, de-gamed replacement for the removed
436
479
  * game-named accessors; pair with the consumer's own region module to
437
480
  * materialise a typed view. Delegates to `Store.regionOffset`. */
438
481
  regionOffset(regionId: number): number;
439
482
  /** A handle (`{ buffer, view, offset, bytes }`) to a consumer-declared SAB
440
483
  * region resolved by `region_id`, or `null` when absent. A consumer's
441
484
  * region module builds a TypedArray view over the region's span from this.
442
- * Re-fetch after a SAB grow. Delegates to `Store.regionHandle`. (#623) */
485
+ * Re-fetch after a SAB grow. Delegates to `Store.regionHandle`. */
443
486
  regionHandle(regionId: number): ColumnStoreRegionHandle | null;
444
487
  /** Look up the field index a component reserves for `fieldName`. The
445
488
  * index is assigned by `registerComponent` in insertion order and is
@@ -451,18 +494,17 @@ export declare class ECS implements QueryResolver {
451
494
  * A WASM system that drains events from the event ring as
452
495
  * `(archId, row, …)` payloads uses this to convert the (archId, row)
453
496
  * pair into the `EntityID` the `ctx.emit(...)` API expects.
454
- * Throws if the (archId, row) pair is out of range. (#250 / Phase 4
455
- * PR 4D) */
497
+ * Throws if the (archId, row) pair is out of range. */
456
498
  entityIdAtRow(archetypeId: number, row: number): EntityID;
457
499
  /** The single SAB backing every archetype's column views. Exposed for
458
500
  * snapshot/restore, `columnStoreStateHash`-based determinism checks, and
459
- * Phase 2+ WASM/worker hand-off paths. Mutation flows through the
501
+ * WASM/worker hand-off paths. Mutation flows through the
460
502
  * usual `addComponent` / `removeComponent` / `flush` APIs; readers
461
503
  * that hold a column view across a grow must consult
462
- * `header.view_stamp` to detect a republish (#171 §8.1). */
504
+ * `header.view_stamp` to detect a republish. */
463
505
  get columnStore(): ColumnStore;
464
506
  /** Count of live archetypes (including the empty one). Surfaces the
465
- * Store-side `archetype_count` so Phase C tests can assert the
507
+ * Store-side `archetype_count` so tests can assert the
466
508
  * pre-warmed closure was materialised; equally useful for diagnostics. */
467
509
  get archetypeCount(): number;
468
510
  registerTag(): ComponentDef<Record<string, never>>;
@@ -484,24 +526,24 @@ export declare class ECS implements QueryResolver {
484
526
  /** Current ECS write tick — the tick `eachChunk` stamps via `cols.mut` (§eachChunk). */
485
527
  _getCurrentTick(): number;
486
528
  _getQueryDirtyEpoch(): number;
487
- /** QueryResolver implementation — sparse-membership match path (#469). */
529
+ /** QueryResolver implementation — sparse-membership match path. */
488
530
  _forEachSparseMatch(include: BitSet, exclude: BitSet | null, anyOf: BitSet | null, sparseInclude: readonly SparseComponentID[], sparseExclude: readonly SparseComponentID[], denseArchetypes: readonly Archetype[], cb: (entityId: EntityID) => void, includeDisabled: boolean): void;
489
531
  /** QueryResolver implementation — backing sparse id of a relation, for the
490
- * `(R, *)` wildcard term (`Query.withRelation`, #579). */
532
+ * `(R, *)` wildcard term (`Query.withRelation`). */
491
533
  _relationBackingSparseId(def: RelationDef): SparseComponentID;
492
- /** QueryResolver implementation — `(*, T)` wildcard match path (#579). */
534
+ /** QueryResolver implementation — `(*, T)` wildcard match path. */
493
535
  _forEachRelationTargetMatch(target: EntityID, include: BitSet, exclude: BitSet | null, anyOf: BitSet | null, sparseInclude: readonly SparseComponentID[], sparseExclude: readonly SparseComponentID[], includeDisabled: boolean, cb: (entityId: EntityID) => void): void;
494
- /** QueryResolver implementation — depth-ordered hierarchy match path (#581). */
536
+ /** QueryResolver implementation — depth-ordered hierarchy match path. */
495
537
  _forEachHierarchyMatch(include: BitSet, exclude: BitSet | null, anyOf: BitSet | null, sparseInclude: readonly SparseComponentID[], sparseExclude: readonly SparseComponentID[], denseArchetypes: readonly Archetype[], relation: RelationDef, maxDepth: number, includeDisabled: boolean, cb: (entityId: EntityID) => void): void;
496
538
  addSystems(label: SCHEDULE, ...entries: (SystemDescriptor | SystemEntry)[]): this;
497
539
  /**
498
- * Configure a `SystemSet` (#576) — the shared run condition and/or ordering
540
+ * Configure a `SystemSet` — the shared run condition and/or ordering
499
541
  * every member inherits. Additive and order-independent with respect to
500
542
  * `addSystems`: see `Schedule.configureSet`. Returns `this` to chain.
501
543
  */
502
544
  configureSet(set: SystemSet, config: SystemSetConfig): this;
503
545
  /**
504
- * Register a per-component observer (#517 §1 / ADR-0013). Reactions that were
546
+ * Register a per-component observer. Reactions that were
505
547
  * hand-polled every tick — "on `Death` added → spawn corpse", "on `HexPos`
506
548
  * set → mark the spatial index" — become declarative.
507
549
  *
@@ -511,8 +553,8 @@ export declare class ECS implements QueryResolver {
511
553
  * cascades settle. Determinism: a `stateHash` replay reproduces regardless
512
554
  * of the order ops were queued.
513
555
  * - **`onDisable` / `onEnable`** `(eid, ctx)` fire at the same flush boundary
514
- * when an entity carrying the component is *disabled* / *enabled* (#577,
515
- * ADR-0023), once per net transition, for every component the entity carries
556
+ * when an entity carrying the component is *disabled* / *enabled*, once
557
+ * per net transition, for every component the entity carries
516
558
  * (a disable is a soft remove of the whole mask from default queries). Like
517
559
  * `onAdd`/`onRemove`, an *immediate* `ecs.disable()` does not fire — only
518
560
  * the deferred `ctx.commands.disable()` toggle does. `yieldExisting` seeds enabled
@@ -550,10 +592,10 @@ export declare class ECS implements QueryResolver {
550
592
  publishArchetypeRowCounts(): void;
551
593
  flush(): void;
552
594
  }
553
- /** Phase C of issue #213 — archetype closure from a descriptor set.
595
+ /** Archetype closure from a descriptor set.
554
596
  *
555
597
  * Each descriptor is a system or an observer's synthesized `SystemDescriptor`
556
- * (#768) — both carry `spawns` + `transitions`. Seeds the worklist with every
598
+ * — both carry `spawns` + `transitions`. Seeds the worklist with every
557
599
  * descriptor's `spawns`; iteratively applies every descriptor's `transitions`
558
600
  * to every discovered mask whose components cover the transition's `whenHas`.
559
601
  * Returns the union of seeds + reachable targets, deduplicated by hash-bucketed
@@ -566,7 +608,7 @@ export declare class ECS implements QueryResolver {
566
608
  * tiny — ~20 masks at most), the worklist is finite and we exit when it
567
609
  * empties.
568
610
  *
569
- * Liberal `whenHas` per design doc §6.6 — over-approximation is fine; an
611
+ * Liberal `whenHas` — over-approximation is fine; an
570
612
  * unreachable transition target costs one descriptor row at the SAB tail,
571
613
  * not column bytes. Empty `spawns` + `transitions` short-circuit to zero.
572
614
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ecs.d.ts","sourceRoot":"","sources":["../../../src/core/ecs/ecs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8DK;AAEL,OAAO,EAAS,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAGN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,eAAe,EAAE,OAAO,EACxB,EAAE,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAC9B,IAAI;IAeA,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC,gBAAgB,GAAG,WAAW,CAAC,EAAE,GAAG,IAAI;IAKxF;;;;OAIG;IACI,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI;IAKlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IASI,OAAO,CAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,wBAAwB,GAAG,cAAc;IAC/E,OAAO,CAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,uBAAuB,GAAG,cAAc;IAC9E,OAAO,CAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,0BAA0B,GAAG,cAAc;IAKxF;;;;;;;;;;;OAWG;IACI,yBAAyB,IAAI,IAAI;IAIjC,KAAK,IAAI,IAAI;CAIpB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,uBAAuB,CAAC,WAAW,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GAAG,MAAM,EAAE,CAgFlF;AAED;kEACkE;AAClE,eAAO,MAAM,aAAa;;CAEzB,CAAC"}
@@ -29,11 +29,11 @@ export interface EntityBudget {
29
29
  * Default `BUDGET_DEFAULT_BYTES_PER_ENTITY`. */
30
30
  readonly bytesPerEntity?: number;
31
31
  }
32
- /** WASM-backed memory, first-class (#682). Either bring your own shared
32
+ /** WASM-backed memory, first-class. Either bring your own shared
33
33
  * `WebAssembly.Memory` (the server match context does — its sim factory
34
34
  * owns the memory), or declare page bounds and let the engine construct
35
- * it replacing the hand-wired incantation that previously lived only in
36
- * `workbench/ecs/scripts/run-memory.ts`. */
35
+ * it. This replaces the hand-wired sequence that each caller had to do
36
+ * before. */
37
37
  export type WasmMemoryArm = {
38
38
  readonly memory: WebAssembly.Memory;
39
39
  readonly initialPages?: never;
@@ -43,16 +43,16 @@ export type WasmMemoryArm = {
43
43
  readonly initialPages?: number;
44
44
  readonly memory?: never;
45
45
  };
46
- /** Pure-TS **heap** backing (#643 / ADR-0018 §1B): a plain resizable
47
- * `ArrayBuffer` instead of a `SharedArrayBuffer`. Needs no cross-origin
48
- * isolation (COOP/COEP) and is the intended default for embedders that can't
49
- * set those headers (the oecs profile). Trade-off: no worker offload and no
50
- * WASM compute backend — both require a transferable `SharedArrayBuffer`. An
51
- * empty `{}` takes the default 256 MiB growable cap. */
46
+ /** Pure-TS **heap** backing: a plain fixed (non-resizable)
47
+ * `ArrayBuffer` reserved at the cap up front, instead of a `SharedArrayBuffer`.
48
+ * Needs no cross-origin isolation (COOP/COEP) and is the intended default for
49
+ * embedders that can't set those headers (the oecs profile). Trade-off: no
50
+ * worker offload and no WASM compute backend — both require a transferable
51
+ * `SharedArrayBuffer`. An empty `{}` takes the default 256 MiB cap. */
52
52
  export interface HeapMemoryArm {
53
- /** Byte ceiling of the growable heap backing. Default
54
- * `DEFAULT_ECS_CAP_BYTES` (256 MiB), same hard-ceiling semantics as the
55
- * SAB backing (#380). */
53
+ /** Byte ceiling of the heap backing — reserved fixed (non-resizable) at
54
+ * this cap up front. Default `DEFAULT_ECS_CAP_BYTES` (256 MiB), same
55
+ * hard-ceiling semantics as the SAB backing. */
56
56
  readonly maxBytes?: number;
57
57
  }
58
58
  /** Opt-in **shared-memory** backing (`@oasys/oecs/shared`): a growable
@@ -61,7 +61,7 @@ export interface HeapMemoryArm {
61
61
  * (COOP/COEP) in browsers. Empty `{}` takes the default 256 MiB growable cap. */
62
62
  export interface SharedMemoryArm {
63
63
  /** Byte ceiling of the growable shared backing. Default
64
- * `DEFAULT_ECS_CAP_BYTES` (256 MiB), hard-ceiling semantics (#380). */
64
+ * `DEFAULT_ECS_CAP_BYTES` (256 MiB), hard-ceiling semantics. */
65
65
  readonly maxBytes?: number;
66
66
  }
67
67
  /** Pinnable on every arm: exact initial rows per archetype column. The
@@ -114,7 +114,7 @@ export type ECSMemoryOptions = ({
114
114
  } & ColumnCapacityPin) | ({
115
115
  /** Expert escape hatch. Typed `InPlaceBufferAllocator` so only
116
116
  * allocators that statically declare `isInPlace: true` compile —
117
- * the ADR-0008 boundary. `DEFAULT_SAB_ALLOCATOR` is rejected by the
117
+ * the in-place boundary. `DEFAULT_SAB_ALLOCATOR` is rejected by the
118
118
  * type system; non-in-place allocators stay snapshot/test-sizing
119
119
  * utilities. */
120
120
  readonly allocator: InPlaceBufferAllocator;
@@ -141,7 +141,7 @@ export type ECSMemoryOptions = ({
141
141
  * diagnostics; `intentLabel`/`budgetEntities`/`capBytes` also travel
142
142
  * into `Store` so cap errors speak the caller's language. */
143
143
  export interface ResolvedECSMemory {
144
- readonly source: "default" | "budget" | "max_bytes" | "wasm" | "allocator" | "heap" | "shared";
144
+ readonly source: "default" | "budget" | "maxBytes" | "wasm" | "allocator" | "heap" | "shared";
145
145
  readonly allocator: InPlaceBufferAllocator;
146
146
  readonly columnCapacity: number;
147
147
  readonly entityIndexCapacity: number;
@@ -29,11 +29,11 @@ export interface EntityBudget {
29
29
  * Default `BUDGET_DEFAULT_BYTES_PER_ENTITY`. */
30
30
  readonly bytesPerEntity?: number;
31
31
  }
32
- /** WASM-backed memory, first-class (#682). Either bring your own shared
32
+ /** WASM-backed memory, first-class. Either bring your own shared
33
33
  * `WebAssembly.Memory` (the server match context does — its sim factory
34
34
  * owns the memory), or declare page bounds and let the engine construct
35
- * it replacing the hand-wired incantation that previously lived only in
36
- * `workbench/ecs/scripts/run-memory.ts`. */
35
+ * it. This replaces the hand-wired sequence that each caller had to do
36
+ * before. */
37
37
  export type WasmMemoryArm = {
38
38
  readonly memory: WebAssembly.Memory;
39
39
  readonly initialPages?: never;
@@ -43,16 +43,16 @@ export type WasmMemoryArm = {
43
43
  readonly initialPages?: number;
44
44
  readonly memory?: never;
45
45
  };
46
- /** Pure-TS **heap** backing (#643 / ADR-0018 §1B): a plain resizable
47
- * `ArrayBuffer` instead of a `SharedArrayBuffer`. Needs no cross-origin
48
- * isolation (COOP/COEP) and is the intended default for embedders that can't
49
- * set those headers (the oecs profile). Trade-off: no worker offload and no
50
- * WASM compute backend — both require a transferable `SharedArrayBuffer`. An
51
- * empty `{}` takes the default 256 MiB growable cap. */
46
+ /** Pure-TS **heap** backing: a plain fixed (non-resizable)
47
+ * `ArrayBuffer` reserved at the cap up front, instead of a `SharedArrayBuffer`.
48
+ * Needs no cross-origin isolation (COOP/COEP) and is the intended default for
49
+ * embedders that can't set those headers (the oecs profile). Trade-off: no
50
+ * worker offload and no WASM compute backend — both require a transferable
51
+ * `SharedArrayBuffer`. An empty `{}` takes the default 256 MiB cap. */
52
52
  export interface HeapMemoryArm {
53
- /** Byte ceiling of the growable heap backing. Default
54
- * `DEFAULT_ECS_CAP_BYTES` (256 MiB), same hard-ceiling semantics as the
55
- * SAB backing (#380). */
53
+ /** Byte ceiling of the heap backing — reserved fixed (non-resizable) at
54
+ * this cap up front. Default `DEFAULT_ECS_CAP_BYTES` (256 MiB), same
55
+ * hard-ceiling semantics as the SAB backing. */
56
56
  readonly maxBytes?: number;
57
57
  }
58
58
  /** Opt-in **shared-memory** backing (`@oasys/oecs/shared`): a growable
@@ -61,7 +61,7 @@ export interface HeapMemoryArm {
61
61
  * (COOP/COEP) in browsers. Empty `{}` takes the default 256 MiB growable cap. */
62
62
  export interface SharedMemoryArm {
63
63
  /** Byte ceiling of the growable shared backing. Default
64
- * `DEFAULT_ECS_CAP_BYTES` (256 MiB), hard-ceiling semantics (#380). */
64
+ * `DEFAULT_ECS_CAP_BYTES` (256 MiB), hard-ceiling semantics. */
65
65
  readonly maxBytes?: number;
66
66
  }
67
67
  /** Pinnable on every arm: exact initial rows per archetype column. The
@@ -114,7 +114,7 @@ export type ECSMemoryOptions = ({
114
114
  } & ColumnCapacityPin) | ({
115
115
  /** Expert escape hatch. Typed `InPlaceBufferAllocator` so only
116
116
  * allocators that statically declare `isInPlace: true` compile —
117
- * the ADR-0008 boundary. `DEFAULT_SAB_ALLOCATOR` is rejected by the
117
+ * the in-place boundary. `DEFAULT_SAB_ALLOCATOR` is rejected by the
118
118
  * type system; non-in-place allocators stay snapshot/test-sizing
119
119
  * utilities. */
120
120
  readonly allocator: InPlaceBufferAllocator;
@@ -141,7 +141,7 @@ export type ECSMemoryOptions = ({
141
141
  * diagnostics; `intentLabel`/`budgetEntities`/`capBytes` also travel
142
142
  * into `Store` so cap errors speak the caller's language. */
143
143
  export interface ResolvedECSMemory {
144
- readonly source: "default" | "budget" | "max_bytes" | "wasm" | "allocator" | "heap" | "shared";
144
+ readonly source: "default" | "budget" | "maxBytes" | "wasm" | "allocator" | "heap" | "shared";
145
145
  readonly allocator: InPlaceBufferAllocator;
146
146
  readonly columnCapacity: number;
147
147
  readonly entityIndexCapacity: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ecs_memory.d.ts","sourceRoot":"","sources":["../../../src/core/ecs/ecs_memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAON,KAAK,sBAAsB,EAC3B,MAAM,UAAU,CAAC;AAQlB;;sEAEsE;AACtE,eAAO,MAAM,qBAAqB,QAAY,CAAC;AAE/C;;qEAEqE;AACrE,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC;4EAC4E;AAC5E,eAAO,MAAM,+BAA+B,KAAK,CAAC;AAElD;;;kCAGkC;AAClC,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAO3C;;iDAEiD;AACjD,MAAM,WAAW,YAAY;IAC5B;6DACyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;8CAC0C;IAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;oDACgD;IAChD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;4CAI4C;AAC5C,MAAM,MAAM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,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAkBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,iBAAiB,CA4R3E"}
@@ -3,7 +3,7 @@ export declare class EntityAllocator {
3
3
  /** SAB-backed per-slot generation counters — replanted on restore. */
4
4
  private _generations;
5
5
  /** Single-slot view over the entity-index region's `length` header field —
6
- * replanted on restore. Written on every high-water bump (#368). */
6
+ * replanted on restore. Written on every high-water bump. */
7
7
  private _lengthView;
8
8
  private _highWater;
9
9
  private readonly _freeIndices;
@@ -26,17 +26,17 @@ export declare class EntityAllocator {
26
26
  /** Allocate a slot and return its packed id; the slot index is left in
27
27
  * `lastIndex`. This *commits* the slot (bumps counts, stamps the generation
28
28
  * so `isAliveIndex` is already true) — a caller placing the entity into an
29
- * archetype row must have reserved column capacity first (#775). */
29
+ * archetype row must have reserved column capacity first. */
30
30
  alloc(): EntityID;
31
31
  /** Pre-check that `count` fresh slots fit, so a bulk-spawn commits
32
- * all-or-nothing (#775): `alloc`'s own per-call guard would otherwise
32
+ * all-or-nothing: `alloc`'s own per-call guard would otherwise
33
33
  * throw partway through the loop, leaving committed slots phantom-alive.
34
34
  * Free-list reuse covers the first `freeCount` slots; only the remainder
35
35
  * draws down the high-water headroom. */
36
36
  ensureCapacity(count: number): void;
37
37
  /** Recycle (or retire) a slot whose entity carried `generation`. Bumps the
38
38
  * generation so stale IDs read dead; once the counter would reach the
39
- * reserved tombstone the slot is RETIRED, not recycled (#376): stamp
39
+ * reserved tombstone the slot is RETIRED, not recycled: stamp
40
40
  * RETIRED_GENERATION (never issued to a live handle) and skip the
41
41
  * free-list push, closing the ABA window. Burning one of 2^20 indices
42
42
  * after 2047 reuses is cheap; the branch is predicted not-taken on
@@ -44,14 +44,14 @@ export declare class EntityAllocator {
44
44
  recycle(index: number, generation: number): void;
45
45
  /** Allocation-side liveness: the slot is in the issued range and its
46
46
  * current generation matches the handle's. (`Store.isAlive` layers the
47
- * malformed-handle guards (#778) on top of this.) */
47
+ * malformed-handle guards on top of this.) */
48
48
  isAliveIndex(index: number, generation: number): boolean;
49
49
  /** Mirror the current high-water into the SAB `length` header — called
50
50
  * after a buffer replant so the fresh region carries the host value. */
51
51
  publishLength(): void;
52
52
  snapshotFreeIndices(): number[];
53
53
  /** Restore path, step 1: adopt the high-water recovered from the restored
54
- * region's length header BEFORE the replant republishes it (#789). */
54
+ * region's length header BEFORE the replant republishes it. */
55
55
  setHighWater(value: number): void;
56
56
  /** Restore path, step 2: adopt the captured free-list + alive count. */
57
57
  restoreHostState(freeIndices: readonly number[], aliveCount: number): void;