@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
@@ -9,7 +9,7 @@ export type ComponentRef<S extends ComponentSchema> = {
9
9
  * Read-only view of a component reference. This is an **advisory** barrier,
10
10
  * not a runtime safety boundary: the `readonly` properties block field writes
11
11
  * at the type layer, but `createRef` installs working get/set on the shared
12
- * prototype for both `ref()` and `refRead()`, so a §10c-policed cast can
12
+ * prototype for both `ref()` and `refRead()`, so a deliberate cast can
13
13
  * still write through (and would skip the change-tick bump `ref()` performs).
14
14
  * Treat it as "I promise I am only reading," enforced by the escape-hatch lint
15
15
  * (`bun run lint:escape-hatches`), not by the runtime.
@@ -28,4 +28,56 @@ export interface RefColumnGroup {
28
28
  * calls for the same group only allocate the lightweight ref object.
29
29
  */
30
30
  export declare function createRef<S extends ComponentSchema>(group: RefColumnGroup, row: number): ComponentRef<S>;
31
+ interface CursorInternal {
32
+ /** The current archetype's row plane (`Archetype._bufs`), index-parallel with
33
+ * its `_flatColumns`. Re-read on every `at()`; safe to hold between `at()` and
34
+ * a field access because `_syncRowPlane` refills it in place. */
35
+ _bufs: AnyTypedArray[];
36
+ /** Where this component's columns start in `_bufs` for the current archetype. */
37
+ _off: number;
38
+ _row: number;
39
+ }
40
+ /** Mutable single-entity cursor: field get/set plus `at(entity)`. */
41
+ export type ComponentCursor<S extends ComponentSchema> = {
42
+ -readonly [K in keyof S]: number;
43
+ } & CursorSeek;
44
+ /**
45
+ * Read-only cursor. **Advisory**, exactly like `ReadonlyComponentRef`: the
46
+ * prototype carries working setters for both variants, so a deliberate cast
47
+ * can still write through — and would skip the change-tick bump the mutable
48
+ * variant performs.
49
+ */
50
+ export type ReadonlyComponentCursor<S extends ComponentSchema> = {
51
+ readonly [K in keyof S]: number;
52
+ } & CursorSeek;
53
+ export interface CursorSeek {
54
+ /**
55
+ * Point this cursor at `entity`, resolving its archetype and row. Every
56
+ * subsequent field access reads or writes `entity` until the next `at()`.
57
+ *
58
+ * Returns the cursor, so a single-expression read stays one expression:
59
+ * `ecs.cursor(Pos).at(e).x`. In a loop, prefer calling it as a statement and
60
+ * reading fields off the cursor — that is the form the allocation-free path
61
+ * exists for.
62
+ */
63
+ at(entity: import('./entity.js').EntityID): this;
64
+ }
65
+ /**
66
+ * `at()` needs the archetype and row for an entity, and only the Store can
67
+ * resolve those. Passing the whole Store into the cursor would hand it (and its
68
+ * users) the mutation surface; this is the one operation it actually needs,
69
+ * supplied as a closure by whoever creates the cursor.
70
+ *
71
+ * The binder also carries the mutable/read-only difference: `Store.cursorBinder`
72
+ * closes over whether to stamp the change tick, so the variant is settled once
73
+ * at creation instead of branched on per `at()`.
74
+ */
75
+ export type CursorBinder = (cursor: CursorInternal, entity: unknown) => void;
76
+ /**
77
+ * Build a cursor over `fieldNames`, bound by `bind`. The prototype (field
78
+ * accessors by ordinal, plus `at`) is built once per component and cached; each
79
+ * call allocates one small object, and then nothing per entity.
80
+ */
81
+ export declare function createCursor<S extends ComponentSchema>(fieldNames: readonly string[], bind: CursorBinder): ComponentCursor<S>;
82
+ export {};
31
83
  //# sourceMappingURL=ref.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ref.d.ts","sourceRoot":"","sources":["../../../src/core/ecs/ref.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkCK;AAEL,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAA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,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,CAAC,EAAE,CAAC;CACjD;AAWD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,EAClD,KAAK,EAAE,cAAc,EACrB,GAAG,EAAE,MAAM,GACT,YAAY,CAAC,CAAC,CAAC,CAwBjB;AA2CD,UAAU,cAAc;IACvB;;qEAEiE;IACjE,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AAED,qEAAqE;AACrE,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,eAAe,IAAI;IACxD,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM;CAChC,GAAG,UAAU,CAAC;AAEf;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,CAAC,CAAC,SAAS,eAAe,IAAI;IAChE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,MAAM;CAC/B,GAAG,UAAU,CAAC;AAEf,MAAM,WAAW,UAAU;IAC1B;;;;;;;;OAQG;IACH,EAAE,CAAC,MAAM,EAAE,OAAO,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC9C;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;AAU7E;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,eAAe,EACrD,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,IAAI,EAAE,YAAY,GAChB,eAAe,CAAC,CAAC,CAAC,CA8CpB"}
@@ -15,7 +15,7 @@ export type RelationDef<C extends RelationCardinality = RelationCardinality> = R
15
15
  readonly [__relationCardinality]?: [C];
16
16
  };
17
17
  /** Access sentinel for the `(*, T)` wildcard query iteration
18
- * (`Query.forEachRelatedTo`, #579). A `(*, T)` term reads **every** registered
18
+ * (`Query.forEachRelatedTo`). A `(*, T)` term reads **every** registered
19
19
  * relation's reverse index to find sources of `T`, so it can't name a specific
20
20
  * relation in `relationReads` the way `withRelation(R)` (`(R, *)`) can. A
21
21
  * system that iterates a `(*, T)` wildcard lists `ANY_RELATION` in `relationReads`
@@ -24,7 +24,7 @@ export type RelationDef<C extends RelationCardinality = RelationCardinality> = R
24
24
  * minted from 0 upward), so it can never collide with a registered relation. */
25
25
  export declare const ANY_RELATION: RelationDef;
26
26
  /** Cleanup policy applied to a relation's **sources** when one of its
27
- * **targets** is destroyed (#473). Chosen per-relation at registration, run at
27
+ * **targets** is destroyed. Chosen per-relation at registration, run at
28
28
  * destroy-flush (and the immediate-destroy path) off the reverse index:
29
29
  *
30
30
  * - **`delete`** — cascade: destroy every source of the dead target too,
@@ -33,10 +33,10 @@ export declare const ANY_RELATION: RelationDef;
33
33
  * - **`orphan`** — leave the link intact but dangling. Reads stay safe (the
34
34
  * reverse index is `EntityID`-keyed, so the dead handle never aliases a
35
35
  * recycled slot); `targetOf` returns a dead handle until the source
36
- * re-targets or is removed. This is the pre-#473 behaviour and the default.
36
+ * re-targets or is removed. This is the original behaviour and the default.
37
37
  */
38
38
  export type OnDeleteTarget = "delete" | "clear" | "orphan";
39
- /** Default on-target-delete policy: leave the link dangling (pre-#473
39
+ /** Default on-target-delete policy: leave the link dangling (the original
40
40
  * behaviour, zero change for callers that don't opt in). */
41
41
  export declare const DEFAULT_ON_DELETE_TARGET: OnDeleteTarget;
42
42
  /** Registration options. `exclusive` (one target per source) is the default;
@@ -63,12 +63,12 @@ export declare const RELATION_TARGET_FIELD = "target";
63
63
  export type CanonicalTargetSetFn = (sourceIndex: number, targets: readonly EntityID[]) => void;
64
64
  /** Receives one canonical `(source, target)` pair during a fold over a
65
65
  * relation's forward links. Sources ascend by entity index, each source's
66
- * targets ascend by id — the #470 determinism order. */
66
+ * targets ascend by id — the determinism order. */
67
67
  export type CanonicalPairFn = (source: EntityID, target: EntityID) => void;
68
68
  /** Maps a source entity **index** to its full `EntityID` (generation from the
69
69
  * live slot). Supplied by `Store`, which owns entity generations. */
70
70
  export type MakeSourceID = (index: number) => EntityID;
71
- /** One relation's derived side state. **Abstract over cardinality (#498):** the
71
+ /** One relation's derived side state. **Abstract over cardinality:** the
72
72
  * base owns the cardinality-agnostic **reverse index** (target → sources, keyed
73
73
  * by full `EntityID` so a recycled slot can't alias a dead target's sources) and
74
74
  * a handle on the backing `SparseComponentStore`; the forward representation and
@@ -92,12 +92,12 @@ export declare abstract class RelationStore {
92
92
  * multi. Carries membership (and the target, when exclusive). */
93
93
  readonly sparse: SparseComponentDef;
94
94
  /** Cleanup policy applied to this relation's sources when a target is
95
- * destroyed (#473). `orphan` (the default) is a no-op — the link dangles
95
+ * destroyed. `orphan` (the default) is a no-op — the link dangles
96
96
  * safely. `Store` reads this at destroy-flush off `sourcesOf`. */
97
97
  readonly onDeleteTarget: OnDeleteTarget;
98
98
  /** The backing sparse store instance. Owned for registration/liveness by
99
99
  * `Store`, but the relation drives the forward/membership rows on it directly
100
- * — that is the cardinality interaction this class now encapsulates (#498). */
100
+ * — that is the cardinality interaction this class now encapsulates. */
101
101
  protected readonly _store: SparseComponentStore;
102
102
  /** target `EntityID` → set of source `EntityID`s. Keyed by the full id, not
103
103
  * the index, so a recycled target slot can't alias a dead target's sources.
@@ -111,7 +111,7 @@ export declare abstract class RelationStore {
111
111
  * linger with an empty set). */
112
112
  protected unlinkReverse(tgt: EntityID, src: EntityID): void;
113
113
  /** Drop every reverse-index entry whose **target** is no longer alive,
114
- * returning the count dropped (#491). The `orphan` policy intentionally
114
+ * returning the count dropped. The `orphan` policy intentionally
115
115
  * leaves a destroyed target's reverse entry intact (the link dangles
116
116
  * safely), so a long-lived source that orphan-points at a stream of
117
117
  * short-lived targets and never re-targets/dies accumulates dead-target keys
@@ -149,7 +149,7 @@ export declare abstract class RelationStore {
149
149
  * reverse index in lockstep. Exclusive: replaces any existing target
150
150
  * (idempotent if `tgt` is already the target). Multi: adds to the set
151
151
  * (idempotent on a duplicate), establishing the membership tag on the first
152
- * target. `src` must be live — `Store` checks before delegating (#495). */
152
+ * target. `src` must be live — `Store` checks before delegating. */
153
153
  abstract link(src: EntityID, tgt: EntityID): void;
154
154
  /** Remove `(R, tgt)` from `src` — or, when `tgt` is omitted, every target of
155
155
  * `src` — keeping forward link + membership + reverse index in lockstep. A
@@ -166,7 +166,7 @@ export declare abstract class RelationStore {
166
166
  abstract singleTarget(index: number): EntityID | undefined;
167
167
  /** All targets of source `index`, ascending by id — one or zero for
168
168
  * exclusive, the full sorted set for multi. The symmetric counterpart to
169
- * `sourcesOf` (#498 item 4). */
169
+ * `sourcesOf`. */
170
170
  abstract targetsOf(index: number): EntityID[];
171
171
  /** Whether source `index` holds any target under this relation (sparse
172
172
  * membership). */
@@ -174,12 +174,12 @@ export declare abstract class RelationStore {
174
174
  /** Fold `cb` over this relation's **multi** forward target sets in canonical
175
175
  * order (sources ascending by index, each source's targets ascending by id),
176
176
  * skipping empty sets. The single source of truth for the canonical multi
177
- * traversal shared by `stateHash`, `snapshotRelations`, and `pairsOf`
178
- * (#498 item 1). Exclusive relations contribute via the sparse store, so this
177
+ * traversal shared by `stateHash`, `snapshotRelations`, and `pairsOf`.
178
+ * Exclusive relations contribute via the sparse store, so this
179
179
  * is a no-op for them. */
180
180
  abstract forEachCanonicalTargetSet(cb: CanonicalTargetSetFn): void;
181
181
  /** Fold `cb` over every `(source, target)` pair of this relation in canonical
182
- * order — the `(R, *)` wildcard drive order (#472). `makeId` maps a source
182
+ * order — the `(R, *)` wildcard drive order. `makeId` maps a source
183
183
  * index to its full `EntityID`. Exclusive rides the backing store's
184
184
  * `canonicalIndices`; multi rides `forEachCanonicalTargetSet`. */
185
185
  abstract forEachCanonicalPair(makeId: MakeSourceID, cb: CanonicalPairFn): void;
@@ -210,7 +210,7 @@ export declare function makeRelationStore(exclusive: boolean, sparse: SparseComp
210
210
  * Members are emitted in canonical order (sources ascending by entity index,
211
211
  * each source's targets ascending by id) so the bytes are independent of
212
212
  * add/remove history — the same byte-level determinism invariant the sparse
213
- * snapshot holds (#470). Layout (integers little-endian):
213
+ * snapshot holds. Layout (integers little-endian):
214
214
  *
215
215
  * u32 relationCount
216
216
  * repeat relationCount times (registration / id order):
@@ -15,7 +15,7 @@ export type RelationDef<C extends RelationCardinality = RelationCardinality> = R
15
15
  readonly [__relationCardinality]?: [C];
16
16
  };
17
17
  /** Access sentinel for the `(*, T)` wildcard query iteration
18
- * (`Query.forEachRelatedTo`, #579). A `(*, T)` term reads **every** registered
18
+ * (`Query.forEachRelatedTo`). A `(*, T)` term reads **every** registered
19
19
  * relation's reverse index to find sources of `T`, so it can't name a specific
20
20
  * relation in `relationReads` the way `withRelation(R)` (`(R, *)`) can. A
21
21
  * system that iterates a `(*, T)` wildcard lists `ANY_RELATION` in `relationReads`
@@ -24,7 +24,7 @@ export type RelationDef<C extends RelationCardinality = RelationCardinality> = R
24
24
  * minted from 0 upward), so it can never collide with a registered relation. */
25
25
  export declare const ANY_RELATION: RelationDef;
26
26
  /** Cleanup policy applied to a relation's **sources** when one of its
27
- * **targets** is destroyed (#473). Chosen per-relation at registration, run at
27
+ * **targets** is destroyed. Chosen per-relation at registration, run at
28
28
  * destroy-flush (and the immediate-destroy path) off the reverse index:
29
29
  *
30
30
  * - **`delete`** — cascade: destroy every source of the dead target too,
@@ -33,10 +33,10 @@ export declare const ANY_RELATION: RelationDef;
33
33
  * - **`orphan`** — leave the link intact but dangling. Reads stay safe (the
34
34
  * reverse index is `EntityID`-keyed, so the dead handle never aliases a
35
35
  * recycled slot); `targetOf` returns a dead handle until the source
36
- * re-targets or is removed. This is the pre-#473 behaviour and the default.
36
+ * re-targets or is removed. This is the original behaviour and the default.
37
37
  */
38
38
  export type OnDeleteTarget = "delete" | "clear" | "orphan";
39
- /** Default on-target-delete policy: leave the link dangling (pre-#473
39
+ /** Default on-target-delete policy: leave the link dangling (the original
40
40
  * behaviour, zero change for callers that don't opt in). */
41
41
  export declare const DEFAULT_ON_DELETE_TARGET: OnDeleteTarget;
42
42
  /** Registration options. `exclusive` (one target per source) is the default;
@@ -63,12 +63,12 @@ export declare const RELATION_TARGET_FIELD = "target";
63
63
  export type CanonicalTargetSetFn = (sourceIndex: number, targets: readonly EntityID[]) => void;
64
64
  /** Receives one canonical `(source, target)` pair during a fold over a
65
65
  * relation's forward links. Sources ascend by entity index, each source's
66
- * targets ascend by id — the #470 determinism order. */
66
+ * targets ascend by id — the determinism order. */
67
67
  export type CanonicalPairFn = (source: EntityID, target: EntityID) => void;
68
68
  /** Maps a source entity **index** to its full `EntityID` (generation from the
69
69
  * live slot). Supplied by `Store`, which owns entity generations. */
70
70
  export type MakeSourceID = (index: number) => EntityID;
71
- /** One relation's derived side state. **Abstract over cardinality (#498):** the
71
+ /** One relation's derived side state. **Abstract over cardinality:** the
72
72
  * base owns the cardinality-agnostic **reverse index** (target → sources, keyed
73
73
  * by full `EntityID` so a recycled slot can't alias a dead target's sources) and
74
74
  * a handle on the backing `SparseComponentStore`; the forward representation and
@@ -92,12 +92,12 @@ export declare abstract class RelationStore {
92
92
  * multi. Carries membership (and the target, when exclusive). */
93
93
  readonly sparse: SparseComponentDef;
94
94
  /** Cleanup policy applied to this relation's sources when a target is
95
- * destroyed (#473). `orphan` (the default) is a no-op — the link dangles
95
+ * destroyed. `orphan` (the default) is a no-op — the link dangles
96
96
  * safely. `Store` reads this at destroy-flush off `sourcesOf`. */
97
97
  readonly onDeleteTarget: OnDeleteTarget;
98
98
  /** The backing sparse store instance. Owned for registration/liveness by
99
99
  * `Store`, but the relation drives the forward/membership rows on it directly
100
- * — that is the cardinality interaction this class now encapsulates (#498). */
100
+ * — that is the cardinality interaction this class now encapsulates. */
101
101
  protected readonly _store: SparseComponentStore;
102
102
  /** target `EntityID` → set of source `EntityID`s. Keyed by the full id, not
103
103
  * the index, so a recycled target slot can't alias a dead target's sources.
@@ -111,7 +111,7 @@ export declare abstract class RelationStore {
111
111
  * linger with an empty set). */
112
112
  protected unlinkReverse(tgt: EntityID, src: EntityID): void;
113
113
  /** Drop every reverse-index entry whose **target** is no longer alive,
114
- * returning the count dropped (#491). The `orphan` policy intentionally
114
+ * returning the count dropped. The `orphan` policy intentionally
115
115
  * leaves a destroyed target's reverse entry intact (the link dangles
116
116
  * safely), so a long-lived source that orphan-points at a stream of
117
117
  * short-lived targets and never re-targets/dies accumulates dead-target keys
@@ -149,7 +149,7 @@ export declare abstract class RelationStore {
149
149
  * reverse index in lockstep. Exclusive: replaces any existing target
150
150
  * (idempotent if `tgt` is already the target). Multi: adds to the set
151
151
  * (idempotent on a duplicate), establishing the membership tag on the first
152
- * target. `src` must be live — `Store` checks before delegating (#495). */
152
+ * target. `src` must be live — `Store` checks before delegating. */
153
153
  abstract link(src: EntityID, tgt: EntityID): void;
154
154
  /** Remove `(R, tgt)` from `src` — or, when `tgt` is omitted, every target of
155
155
  * `src` — keeping forward link + membership + reverse index in lockstep. A
@@ -166,7 +166,7 @@ export declare abstract class RelationStore {
166
166
  abstract singleTarget(index: number): EntityID | undefined;
167
167
  /** All targets of source `index`, ascending by id — one or zero for
168
168
  * exclusive, the full sorted set for multi. The symmetric counterpart to
169
- * `sourcesOf` (#498 item 4). */
169
+ * `sourcesOf`. */
170
170
  abstract targetsOf(index: number): EntityID[];
171
171
  /** Whether source `index` holds any target under this relation (sparse
172
172
  * membership). */
@@ -174,12 +174,12 @@ export declare abstract class RelationStore {
174
174
  /** Fold `cb` over this relation's **multi** forward target sets in canonical
175
175
  * order (sources ascending by index, each source's targets ascending by id),
176
176
  * skipping empty sets. The single source of truth for the canonical multi
177
- * traversal shared by `stateHash`, `snapshotRelations`, and `pairsOf`
178
- * (#498 item 1). Exclusive relations contribute via the sparse store, so this
177
+ * traversal shared by `stateHash`, `snapshotRelations`, and `pairsOf`.
178
+ * Exclusive relations contribute via the sparse store, so this
179
179
  * is a no-op for them. */
180
180
  abstract forEachCanonicalTargetSet(cb: CanonicalTargetSetFn): void;
181
181
  /** Fold `cb` over every `(source, target)` pair of this relation in canonical
182
- * order — the `(R, *)` wildcard drive order (#472). `makeId` maps a source
182
+ * order — the `(R, *)` wildcard drive order. `makeId` maps a source
183
183
  * index to its full `EntityID`. Exclusive rides the backing store's
184
184
  * `canonicalIndices`; multi rides `forEachCanonicalTargetSet`. */
185
185
  abstract forEachCanonicalPair(makeId: MakeSourceID, cb: CanonicalPairFn): void;
@@ -210,7 +210,7 @@ export declare function makeRelationStore(exclusive: boolean, sparse: SparseComp
210
210
  * Members are emitted in canonical order (sources ascending by entity index,
211
211
  * each source's targets ascending by id) so the bytes are independent of
212
212
  * add/remove history — the same byte-level determinism invariant the sparse
213
- * snapshot holds (#470). Layout (integers little-endian):
213
+ * snapshot holds. Layout (integers little-endian):
214
214
  *
215
215
  * u32 relationCount
216
216
  * repeat relationCount times (registration / id order):
@@ -1 +1 @@
1
- {"version":3,"file":"relation.d.ts","sourceRoot":"","sources":["../../../src/core/ecs/relation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4DK;AAEL,OAAO,EAAE,KAAK,EAAc,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,KAAK,QAAQ,EAA4C,MAAM,UAAU,CAAC;AACnF,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAEzB,MAAM,gBAAgB,CAAC;AAExB;;0EAE0E;AAC1E,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AAItD,OAAO,CAAC,MAAM,eAAe,EAAE,OAAO,MAAM,CAAC;AAE7C;kEACkE;AAClE,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,OAAO,CAAC;AAYxD,OAAO,CAAC,MAAM,qBAAqB,EAAE,OAAO,MAAM,CAAC;AAEnD,MAAM,MAAM,WA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C/B,SAAS,EAAE,SAAS,aAAa,EAAE,EACnC,KAAK,EAAE,UAAU,EACjB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,QAAQ,GACjC,IAAI,CA8EN"}
@@ -33,23 +33,23 @@ export declare class RelationService {
33
33
  /** Number of registered relations. */
34
34
  get count(): number;
35
35
  /** Whether any relation registered a non-`orphan` `onDeleteTarget` policy —
36
- * the destroy paths' gate for `cleanupTarget` (#473). */
36
+ * the destroy paths' gate for `cleanupTarget`. */
37
37
  get hasTargetCleanup(): boolean;
38
38
  /** Register a relation kind. `exclusive` (the default) → one target per
39
39
  * source, stored in a backing `{ target: f64 }` sparse component, so the
40
- * forward index rides the sparse store and inherits query membership (#469),
41
- * `stateHash` + snapshot/restore (#470) for free. `multi` → a set of
40
+ * forward index rides the sparse store and inherits query membership,
41
+ * `stateHash` + snapshot/restore for free. `multi` → a set of
42
42
  * targets per source, backed by a sparse tag for membership plus a side
43
43
  * forward index the relation owns. The two cardinalities are mutually
44
44
  * exclusive. `onDeleteTarget` selects the cleanup policy run when a target
45
45
  * is destroyed — `delete` (cascade-destroy sources), `clear` (drop the link,
46
- * sources survive), or `orphan` (default: leave it dangling, #473). See
47
- * ADR-0011 and `relation.ts`.
46
+ * sources survive), or `orphan` (default: leave it dangling). See
47
+ * `relation.ts`.
48
48
  *
49
49
  * The backing sparse store is resolved and handed to the relation so it can
50
50
  * drive forward/membership rows directly — the cardinality-specific
51
51
  * interaction is `ExclusiveRelationStore` / `MultiRelationStore`'s, not a
52
- * branch here (#498). */
52
+ * branch here. */
53
53
  registerRelation(opts?: RelationOptions): RelationDef;
54
54
  private relationOf;
55
55
  /** Add a `(R, tgt)` pair to `src`. No archetype transition. Exclusive:
@@ -57,7 +57,7 @@ export declare class RelationService {
57
57
  * `tgt` is already the target. Multi: adds `tgt` to the set, a no-op if
58
58
  * already present. A dead `src` *or* `tgt` is caller error: it throws in
59
59
  * `DEV` and is a no-op in production — symmetric, so a production build
60
- * never links a reverse-index entry keyed by a destroyed handle (#495). */
60
+ * never links a reverse-index entry keyed by a destroyed handle. */
61
61
  addRelation(src: EntityID, def: RelationDef, tgt: EntityID): void;
62
62
  /** Remove a `(R, tgt)` pair from `src`. No archetype transition. Exclusive:
63
63
  * `tgt` is optional and the removal is a no-op when it names a target other
@@ -76,8 +76,8 @@ export declare class RelationService {
76
76
  sourcesOf(tgt: EntityID, def: RelationDef): EntityID[];
77
77
  /** Whether `src` holds any pair under `R`. */
78
78
  hasRelation(src: EntityID, def: RelationDef): boolean;
79
- /** All `(source, target)` pairs of relation `R` — the `(R, *)` wildcard
80
- * (#472). Sources are emitted in **canonical entity-index order** (the #470
79
+ /** All `(source, target)` pairs of relation `R` — the `(R, *)` wildcard.
80
+ * Sources are emitted in **canonical entity-index order** (the
81
81
  * determinism convention): exclusive relations ride the backing sparse
82
82
  * store's `canonicalIndices`, multi relations ride the same
83
83
  * `forEachCanonicalTargetSet` traversal `stateHash` / `snapshotRelations`
@@ -87,7 +87,7 @@ export declare class RelationService {
87
87
  * point-query forms are `targetOf` / `targetsOf`. */
88
88
  pairsOf(def: RelationDef): readonly (readonly [EntityID, EntityID])[];
89
89
  /** Every `(relation, source)` pointing at `tgt`, across **all** registered
90
- * relation kinds — the `(*, T)` wildcard (#472). Walks the relation registry
90
+ * relation kinds — the `(*, T)` wildcard. Walks the relation registry
91
91
  * in id order (each relation's reverse index already returns sources
92
92
  * ascending by id), so the result is ordered by relation id then source id.
93
93
  * Empty when nothing targets `tgt`. The single-relation form is
@@ -116,7 +116,7 @@ export declare class RelationService {
116
116
  forEachRelationTargetMatch(target: EntityID, include: BitSet, exclude: BitSet | null, anyOf: BitSet | null, sparseInclude: readonly SparseComponentID[], sparseExclude: readonly SparseComponentID[], includeDisabled: boolean, cb: (entityId: EntityID) => void): void;
117
117
  /** Reclaim reverse-index memory: drop every relation's reverse entries whose
118
118
  * **target** has been destroyed, returning the total dropped across all
119
- * relations (#491). Under the default `orphan` policy a destroyed target
119
+ * relations. Under the default `orphan` policy a destroyed target
120
120
  * leaves its reverse entry intact until each source re-targets or dies, so a
121
121
  * long-lived source that orphan-points at a churn of short-lived targets and
122
122
  * never re-targets accumulates dead-target keys without bound. This cold-path
@@ -171,10 +171,10 @@ export declare class RelationService {
171
171
  * intact: the reverse index is keyed by full `EntityID`, so a recycled slot
172
172
  * never aliases the dead target's sources. The destroyed entity's **target**
173
173
  * role is handled separately by `cleanupTarget` per each relation's
174
- * `OnDeleteTarget` policy (#473). Gated by the caller on `count > 0`. */
174
+ * `OnDeleteTarget` policy. Gated by the caller on `count > 0`. */
175
175
  purgeSource(entityId: EntityID): void;
176
176
  /** Apply each relation's `OnDeleteTarget` policy for a destroyed **target**
177
- * `targetId` (#473). Walks the registry; for every relation whose reverse
177
+ * `targetId`. Walks the registry; for every relation whose reverse
178
178
  * index has sources pointing at the dead target:
179
179
  *
180
180
  * - **`delete`** — append each source to `cascade`; the caller destroys them
@@ -192,7 +192,7 @@ export declare class RelationService {
192
192
  * iterating is safe. Gated by the caller on `hasTargetCleanup`, so the
193
193
  * whole walk is skipped when no relation opts into a non-`orphan` policy. */
194
194
  cleanupTarget(targetId: EntityID, cascade: EntityID[]): void;
195
- /** Fourth query-match path (#581): yield the matched entities — the exact
195
+ /** Fourth query-match path: yield the matched entities — the exact
196
196
  * sparse-match intersection (dense mask + sparse require/exclude + the
197
197
  * default enabled-row filter) — in canonical **hierarchy depth order** over
198
198
  * exclusive relation `R`: depth ascending (parents before children), **entity
@@ -33,23 +33,23 @@ export declare class RelationService {
33
33
  /** Number of registered relations. */
34
34
  get count(): number;
35
35
  /** Whether any relation registered a non-`orphan` `onDeleteTarget` policy —
36
- * the destroy paths' gate for `cleanupTarget` (#473). */
36
+ * the destroy paths' gate for `cleanupTarget`. */
37
37
  get hasTargetCleanup(): boolean;
38
38
  /** Register a relation kind. `exclusive` (the default) → one target per
39
39
  * source, stored in a backing `{ target: f64 }` sparse component, so the
40
- * forward index rides the sparse store and inherits query membership (#469),
41
- * `stateHash` + snapshot/restore (#470) for free. `multi` → a set of
40
+ * forward index rides the sparse store and inherits query membership,
41
+ * `stateHash` + snapshot/restore for free. `multi` → a set of
42
42
  * targets per source, backed by a sparse tag for membership plus a side
43
43
  * forward index the relation owns. The two cardinalities are mutually
44
44
  * exclusive. `onDeleteTarget` selects the cleanup policy run when a target
45
45
  * is destroyed — `delete` (cascade-destroy sources), `clear` (drop the link,
46
- * sources survive), or `orphan` (default: leave it dangling, #473). See
47
- * ADR-0011 and `relation.ts`.
46
+ * sources survive), or `orphan` (default: leave it dangling). See
47
+ * `relation.ts`.
48
48
  *
49
49
  * The backing sparse store is resolved and handed to the relation so it can
50
50
  * drive forward/membership rows directly — the cardinality-specific
51
51
  * interaction is `ExclusiveRelationStore` / `MultiRelationStore`'s, not a
52
- * branch here (#498). */
52
+ * branch here. */
53
53
  registerRelation(opts?: RelationOptions): RelationDef;
54
54
  private relationOf;
55
55
  /** Add a `(R, tgt)` pair to `src`. No archetype transition. Exclusive:
@@ -57,7 +57,7 @@ export declare class RelationService {
57
57
  * `tgt` is already the target. Multi: adds `tgt` to the set, a no-op if
58
58
  * already present. A dead `src` *or* `tgt` is caller error: it throws in
59
59
  * `DEV` and is a no-op in production — symmetric, so a production build
60
- * never links a reverse-index entry keyed by a destroyed handle (#495). */
60
+ * never links a reverse-index entry keyed by a destroyed handle. */
61
61
  addRelation(src: EntityID, def: RelationDef, tgt: EntityID): void;
62
62
  /** Remove a `(R, tgt)` pair from `src`. No archetype transition. Exclusive:
63
63
  * `tgt` is optional and the removal is a no-op when it names a target other
@@ -76,8 +76,8 @@ export declare class RelationService {
76
76
  sourcesOf(tgt: EntityID, def: RelationDef): EntityID[];
77
77
  /** Whether `src` holds any pair under `R`. */
78
78
  hasRelation(src: EntityID, def: RelationDef): boolean;
79
- /** All `(source, target)` pairs of relation `R` — the `(R, *)` wildcard
80
- * (#472). Sources are emitted in **canonical entity-index order** (the #470
79
+ /** All `(source, target)` pairs of relation `R` — the `(R, *)` wildcard.
80
+ * Sources are emitted in **canonical entity-index order** (the
81
81
  * determinism convention): exclusive relations ride the backing sparse
82
82
  * store's `canonicalIndices`, multi relations ride the same
83
83
  * `forEachCanonicalTargetSet` traversal `stateHash` / `snapshotRelations`
@@ -87,7 +87,7 @@ export declare class RelationService {
87
87
  * point-query forms are `targetOf` / `targetsOf`. */
88
88
  pairsOf(def: RelationDef): readonly (readonly [EntityID, EntityID])[];
89
89
  /** Every `(relation, source)` pointing at `tgt`, across **all** registered
90
- * relation kinds — the `(*, T)` wildcard (#472). Walks the relation registry
90
+ * relation kinds — the `(*, T)` wildcard. Walks the relation registry
91
91
  * in id order (each relation's reverse index already returns sources
92
92
  * ascending by id), so the result is ordered by relation id then source id.
93
93
  * Empty when nothing targets `tgt`. The single-relation form is
@@ -116,7 +116,7 @@ export declare class RelationService {
116
116
  forEachRelationTargetMatch(target: EntityID, include: BitSet, exclude: BitSet | null, anyOf: BitSet | null, sparseInclude: readonly SparseComponentID[], sparseExclude: readonly SparseComponentID[], includeDisabled: boolean, cb: (entityId: EntityID) => void): void;
117
117
  /** Reclaim reverse-index memory: drop every relation's reverse entries whose
118
118
  * **target** has been destroyed, returning the total dropped across all
119
- * relations (#491). Under the default `orphan` policy a destroyed target
119
+ * relations. Under the default `orphan` policy a destroyed target
120
120
  * leaves its reverse entry intact until each source re-targets or dies, so a
121
121
  * long-lived source that orphan-points at a churn of short-lived targets and
122
122
  * never re-targets accumulates dead-target keys without bound. This cold-path
@@ -171,10 +171,10 @@ export declare class RelationService {
171
171
  * intact: the reverse index is keyed by full `EntityID`, so a recycled slot
172
172
  * never aliases the dead target's sources. The destroyed entity's **target**
173
173
  * role is handled separately by `cleanupTarget` per each relation's
174
- * `OnDeleteTarget` policy (#473). Gated by the caller on `count > 0`. */
174
+ * `OnDeleteTarget` policy. Gated by the caller on `count > 0`. */
175
175
  purgeSource(entityId: EntityID): void;
176
176
  /** Apply each relation's `OnDeleteTarget` policy for a destroyed **target**
177
- * `targetId` (#473). Walks the registry; for every relation whose reverse
177
+ * `targetId`. Walks the registry; for every relation whose reverse
178
178
  * index has sources pointing at the dead target:
179
179
  *
180
180
  * - **`delete`** — append each source to `cascade`; the caller destroys them
@@ -192,7 +192,7 @@ export declare class RelationService {
192
192
  * iterating is safe. Gated by the caller on `hasTargetCleanup`, so the
193
193
  * whole walk is skipped when no relation opts into a non-`orphan` policy. */
194
194
  cleanupTarget(targetId: EntityID, cascade: EntityID[]): void;
195
- /** Fourth query-match path (#581): yield the matched entities — the exact
195
+ /** Fourth query-match path: yield the matched entities — the exact
196
196
  * sparse-match intersection (dense mask + sparse require/exclude + the
197
197
  * default enabled-row filter) — in canonical **hierarchy depth order** over
198
198
  * exclusive relation `R`: depth ascending (parents before children), **entity
@@ -1 +1 @@
1
- {"version":3,"file":"relation_service.d.ts","sourceRoot":"","sources":["../../../src/core/ecs/relation_service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;KAYK;AAEL,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,KAAK,QAAQ,EAAuD,MAAM,UAAU,CAAC;AAK9F,OAAO,EAIN,KAAK,WAAW,EAEhB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,MAAM,gBAAgB,CAAC;AAKxB;;;iEAGiE;AACjE,MAAM,WAAW,mBAAmB;IACnC,OAAO,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC/B,SAAS,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC;IAChE,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,kBAAkB,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AI,EACtB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,aAAa,EAAE,SAAS,iBAAiB,EAAE,EAC3C,aAAa,EAAE,SAAS,iBAAiB,EAAE,EAC3C,eAAe,EAAE,SAAS,SAAS,EAAE,EACrC,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,OAAO,EACxB,EAAE,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAC9B,IAAI;IAmEP;;;;;;;;uEAQmE;IACnE,OAAO,CAAC,iBAAiB;CAuDzB"}
@@ -8,7 +8,7 @@
8
8
  * stores an arbitrary typed value. The key carries the value type as a
9
9
  * phantom type parameter, so reads are type-safe at compile time.
10
10
  *
11
- * Lifecycle (#798). A resource is register-once *until removed*: a second
11
+ * Lifecycle. A resource is register-once *until removed*: a second
12
12
  * `registerResource` for a live key throws RESOURCE_ALREADY_REGISTERED, but
13
13
  * `removeResource(key)` drops it (failing closed on a missing key) and frees the
14
14
  * key to be registered again — the present → absent → present axis. Removal is
@@ -8,7 +8,7 @@
8
8
  * stores an arbitrary typed value. The key carries the value type as a
9
9
  * phantom type parameter, so reads are type-safe at compile time.
10
10
  *
11
- * Lifecycle (#798). A resource is register-once *until removed*: a second
11
+ * Lifecycle. A resource is register-once *until removed*: a second
12
12
  * `registerResource` for a live key throws RESOURCE_ALREADY_REGISTERED, but
13
13
  * `removeResource(key)` drops it (failing closed on a missing key) and frees the
14
14
  * key to be registered again — the present → absent → present axis. Removal is
@@ -1,5 +1,5 @@
1
1
  /***
2
- * ResourceRegistry — the world's symbol-keyed resource dictionary (H1 step 2).
2
+ * ResourceRegistry — the world's symbol-keyed resource dictionary.
3
3
  *
4
4
  * Extracted from `Store`, which keeps one-line delegations; fully
5
5
  * self-contained (no Store reach-back). Resources stay out of `stateHash` and
@@ -12,7 +12,7 @@ export declare class ResourceRegistry {
12
12
  set(key: symbol, value: unknown): void;
13
13
  /** Drop a resource from the world. Fails closed on a missing key (mirrors
14
14
  * `get` / `set`); afterwards the key is free to `register` again — the
15
- * present → absent → present lifecycle (#798). Purely a host-side
15
+ * present → absent → present lifecycle. Purely a host-side
16
16
  * dictionary delete with no determinism-hash effect. */
17
17
  remove(key: symbol): void;
18
18
  has(key: symbol): boolean;
@@ -1,5 +1,5 @@
1
1
  /***
2
- * ResourceRegistry — the world's symbol-keyed resource dictionary (H1 step 2).
2
+ * ResourceRegistry — the world's symbol-keyed resource dictionary.
3
3
  *
4
4
  * Extracted from `Store`, which keeps one-line delegations; fully
5
5
  * self-contained (no Store reach-back). Resources stay out of `stateHash` and
@@ -12,7 +12,7 @@ export declare class ResourceRegistry {
12
12
  set(key: symbol, value: unknown): void;
13
13
  /** Drop a resource from the world. Fails closed on a missing key (mirrors
14
14
  * `get` / `set`); afterwards the key is free to `register` again — the
15
- * present → absent → present lifecycle (#798). Purely a host-side
15
+ * present → absent → present lifecycle. Purely a host-side
16
16
  * dictionary delete with no determinism-hash effect. */
17
17
  remove(key: symbol): void;
18
18
  has(key: symbol): boolean;
@@ -19,7 +19,7 @@ export interface ArchetypeRowState {
19
19
  readonly archetypeId: number;
20
20
  /** Total live rows (enabled + disabled). */
21
21
  readonly length: number;
22
- /** Enabled-row partition boundary (#577): rows `[0, enabledCount)` enabled. */
22
+ /** Enabled-row partition boundary: rows `[0, enabledCount)` enabled. */
23
23
  readonly enabledCount: number;
24
24
  }
25
25
  /** The host-side state a snapshot captures alongside the dense + sparse bytes. */
@@ -65,8 +65,8 @@ export declare function unframeWorldSnapshot(bytes: Uint8Array): WorldSnapshotSe
65
65
  /**
66
66
  * Fail-closed registration guard, read **directly from the snapshot's dense
67
67
  * bytes** so it can run BEFORE the dense backing is touched. `restoreInto`
68
- * builds the restored store through the live world's in-place allocator
69
- * (ADR-0008), which reuses the live backing buffer — so validating a
68
+ * builds the restored store through the live world's in-place allocator,
69
+ * which reuses the live backing buffer — so validating a
70
70
  * *materialised* `ColumnStore` would already have overwritten live column data
71
71
  * (the buffer is overwritten inside `restoreColumnStore`, before any post-build
72
72
  * check could run). Parsing the descriptors off the raw `dense` `Uint8Array`
@@ -19,7 +19,7 @@ export interface ArchetypeRowState {
19
19
  readonly archetypeId: number;
20
20
  /** Total live rows (enabled + disabled). */
21
21
  readonly length: number;
22
- /** Enabled-row partition boundary (#577): rows `[0, enabledCount)` enabled. */
22
+ /** Enabled-row partition boundary: rows `[0, enabledCount)` enabled. */
23
23
  readonly enabledCount: number;
24
24
  }
25
25
  /** The host-side state a snapshot captures alongside the dense + sparse bytes. */
@@ -65,8 +65,8 @@ export declare function unframeWorldSnapshot(bytes: Uint8Array): WorldSnapshotSe
65
65
  /**
66
66
  * Fail-closed registration guard, read **directly from the snapshot's dense
67
67
  * bytes** so it can run BEFORE the dense backing is touched. `restoreInto`
68
- * builds the restored store through the live world's in-place allocator
69
- * (ADR-0008), which reuses the live backing buffer — so validating a
68
+ * builds the restored store through the live world's in-place allocator,
69
+ * which reuses the live backing buffer — so validating a
70
70
  * *materialised* `ColumnStore` would already have overwritten live column data
71
71
  * (the buffer is overwritten inside `restoreColumnStore`, before any post-build
72
72
  * check could run). Parsing the descriptors off the raw `dense` `Uint8Array`
@@ -1 +1 @@
1
- {"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../../../src/core/ecs/resume.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAUN,KAAK,cAAc,EACnB,MAAM,UAAU,CAAC;AAElB;;kFAEkF;AAClF,eAAO,MAAM,oBAAoB,YAAa,CAAC;AAE/C;qFACqF;AACrF,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;2BAI2B;AAC3B,qBAAa,eAAgB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI3B;AAED,qFAAqF;AACrF,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,4CAA4C;IAC5C,QAAQ,CAA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