@vgai/engine 0.5.21 → 0.5.23

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 (339) hide show
  1. package/README.md +6 -3
  2. package/dist/adapter/adapter-module.d.ts.map +1 -1
  3. package/dist/adapter/adapter-module.js +2 -4
  4. package/dist/adapter/adapter-surface.d.ts +1 -1
  5. package/dist/adapter/adapter-surface.js +1 -1
  6. package/dist/adapter/authoring.d.ts +19 -21
  7. package/dist/adapter/authoring.d.ts.map +1 -1
  8. package/dist/adapter/authoring.js +2 -2
  9. package/dist/adapter/binding.d.ts +341 -0
  10. package/dist/adapter/binding.d.ts.map +1 -0
  11. package/dist/adapter/binding.js +148 -0
  12. package/dist/adapter/colyseus-networking-adapter.d.ts.map +1 -1
  13. package/dist/adapter/colyseus-networking-adapter.js +23 -4
  14. package/dist/adapter/entrypoint-selection-readers.d.ts +24 -0
  15. package/dist/adapter/entrypoint-selection-readers.d.ts.map +1 -0
  16. package/dist/adapter/entrypoint-selection-readers.js +63 -0
  17. package/dist/adapter/entrypoint-selection-source.d.ts.map +1 -1
  18. package/dist/adapter/entrypoint-selection-source.js +1 -44
  19. package/dist/adapter/finders/scenes-from-entrypoint-selection.d.ts.map +1 -1
  20. package/dist/adapter/finders/scenes-from-entrypoint-selection.js +1 -52
  21. package/dist/adapter/host-context.d.ts +46 -15
  22. package/dist/adapter/host-context.d.ts.map +1 -1
  23. package/dist/adapter/host-context.js +2 -9
  24. package/dist/adapter/index.d.ts +11 -12
  25. package/dist/adapter/index.d.ts.map +1 -1
  26. package/dist/adapter/index.js +9 -10
  27. package/dist/adapter/ingest/game-contract.d.ts +0 -3
  28. package/dist/adapter/ingest/game-contract.d.ts.map +1 -1
  29. package/dist/adapter/ingest/game-contract.js +0 -3
  30. package/dist/adapter/ingest/scene-capture.d.ts +19 -23
  31. package/dist/adapter/ingest/scene-capture.d.ts.map +1 -1
  32. package/dist/adapter/ingest/scene-capture.js +143 -17
  33. package/dist/adapter/ingest/visible-capture-window.d.ts +34 -0
  34. package/dist/adapter/ingest/visible-capture-window.d.ts.map +1 -1
  35. package/dist/adapter/manifest-interpreter.d.ts +59 -0
  36. package/dist/adapter/manifest-interpreter.d.ts.map +1 -0
  37. package/dist/adapter/manifest-interpreter.js +50 -0
  38. package/dist/adapter/native-debug-module.d.ts +71 -3
  39. package/dist/adapter/native-debug-module.d.ts.map +1 -1
  40. package/dist/adapter/native-debug-module.js +146 -10
  41. package/dist/adapter/rapier-physics-adapter.d.ts +31 -1
  42. package/dist/adapter/rapier-physics-adapter.d.ts.map +1 -1
  43. package/dist/adapter/rapier-physics-adapter.js +50 -36
  44. package/dist/adapter/renderer-config.d.ts +3 -3
  45. package/dist/adapter/renderer-config.js +3 -3
  46. package/dist/adapter/root-adapter.d.ts +7 -7
  47. package/dist/adapter/root-adapter.js +4 -4
  48. package/dist/adapter/system-adapter.d.ts +45 -7
  49. package/dist/adapter/system-adapter.d.ts.map +1 -1
  50. package/dist/adapter/system-seam-contract.d.ts +3 -3
  51. package/dist/adapter/system-seam-contract.js +3 -3
  52. package/dist/adapter/system-slot.d.ts +168 -0
  53. package/dist/adapter/system-slot.d.ts.map +1 -0
  54. package/dist/adapter/system-slot.js +229 -0
  55. package/dist/adapter/transform.d.ts +11 -1
  56. package/dist/adapter/transform.d.ts.map +1 -1
  57. package/dist/ai/navigation.d.ts +17 -1
  58. package/dist/ai/navigation.d.ts.map +1 -1
  59. package/dist/ai/navigation.js +26 -5
  60. package/dist/animation/anim-graph-types.d.ts +11 -3
  61. package/dist/animation/anim-graph-types.d.ts.map +1 -1
  62. package/dist/animation/theatre-clock-binding.d.ts +4 -4
  63. package/dist/animation/theatre-clock-binding.js +4 -4
  64. package/dist/animation/xstate-animation-binding.d.ts.map +1 -1
  65. package/dist/animation/xstate-animation-binding.js +2 -2
  66. package/dist/animation/xstate-animation-meta.d.ts +13 -0
  67. package/dist/animation/xstate-animation-meta.d.ts.map +1 -1
  68. package/dist/animation/xstate-animation-meta.js +14 -0
  69. package/dist/asset-formats/index.d.ts +4 -7
  70. package/dist/asset-formats/index.d.ts.map +1 -1
  71. package/dist/asset-formats/index.js +4 -7
  72. package/dist/asset-formats/render-env.d.ts +5 -8
  73. package/dist/asset-formats/render-env.d.ts.map +1 -1
  74. package/dist/asset-formats/render-env.js +3 -6
  75. package/dist/asset-parse-error.d.ts +2 -5
  76. package/dist/asset-parse-error.d.ts.map +1 -1
  77. package/dist/asset-parse-error.js +2 -5
  78. package/dist/audio/bus-mixer.d.ts +101 -0
  79. package/dist/audio/bus-mixer.d.ts.map +1 -0
  80. package/dist/audio/bus-mixer.js +115 -0
  81. package/dist/canvas-react/index.d.ts +5 -12
  82. package/dist/canvas-react/index.d.ts.map +1 -1
  83. package/dist/canvas-react/index.js +5 -12
  84. package/dist/canvas-react/pixi-react-root-factory.d.ts +34 -21
  85. package/dist/canvas-react/pixi-react-root-factory.d.ts.map +1 -1
  86. package/dist/canvas-react/pixi-react-root-factory.js +274 -36
  87. package/dist/core/countdown-timer.d.ts +118 -0
  88. package/dist/core/countdown-timer.d.ts.map +1 -0
  89. package/dist/core/countdown-timer.js +137 -0
  90. package/dist/core/deferred-commands.d.ts +127 -0
  91. package/dist/core/deferred-commands.d.ts.map +1 -0
  92. package/dist/core/deferred-commands.js +132 -0
  93. package/dist/core/frame-pacing.d.ts +1 -1
  94. package/dist/core/frame-pacing.js +2 -2
  95. package/dist/core/game-loop.d.ts +1 -3
  96. package/dist/core/game-loop.d.ts.map +1 -1
  97. package/dist/core/game-loop.js +1 -3
  98. package/dist/core/seeded-random.d.ts +1 -1
  99. package/dist/core/sim-clock.d.ts +19 -8
  100. package/dist/core/sim-clock.d.ts.map +1 -1
  101. package/dist/core/sim-clock.js +18 -7
  102. package/dist/core/types.d.ts +1 -3
  103. package/dist/core/types.d.ts.map +1 -1
  104. package/dist/defaults.d.ts +6 -14
  105. package/dist/defaults.d.ts.map +1 -1
  106. package/dist/defaults.js +6 -14
  107. package/dist/dev/instruments.d.ts +38 -11
  108. package/dist/dev/instruments.d.ts.map +1 -1
  109. package/dist/dev/instruments.js +81 -11
  110. package/dist/dev/register-render-vitals.d.ts +1 -4
  111. package/dist/dev/register-render-vitals.d.ts.map +1 -1
  112. package/dist/dev/register-render-vitals.js +1 -4
  113. package/dist/dev/render-debug-adapter.d.ts +2 -3
  114. package/dist/dev/render-debug-adapter.d.ts.map +1 -1
  115. package/dist/dev/render-debug-adapter.js +2 -3
  116. package/dist/dev/render-vitals.d.ts +3 -3
  117. package/dist/dev/render-vitals.js +3 -3
  118. package/dist/dev/webgl-frame-capture.d.ts +1 -1
  119. package/dist/dev/webgl-frame-capture.js +1 -1
  120. package/dist/index.d.ts +2 -5
  121. package/dist/index.d.ts.map +1 -1
  122. package/dist/index.js +2 -4
  123. package/dist/input/host-pointer.d.ts +122 -0
  124. package/dist/input/host-pointer.d.ts.map +1 -0
  125. package/dist/input/host-pointer.js +160 -0
  126. package/dist/input/input-manager.d.ts +33 -5
  127. package/dist/input/input-manager.d.ts.map +1 -1
  128. package/dist/input/input-manager.js +48 -13
  129. package/dist/input/rebind-controller.d.ts.map +1 -1
  130. package/dist/input/rebind-controller.js +6 -8
  131. package/dist/input/schema.d.ts.map +1 -1
  132. package/dist/input/schema.js +56 -28
  133. package/dist/manifest/filename.d.ts.map +1 -1
  134. package/dist/manifest/filename.js +8 -12
  135. package/dist/manifest/load.d.ts +10 -10
  136. package/dist/manifest/load.d.ts.map +1 -1
  137. package/dist/manifest/load.js +9 -6
  138. package/dist/manifest/schema.d.ts +17 -21
  139. package/dist/manifest/schema.d.ts.map +1 -1
  140. package/dist/manifest/schema.js +45 -35
  141. package/dist/physics/collider-dimensions.d.ts +8 -12
  142. package/dist/physics/collider-dimensions.d.ts.map +1 -1
  143. package/dist/physics/collider-dimensions.js +8 -12
  144. package/dist/pixi/scene-capture.d.ts +11 -13
  145. package/dist/pixi/scene-capture.d.ts.map +1 -1
  146. package/dist/react/world-state.d.ts +1 -1
  147. package/dist/react/world-state.d.ts.map +1 -1
  148. package/dist/render/directional-shadow-fit.d.ts +88 -0
  149. package/dist/render/directional-shadow-fit.d.ts.map +1 -0
  150. package/dist/render/directional-shadow-fit.js +133 -0
  151. package/dist/render/environment-capture.d.ts +68 -0
  152. package/dist/render/environment-capture.d.ts.map +1 -0
  153. package/dist/render/environment-capture.js +90 -0
  154. package/dist/render/ibl-override-material.d.ts +97 -0
  155. package/dist/render/ibl-override-material.d.ts.map +1 -0
  156. package/dist/render/ibl-override-material.js +114 -0
  157. package/dist/render/light-camera-factory.d.ts +5 -7
  158. package/dist/render/light-camera-factory.d.ts.map +1 -1
  159. package/dist/render/light-camera-factory.js +8 -11
  160. package/dist/render/material-factory.js +1 -1
  161. package/dist/render/render-batch-system.d.ts.map +1 -1
  162. package/dist/render/render-features.d.ts +17 -6
  163. package/dist/render/render-features.d.ts.map +1 -1
  164. package/dist/render/render-features.js +0 -28
  165. package/dist/runtime/create-runtime.d.ts +34 -25
  166. package/dist/runtime/create-runtime.d.ts.map +1 -1
  167. package/dist/runtime/create-runtime.js +218 -93
  168. package/dist/runtime/debug-registry.d.ts +77 -8
  169. package/dist/runtime/debug-registry.d.ts.map +1 -1
  170. package/dist/runtime/debug-registry.js +3 -3
  171. package/dist/runtime/dev-build.d.ts +2 -2
  172. package/dist/runtime/dev-build.js +2 -2
  173. package/dist/runtime/game-input-seams.d.ts +51 -0
  174. package/dist/runtime/game-input-seams.d.ts.map +1 -0
  175. package/dist/runtime/game-input-seams.js +86 -0
  176. package/dist/runtime/game.d.ts +104 -40
  177. package/dist/runtime/game.d.ts.map +1 -1
  178. package/dist/runtime/game.js +119 -61
  179. package/dist/runtime/mount-game.d.ts +0 -16
  180. package/dist/runtime/mount-game.d.ts.map +1 -1
  181. package/dist/runtime/mount-game.js +26 -41
  182. package/dist/runtime/mount-manifest.d.ts +22 -14
  183. package/dist/runtime/mount-manifest.d.ts.map +1 -1
  184. package/dist/runtime/mount-manifest.js +22 -20
  185. package/dist/runtime/playtest.d.ts +22 -0
  186. package/dist/runtime/playtest.d.ts.map +1 -0
  187. package/dist/runtime/playtest.js +12 -0
  188. package/dist/runtime/state-bridge.d.ts +2 -3
  189. package/dist/runtime/state-bridge.d.ts.map +1 -1
  190. package/dist/runtime/state-bridge.js +1 -0
  191. package/dist/setup/setup-audio.d.ts +12 -0
  192. package/dist/setup/setup-audio.d.ts.map +1 -1
  193. package/dist/setup/setup-audio.js +9 -10
  194. package/dist/setup/setup-renderer.d.ts +2 -25
  195. package/dist/setup/setup-renderer.d.ts.map +1 -1
  196. package/dist/setup/setup-renderer.js +2 -31
  197. package/dist/world3d-react/index.d.ts +15 -25
  198. package/dist/world3d-react/index.d.ts.map +1 -1
  199. package/dist/world3d-react/index.js +15 -25
  200. package/dist/world3d-react/r3f-root-factory.d.ts +28 -34
  201. package/dist/world3d-react/r3f-root-factory.d.ts.map +1 -1
  202. package/dist/world3d-react/r3f-root-factory.js +403 -57
  203. package/dist/world3d-react/rapier-physics-bridge.d.ts +30 -17
  204. package/dist/world3d-react/rapier-physics-bridge.d.ts.map +1 -1
  205. package/dist/world3d-react/rapier-physics-bridge.js +143 -58
  206. package/package.json +1 -1
  207. package/schemas/engine-capabilities.json +16 -14
  208. package/schemas/vgai-project.schema.json +35 -26
  209. package/src/adapter/adapter-module.ts +2 -4
  210. package/src/adapter/adapter-surface.ts +1 -1
  211. package/src/adapter/authoring.ts +19 -21
  212. package/src/adapter/binding.ts +468 -0
  213. package/src/adapter/colyseus-networking-adapter.ts +20 -5
  214. package/src/adapter/entrypoint-selection-readers.ts +66 -0
  215. package/src/adapter/entrypoint-selection-source.ts +1 -40
  216. package/src/adapter/finders/scenes-from-entrypoint-selection.ts +1 -48
  217. package/src/adapter/host-context.ts +45 -15
  218. package/src/adapter/index.ts +23 -11
  219. package/src/adapter/ingest/game-contract.ts +0 -3
  220. package/src/adapter/ingest/scene-capture.ts +190 -39
  221. package/src/adapter/ingest/visible-capture-window.ts +35 -0
  222. package/src/adapter/manifest-interpreter.ts +64 -0
  223. package/src/adapter/native-debug-module.ts +248 -15
  224. package/src/adapter/rapier-physics-adapter.ts +76 -20
  225. package/src/adapter/renderer-config.ts +3 -3
  226. package/src/adapter/root-adapter.ts +7 -7
  227. package/src/adapter/system-adapter.ts +43 -8
  228. package/src/adapter/system-seam-contract.ts +3 -3
  229. package/src/adapter/system-slot.ts +291 -0
  230. package/src/adapter/transform.ts +18 -1
  231. package/src/ai/navigation.ts +30 -3
  232. package/src/animation/anim-graph-types.ts +11 -3
  233. package/src/animation/theatre-clock-binding.ts +4 -4
  234. package/src/animation/xstate-animation-binding.ts +2 -2
  235. package/src/animation/xstate-animation-meta.ts +16 -0
  236. package/src/asset-formats/index.ts +4 -7
  237. package/src/asset-formats/render-env.ts +3 -6
  238. package/src/asset-parse-error.ts +2 -5
  239. package/src/audio/bus-mixer.ts +161 -0
  240. package/src/canvas-react/index.ts +5 -21
  241. package/src/canvas-react/pixi-react-root-factory.tsx +301 -39
  242. package/src/core/countdown-timer.ts +188 -0
  243. package/src/core/deferred-commands.ts +174 -0
  244. package/src/core/frame-pacing.ts +2 -2
  245. package/src/core/game-loop.ts +1 -3
  246. package/src/core/seeded-random.ts +1 -1
  247. package/src/core/sim-clock.ts +19 -8
  248. package/src/core/types.ts +1 -3
  249. package/src/defaults.ts +6 -14
  250. package/src/dev/instruments.ts +108 -11
  251. package/src/dev/register-render-vitals.ts +1 -4
  252. package/src/dev/render-debug-adapter.ts +2 -3
  253. package/src/dev/render-vitals.ts +3 -3
  254. package/src/dev/webgl-frame-capture.ts +1 -1
  255. package/src/index.ts +2 -5
  256. package/src/input/host-pointer.ts +230 -0
  257. package/src/input/input-manager.ts +49 -13
  258. package/src/input/input-types.ts +1 -1
  259. package/src/input/rebind-controller.ts +6 -8
  260. package/src/input/schema.ts +216 -188
  261. package/src/manifest/filename.ts +8 -12
  262. package/src/manifest/load.ts +17 -13
  263. package/src/manifest/schema.ts +55 -47
  264. package/src/physics/collider-dimensions.ts +8 -12
  265. package/src/pixi/scene-capture.ts +12 -15
  266. package/src/react/world-state.tsx +1 -1
  267. package/src/render/directional-shadow-fit.ts +156 -0
  268. package/src/render/environment-capture.ts +102 -0
  269. package/src/render/ibl-override-material.ts +170 -0
  270. package/src/render/light-camera-factory.ts +8 -11
  271. package/src/render/material-factory.ts +1 -1
  272. package/src/render/render-batch-system.ts +14 -6
  273. package/src/render/render-features.ts +17 -35
  274. package/src/runtime/create-runtime.ts +270 -108
  275. package/src/runtime/debug-registry.ts +84 -8
  276. package/src/runtime/dev-build.ts +2 -2
  277. package/src/runtime/game-input-seams.ts +108 -0
  278. package/src/runtime/game.ts +231 -85
  279. package/src/runtime/mount-game.ts +31 -57
  280. package/src/runtime/mount-manifest.ts +47 -36
  281. package/src/runtime/playtest.ts +22 -0
  282. package/src/runtime/state-bridge.ts +3 -3
  283. package/src/setup/setup-audio.ts +21 -11
  284. package/src/setup/setup-renderer.ts +2 -61
  285. package/src/world3d-react/index.ts +15 -31
  286. package/src/world3d-react/r3f-root-factory.tsx +451 -60
  287. package/src/world3d-react/rapier-physics-bridge.tsx +154 -58
  288. package/dist/adapter/setup-three-root-adapter.d.ts +0 -86
  289. package/dist/adapter/setup-three-root-adapter.d.ts.map +0 -1
  290. package/dist/adapter/setup-three-root-adapter.js +0 -908
  291. package/dist/animation/clip-map.d.ts +0 -12
  292. package/dist/animation/clip-map.d.ts.map +0 -1
  293. package/dist/animation/clip-map.js +0 -31
  294. package/dist/asset-registry.d.ts +0 -38
  295. package/dist/asset-registry.d.ts.map +0 -1
  296. package/dist/asset-registry.js +0 -66
  297. package/dist/canvas-react/engine-bridge.d.ts +0 -45
  298. package/dist/canvas-react/engine-bridge.d.ts.map +0 -1
  299. package/dist/canvas-react/engine-bridge.js +0 -45
  300. package/dist/canvas-react/pixi-react-adapter.d.ts +0 -77
  301. package/dist/canvas-react/pixi-react-adapter.d.ts.map +0 -1
  302. package/dist/canvas-react/pixi-react-adapter.js +0 -294
  303. package/dist/canvas-react/world-context.d.ts +0 -98
  304. package/dist/canvas-react/world-context.d.ts.map +0 -1
  305. package/dist/canvas-react/world-context.js +0 -173
  306. package/dist/dev/debug-draw.d.ts +0 -24
  307. package/dist/dev/debug-draw.d.ts.map +0 -1
  308. package/dist/dev/debug-draw.js +0 -73
  309. package/dist/render/auto-batcher.d.ts +0 -34
  310. package/dist/render/auto-batcher.d.ts.map +0 -1
  311. package/dist/render/auto-batcher.js +0 -140
  312. package/dist/render/lod.d.ts +0 -13
  313. package/dist/render/lod.d.ts.map +0 -1
  314. package/dist/render/lod.js +0 -16
  315. package/dist/runtime/types.d.ts +0 -303
  316. package/dist/runtime/types.d.ts.map +0 -1
  317. package/dist/runtime/types.js +0 -1
  318. package/dist/world3d-react/engine-bridge.d.ts +0 -47
  319. package/dist/world3d-react/engine-bridge.d.ts.map +0 -1
  320. package/dist/world3d-react/engine-bridge.js +0 -73
  321. package/dist/world3d-react/r3f-adapter.d.ts +0 -58
  322. package/dist/world3d-react/r3f-adapter.d.ts.map +0 -1
  323. package/dist/world3d-react/r3f-adapter.js +0 -634
  324. package/dist/world3d-react/world-context.d.ts +0 -182
  325. package/dist/world3d-react/world-context.d.ts.map +0 -1
  326. package/dist/world3d-react/world-context.js +0 -235
  327. package/src/adapter/setup-three-root-adapter.ts +0 -1032
  328. package/src/animation/clip-map.ts +0 -34
  329. package/src/asset-registry.ts +0 -89
  330. package/src/canvas-react/engine-bridge.ts +0 -59
  331. package/src/canvas-react/pixi-react-adapter.tsx +0 -356
  332. package/src/canvas-react/world-context.ts +0 -253
  333. package/src/dev/debug-draw.ts +0 -80
  334. package/src/render/auto-batcher.ts +0 -168
  335. package/src/render/lod.ts +0 -17
  336. package/src/runtime/types.ts +0 -328
  337. package/src/world3d-react/engine-bridge.ts +0 -86
  338. package/src/world3d-react/r3f-adapter.tsx +0 -717
  339. package/src/world3d-react/world-context.ts +0 -358
@@ -25,6 +25,21 @@ export type PhysicsColliderShape = {
25
25
  readonly type: 'capsule';
26
26
  readonly halfHeight: number;
27
27
  readonly radius: number;
28
+ }
29
+ /**
30
+ * A collider this seam has no plain-data projection for — a trimesh,
31
+ * heightfield, convex hull, cylinder, cone, …
32
+ *
33
+ * IT IS STILL A COLLIDER, and the body still has it. Implementations used to
34
+ * drop these from `colliders()` entirely, so a body whose only collider was a
35
+ * trimesh inspected as a body with NO physics at all. `kind` is the native
36
+ * shape's own name, so the inspector can say WHICH shape it cannot draw
37
+ * rather than implying nothing is there. Nothing may synthesize dimensions
38
+ * for one, and `previewCollider` refuses it.
39
+ */
40
+ | {
41
+ readonly type: 'unsupported';
42
+ readonly kind: string;
28
43
  };
29
44
  /** Plain-data projection of one native 3D physics collider. The owning
30
45
  * physics implementation keeps the actual collider; editor authoring only
@@ -231,12 +246,28 @@ export interface NetworkingAdapter {
231
246
  authority(nodeId: string): 'local' | 'remote' | 'server';
232
247
  /** Remote/server-authoritative nodes → inspect-only in the editor. */
233
248
  editable(nodeId: string): boolean;
234
- /** Current connection lifecycle state. */
235
- getConnectionState(): ConnectionState;
236
- /** The active room's identity, or `null` when not connected to a room. */
237
- getRoomInfo(): RoomInfo | null;
238
- /** Replication activity snapshot, for a live network inspector panel. */
239
- getReplicationStats(): ReplicationStats;
249
+ /**
250
+ * Optional capability: current connection lifecycle state.
251
+ *
252
+ * OPTIONAL for the same reason every other member here is — `'disconnected'`
253
+ * is a POSITIVE CLAIM about the link, and an implementer that never taught
254
+ * this adapter to read connection state has not made it. Absent ⇒ the
255
+ * inspector marks the section unsupported; it does not report a game as
256
+ * disconnected on the strength of nobody having looked.
257
+ */
258
+ getConnectionState?(): ConnectionState;
259
+ /**
260
+ * Optional capability: the active room's identity, or `null` when connected
261
+ * to no room. `null` is the ANSWER "there is no room", so absence of the
262
+ * accessor — "nothing here can tell you" — has to be a different thing.
263
+ */
264
+ getRoomInfo?(): RoomInfo | null;
265
+ /**
266
+ * Optional capability: replication activity snapshot, for a live network
267
+ * inspector panel. Zeroes are a measurement, not a default; an adapter with
268
+ * no counters omits this rather than reporting a quiet link.
269
+ */
270
+ getReplicationStats?(): ReplicationStats;
240
271
  /** Subscribe to changes in connection state / room / replication stats. */
241
272
  subscribe(cb: () => void): Unsubscribe;
242
273
  /** Optional capability: one plain-data (JSON-safe) snapshot of the
@@ -263,7 +294,7 @@ export interface NetworkingAdapter {
263
294
  * (e.g. read off its own room state). The editor consumes this for display —
264
295
  * a seat label — ONLY when a real implementer provides it, falling back to a
265
296
  * generic label otherwise. */
266
- getPlayerIdentity?(): NetPlayerIdentity;
297
+ getPlayerIdentity?(): NetPlayerIdentity | undefined;
267
298
  /** Optional capability, PAIRED with {@link getPlayerIdentity}: set the local
268
299
  * player's identity through the game's OWN multiplayer mechanism. The editor
269
300
  * renders an editable name field ONLY when a real implementer provides this
@@ -324,6 +355,13 @@ export interface NavCrowdAgentState {
324
355
  */
325
356
  export interface NavigationAdapter {
326
357
  hasNavMesh(): boolean;
358
+ /**
359
+ * `[]` means SEARCHED AND FOUND NO ROUTE — a fact about the level. An
360
+ * implementer with no navmesh to search, or whose query FAILED, THROWS
361
+ * instead; those are facts about the implementer, and collapsing all three
362
+ * into `[]` tells a caller the level is impassable when nobody looked.
363
+ * Gate on {@link hasNavMesh} where the first case is reachable.
364
+ */
327
365
  findPath(start: NavPoint, end: NavPoint): NavPoint[];
328
366
  debugMesh(scene: THREE.Scene): THREE.Object3D | null;
329
367
  /** (Re)build the navmesh from source meshes. Synchronous in the blessed
@@ -1 +1 @@
1
- {"version":3,"file":"system-adapter.d.ts","sourceRoot":"","sources":["../../src/adapter/system-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAy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AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IACtC,cAAc,CAAC,IAAI,oBAAoB,CAAC;CACzC;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,gBAAgB,CAAC;AAE/D;;yCAEyC;AACzC,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GACzC,cAAc,GAAG,IAAI,CAGvB;AAED;gCACgC;AAChC,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GACzC,gBAAgB,GAAG,IAAI,CAGzB;AAMD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC"}
@@ -151,17 +151,17 @@ export declare const NETWORKING_ADAPTER_SHAPE: {
151
151
  readonly required: "operation";
152
152
  };
153
153
  readonly getConnectionState: {
154
- readonly optional: false;
154
+ readonly optional: true;
155
155
  readonly kind: "function";
156
156
  readonly required: "operation";
157
157
  };
158
158
  readonly getRoomInfo: {
159
- readonly optional: false;
159
+ readonly optional: true;
160
160
  readonly kind: "function";
161
161
  readonly required: "operation";
162
162
  };
163
163
  readonly getReplicationStats: {
164
- readonly optional: false;
164
+ readonly optional: true;
165
165
  readonly kind: "function";
166
166
  readonly required: "operation";
167
167
  };
@@ -37,9 +37,9 @@ export const NETWORKING_ADAPTER_SHAPE = defineSeamShape()({
37
37
  networkId: { optional: false, kind: 'function', required: 'operation' },
38
38
  authority: { optional: false, kind: 'function', required: 'operation' },
39
39
  editable: { optional: false, kind: 'function', required: 'operation' },
40
- getConnectionState: { optional: false, kind: 'function', required: 'operation' },
41
- getRoomInfo: { optional: false, kind: 'function', required: 'operation' },
42
- getReplicationStats: { optional: false, kind: 'function', required: 'operation' },
40
+ getConnectionState: { optional: true, kind: 'function', required: 'operation' },
41
+ getRoomInfo: { optional: true, kind: 'function', required: 'operation' },
42
+ getReplicationStats: { optional: true, kind: 'function', required: 'operation' },
43
43
  subscribe: { optional: false, kind: 'function', required: 'effect' },
44
44
  getStateSnapshot: { optional: true, kind: 'function', required: 'operation' },
45
45
  messageEvents: { optional: true, kind: 'function', required: 'operation' },
@@ -0,0 +1,168 @@
1
+ /**
2
+ * `createSystemSlot` — THE implementation of the declared-slot façade, the
3
+ * seam between a STATIC `systems` declaration and a LIVE adapter that only
4
+ * exists once the world tree is mounted.
5
+ *
6
+ * WHY IT EXISTS. An entry declares its systems statically
7
+ * (`export const systems = { networking: networkingSystem() }`), while the
8
+ * thing being declared — a joined Colyseus room, a baked navmesh, a mounted
9
+ * `<Physics>`, a cutscene's camera ownership — is built inside the world tree,
10
+ * later, and may be replaced (reconnect, remount, hot restart) or go away
11
+ * (stop). The slot is a stable object the host installs at mount and holds
12
+ * forever; every call forwards to whatever is attached right now.
13
+ *
14
+ * ── THE HONESTY RULE, STATED IN ONE PLACE ───────────────────────────────────
15
+ * This is why the pattern is centralized: five hand-rolled copies disagreed
16
+ * about it, and each disagreement was found by a separate review.
17
+ *
18
+ * - An **action** with no live target REFUSES BY NAME
19
+ * (`<name>: <unattachedMessage>`). Never a silent no-op — a caller that
20
+ * told the game to DO something must learn that it did not happen. An
21
+ * action against a live adapter that lacks the member refuses the same
22
+ * way, naming the member.
23
+ * - A **read** answers its declared HONEST EMPTY — `'disconnected'`, `[]`,
24
+ * `null`, `false`. That is not a fabrication: it is the truth of the
25
+ * not-attached state, in the same vocabulary the editor's own edit-mode
26
+ * adapters use. Reads are also the only kind safe to call from a per-frame
27
+ * debug draw, which is why a throw into a rAF loop is never the answer.
28
+ * - An **optional** member MIRRORS THE LIVE ADAPTER'S PRESENCE: absent while
29
+ * unattached, and absent afterwards when the live adapter itself does not
30
+ * provide it. Presence IS the consume-by-presence protocol's signal, so
31
+ * the slot may never invent it. Each presence read CAPTURES the adapter it
32
+ * saw and forwards to that same instance, so a detach between the read and
33
+ * the call answers as the adapter the caller was handed rather than a
34
+ * mid-flight swap.
35
+ * - A **subscribe** member SURVIVES REATTACHMENT: listeners live on the
36
+ * slot, never on the instance, and the slot re-binds its own single
37
+ * subscription on every attach/detach. A panel that subscribed once to the
38
+ * stable slot object is therefore never left holding a disposed system, and
39
+ * it is notified when the live half appears or disappears.
40
+ * - A member the config DOES NOT LIST does not exist on the slot at all.
41
+ * That is how the anti-shim rule spells omission — e.g. `PhysicsAdapter`'s
42
+ * `debugDraw`/`contactPoints` over `@react-three/rapier`, whose debug line
43
+ * segments live inside the fiber tree and expose no handle. Absence is a
44
+ * capability answer; a stub is a lie.
45
+ *
46
+ * ── RESOURCE OWNERSHIP ──────────────────────────────────────────────────────
47
+ * OWNER: whoever built the live adapter (the hook, the bridge component). The
48
+ * slot owns only the POINTER to it plus its own listener set and its own
49
+ * subscription to the live half. SHARERS: every reader of the declared
50
+ * system — editor inspectors, instruments. TEARDOWN: the function `attach`
51
+ * returns, and nothing else. It is IDENTITY-GUARDED — it clears only while
52
+ * the same instance is still attached, so a replace-then-teardown-the-old
53
+ * ordering cannot detach the new one — and detaching never disposes the
54
+ * adapter, because the slot did not create it.
55
+ *
56
+ * WHERE the slot module lives decides how many games share it. A slot in
57
+ * PROJECT-owned source (the four capability/example façades) is per Play
58
+ * instance, because the editor stamps mount ids onto project-owned import
59
+ * specifiers (`server/project-module-instance.ts`) — N instances get N module
60
+ * graphs and N slots. A slot in an ENGINE module is reached by bare
61
+ * specifier, which that stamping deliberately never touches, so it is ONE per
62
+ * page: every Play instance shares it, and concurrent instances' attaches
63
+ * contend (last attach wins; the loser's detach is dropped by the identity
64
+ * guard). `rapier-physics-bridge.tsx` is the one such slot today and warns
65
+ * loudly when contended — prefer project-owned slot modules for anything new.
66
+ *
67
+ * NOT A WRAPPER. The slot's members have the adapter interface's own exact
68
+ * signatures and hand back the implementation's own values; nothing stands
69
+ * between a caller and the live library object.
70
+ */
71
+ import type { VgaiGameSystemEmpty } from './ingest/game-contract';
72
+ /**
73
+ * `absent(reason)` — THE WHOLE-SLOT counterpart of the four per-member policies
74
+ * above, and the fifth line of the same honesty rule.
75
+ *
76
+ * The four policies answer "this slot exists but nothing is attached yet". This
77
+ * one answers a different question entirely: **this game will never have that
78
+ * subsystem, and here is what was searched.** A slot simply left out of the
79
+ * `systems` table cannot say that — an omitted key means "unsupported", which is
80
+ * the same shape as "nobody looked", and the coverage report has to file it as a
81
+ * work order forever. Declaring the absence turns an UNANSWERED row into a
82
+ * terminal one.
83
+ *
84
+ * ```ts
85
+ * export const systems = {
86
+ * audio: sfxAudioSystem(),
87
+ * physics: rapierPhysicsSystem(),
88
+ * networking: absent('single-player: no Colyseus client anywhere in `src/`'),
89
+ * };
90
+ * ```
91
+ *
92
+ * ## It is a CONSTRUCTOR for the shape that already exists, not a second one
93
+ *
94
+ * The returned value IS `VgaiGameSystemEmpty` — the plain
95
+ * `{ present: false, evidence }` record an INGESTED game declares on
96
+ * `window.vgaiGame.systems.systemAdapters`, validated by the same single
97
+ * projection (`ingest/contract-system-adapters.ts`). There is one shape law, not
98
+ * two: a foreign game cannot import this helper and must stay able to write the
99
+ * record by hand, so nothing here may brand the runtime value. What the helper
100
+ * buys a FIRST-PARTY author is the reason-quality check moved to the call site —
101
+ * our own code failing its own contract fails fast, where an ingested game's
102
+ * same mistake is filed as a `malformed` verdict for its coverage report.
103
+ *
104
+ * ## It is a MARKER, never a stub adapter
105
+ *
106
+ * Do not answer an absent slot with an adapter whose methods return zeros. A
107
+ * `getConnectionState()` of `'disconnected'` on a game with no transport implies
108
+ * a connection that could exist; that is the fabrication the anti-shim rule
109
+ * forbids. The absence is STATED, and the host installs nothing for it.
110
+ *
111
+ * @param reason What was searched and what was found, in the game's own source
112
+ * terms. "no netcode anywhere in `src/`" is a finished answer a reviewer can
113
+ * re-run; "not implemented yet" is a plan, and is rejected here.
114
+ */
115
+ export declare function absent(reason: string): VgaiGameSystemEmpty;
116
+ /** Any adapter member. `never[]` args make the conditional match contravariantly. */
117
+ type AnyFn = (...args: never[]) => unknown;
118
+ /** The declared member's return type, used to type a `read`'s honest empty. */
119
+ type MemberReturn<F> = NonNullable<F> extends (...args: never[]) => infer R ? R : never;
120
+ /**
121
+ * The per-member policy. There are exactly four, and every member of every
122
+ * declared slot in the repo is one of them — see the honesty rule above.
123
+ */
124
+ export type SystemSlotMemberSpec<F> = {
125
+ readonly kind: 'action';
126
+ } | {
127
+ readonly kind: 'read';
128
+ readonly empty: MemberReturn<F>;
129
+ } | {
130
+ readonly kind: 'subscribe';
131
+ } | {
132
+ readonly kind: 'optional';
133
+ };
134
+ /** The keys of `T` whose values are callable (data properties are not slottable). */
135
+ type FunctionMemberKeys<T> = {
136
+ [K in keyof T]-?: NonNullable<T[K]> extends AnyFn ? K : never;
137
+ }[keyof T];
138
+ /** Per-member policies. A member left out is left OFF the slot entirely. */
139
+ export type SystemSlotMembers<T> = {
140
+ readonly [K in FunctionMemberKeys<T>]?: SystemSlotMemberSpec<T[K]>;
141
+ };
142
+ export interface SystemSlotConfig<T extends object> {
143
+ /**
144
+ * The slot's own name, used as the prefix of every refusal so a stack-less
145
+ * error still names the seam (`'networkingSystem'`, `'rapierPhysicsSystem'`).
146
+ */
147
+ readonly name: string;
148
+ /**
149
+ * The rest of an action's refusal while nothing is attached — the DOMAIN
150
+ * half of the message, naming what has not happened yet ("the world is not
151
+ * playing, or the navmesh has not finished building").
152
+ */
153
+ readonly unattachedMessage: string;
154
+ readonly members: SystemSlotMembers<T>;
155
+ }
156
+ export interface SystemSlot<T extends object> {
157
+ /**
158
+ * Publish `live` as the slot's target. Returns the ONE detach path, which
159
+ * is identity-guarded: it clears only while `live` is still the attached
160
+ * instance, and never disposes it.
161
+ */
162
+ attach(live: T): () => void;
163
+ /** The stable declared object. Hand THIS to the entry's `systems` map. */
164
+ readonly slot: T;
165
+ }
166
+ export declare function createSystemSlot<T extends object>(config: SystemSlotConfig<T>): SystemSlot<T>;
167
+ export {};
168
+ //# sourceMappingURL=system-slot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-slot.d.ts","sourceRoot":"","sources":["../../src/adapter/system-slot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAS1D;AAED,qFAAqF;AACrF,KAAK,KAAK,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,CAAC;AAE3C,+EAA+E;AAC/E,KAAK,YAAY,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAExF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AAElC,qFAAqF;AACrF,KAAK,kBAAkB,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,GAAG,CAAC,GAAG,KAAK;CAC9D,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,4EAA4E;AAC5E,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;IACjC,QAAQ,EAAE,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACnE,CAAC;AAEF,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM;IAChD;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,MAAM;IAC1C;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;CAClB;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CA+G7F"}
@@ -0,0 +1,229 @@
1
+ /**
2
+ * `createSystemSlot` — THE implementation of the declared-slot façade, the
3
+ * seam between a STATIC `systems` declaration and a LIVE adapter that only
4
+ * exists once the world tree is mounted.
5
+ *
6
+ * WHY IT EXISTS. An entry declares its systems statically
7
+ * (`export const systems = { networking: networkingSystem() }`), while the
8
+ * thing being declared — a joined Colyseus room, a baked navmesh, a mounted
9
+ * `<Physics>`, a cutscene's camera ownership — is built inside the world tree,
10
+ * later, and may be replaced (reconnect, remount, hot restart) or go away
11
+ * (stop). The slot is a stable object the host installs at mount and holds
12
+ * forever; every call forwards to whatever is attached right now.
13
+ *
14
+ * ── THE HONESTY RULE, STATED IN ONE PLACE ───────────────────────────────────
15
+ * This is why the pattern is centralized: five hand-rolled copies disagreed
16
+ * about it, and each disagreement was found by a separate review.
17
+ *
18
+ * - An **action** with no live target REFUSES BY NAME
19
+ * (`<name>: <unattachedMessage>`). Never a silent no-op — a caller that
20
+ * told the game to DO something must learn that it did not happen. An
21
+ * action against a live adapter that lacks the member refuses the same
22
+ * way, naming the member.
23
+ * - A **read** answers its declared HONEST EMPTY — `'disconnected'`, `[]`,
24
+ * `null`, `false`. That is not a fabrication: it is the truth of the
25
+ * not-attached state, in the same vocabulary the editor's own edit-mode
26
+ * adapters use. Reads are also the only kind safe to call from a per-frame
27
+ * debug draw, which is why a throw into a rAF loop is never the answer.
28
+ * - An **optional** member MIRRORS THE LIVE ADAPTER'S PRESENCE: absent while
29
+ * unattached, and absent afterwards when the live adapter itself does not
30
+ * provide it. Presence IS the consume-by-presence protocol's signal, so
31
+ * the slot may never invent it. Each presence read CAPTURES the adapter it
32
+ * saw and forwards to that same instance, so a detach between the read and
33
+ * the call answers as the adapter the caller was handed rather than a
34
+ * mid-flight swap.
35
+ * - A **subscribe** member SURVIVES REATTACHMENT: listeners live on the
36
+ * slot, never on the instance, and the slot re-binds its own single
37
+ * subscription on every attach/detach. A panel that subscribed once to the
38
+ * stable slot object is therefore never left holding a disposed system, and
39
+ * it is notified when the live half appears or disappears.
40
+ * - A member the config DOES NOT LIST does not exist on the slot at all.
41
+ * That is how the anti-shim rule spells omission — e.g. `PhysicsAdapter`'s
42
+ * `debugDraw`/`contactPoints` over `@react-three/rapier`, whose debug line
43
+ * segments live inside the fiber tree and expose no handle. Absence is a
44
+ * capability answer; a stub is a lie.
45
+ *
46
+ * ── RESOURCE OWNERSHIP ──────────────────────────────────────────────────────
47
+ * OWNER: whoever built the live adapter (the hook, the bridge component). The
48
+ * slot owns only the POINTER to it plus its own listener set and its own
49
+ * subscription to the live half. SHARERS: every reader of the declared
50
+ * system — editor inspectors, instruments. TEARDOWN: the function `attach`
51
+ * returns, and nothing else. It is IDENTITY-GUARDED — it clears only while
52
+ * the same instance is still attached, so a replace-then-teardown-the-old
53
+ * ordering cannot detach the new one — and detaching never disposes the
54
+ * adapter, because the slot did not create it.
55
+ *
56
+ * WHERE the slot module lives decides how many games share it. A slot in
57
+ * PROJECT-owned source (the four capability/example façades) is per Play
58
+ * instance, because the editor stamps mount ids onto project-owned import
59
+ * specifiers (`server/project-module-instance.ts`) — N instances get N module
60
+ * graphs and N slots. A slot in an ENGINE module is reached by bare
61
+ * specifier, which that stamping deliberately never touches, so it is ONE per
62
+ * page: every Play instance shares it, and concurrent instances' attaches
63
+ * contend (last attach wins; the loser's detach is dropped by the identity
64
+ * guard). `rapier-physics-bridge.tsx` is the one such slot today and warns
65
+ * loudly when contended — prefer project-owned slot modules for anything new.
66
+ *
67
+ * NOT A WRAPPER. The slot's members have the adapter interface's own exact
68
+ * signatures and hand back the implementation's own values; nothing stands
69
+ * between a caller and the live library object.
70
+ */
71
+ /**
72
+ * `absent(reason)` — THE WHOLE-SLOT counterpart of the four per-member policies
73
+ * above, and the fifth line of the same honesty rule.
74
+ *
75
+ * The four policies answer "this slot exists but nothing is attached yet". This
76
+ * one answers a different question entirely: **this game will never have that
77
+ * subsystem, and here is what was searched.** A slot simply left out of the
78
+ * `systems` table cannot say that — an omitted key means "unsupported", which is
79
+ * the same shape as "nobody looked", and the coverage report has to file it as a
80
+ * work order forever. Declaring the absence turns an UNANSWERED row into a
81
+ * terminal one.
82
+ *
83
+ * ```ts
84
+ * export const systems = {
85
+ * audio: sfxAudioSystem(),
86
+ * physics: rapierPhysicsSystem(),
87
+ * networking: absent('single-player: no Colyseus client anywhere in `src/`'),
88
+ * };
89
+ * ```
90
+ *
91
+ * ## It is a CONSTRUCTOR for the shape that already exists, not a second one
92
+ *
93
+ * The returned value IS `VgaiGameSystemEmpty` — the plain
94
+ * `{ present: false, evidence }` record an INGESTED game declares on
95
+ * `window.vgaiGame.systems.systemAdapters`, validated by the same single
96
+ * projection (`ingest/contract-system-adapters.ts`). There is one shape law, not
97
+ * two: a foreign game cannot import this helper and must stay able to write the
98
+ * record by hand, so nothing here may brand the runtime value. What the helper
99
+ * buys a FIRST-PARTY author is the reason-quality check moved to the call site —
100
+ * our own code failing its own contract fails fast, where an ingested game's
101
+ * same mistake is filed as a `malformed` verdict for its coverage report.
102
+ *
103
+ * ## It is a MARKER, never a stub adapter
104
+ *
105
+ * Do not answer an absent slot with an adapter whose methods return zeros. A
106
+ * `getConnectionState()` of `'disconnected'` on a game with no transport implies
107
+ * a connection that could exist; that is the fabrication the anti-shim rule
108
+ * forbids. The absence is STATED, and the host installs nothing for it.
109
+ *
110
+ * @param reason What was searched and what was found, in the game's own source
111
+ * terms. "no netcode anywhere in `src/`" is a finished answer a reviewer can
112
+ * re-run; "not implemented yet" is a plan, and is rejected here.
113
+ */
114
+ export function absent(reason) {
115
+ if (typeof reason !== 'string' || reason.trim() === '') {
116
+ throw new Error('absent(): an absence needs evidence — say what was searched and what was found ' +
117
+ '(e.g. "no Colyseus client anywhere in `src/`"), so a reviewer can re-run it. ' +
118
+ 'An unevidenced absence asserts something nobody can re-check.');
119
+ }
120
+ return { present: false, evidence: reason };
121
+ }
122
+ export function createSystemSlot(config) {
123
+ const { name, unattachedMessage, members } = config;
124
+ let live = null;
125
+ /** Subscribers to the stable slot object; they outlive any one live instance. */
126
+ const listeners = new Set();
127
+ /** The slot's own single subscription to whatever is attached. */
128
+ let liveUnsubscribe = null;
129
+ let subscribeMember = null;
130
+ const asRecord = (value) => value;
131
+ const liveMember = (member) => {
132
+ if (!live)
133
+ return undefined;
134
+ const value = asRecord(live)[member];
135
+ return typeof value === 'function' ? value : undefined;
136
+ };
137
+ const notify = () => {
138
+ for (const listener of [...listeners])
139
+ listener();
140
+ };
141
+ const bindLive = () => {
142
+ liveUnsubscribe?.();
143
+ liveUnsubscribe = null;
144
+ if (!live || subscribeMember === null || listeners.size === 0)
145
+ return;
146
+ const subscribe = liveMember(subscribeMember);
147
+ if (!subscribe)
148
+ return;
149
+ const result = subscribe.call(live, notify);
150
+ liveUnsubscribe = typeof result === 'function' ? result : null;
151
+ };
152
+ const target = {};
153
+ const declared = Object.entries(members);
154
+ for (const [member, spec] of declared) {
155
+ switch (spec.kind) {
156
+ case 'action': {
157
+ // Refuse by name, twice over: no live adapter at all, or a live
158
+ // adapter that does not carry this member (only ever a foreign
159
+ // replacement — the blessed implementations carry all of theirs).
160
+ target[member] = (...args) => {
161
+ if (!live)
162
+ throw new Error(`${name}: ${unattachedMessage}`);
163
+ const fn = liveMember(member);
164
+ if (!fn)
165
+ throw new Error(`${name}: the live adapter has no ${member}().`);
166
+ return fn.apply(live, args);
167
+ };
168
+ break;
169
+ }
170
+ case 'read': {
171
+ const { empty } = spec;
172
+ target[member] = (...args) => {
173
+ const current = live;
174
+ const fn = liveMember(member);
175
+ const value = fn ? fn.apply(current, args) : undefined;
176
+ return value ?? empty;
177
+ };
178
+ break;
179
+ }
180
+ case 'subscribe': {
181
+ if (subscribeMember !== null) {
182
+ throw new Error(`${name}: a slot declares at most one 'subscribe' member (${subscribeMember} and ${member}).`);
183
+ }
184
+ subscribeMember = member;
185
+ target[member] = (listener) => {
186
+ listeners.add(listener);
187
+ bindLive();
188
+ return () => {
189
+ listeners.delete(listener);
190
+ bindLive();
191
+ };
192
+ };
193
+ break;
194
+ }
195
+ case 'optional': {
196
+ Object.defineProperty(target, member, {
197
+ enumerable: true,
198
+ configurable: true,
199
+ get() {
200
+ const current = live;
201
+ const fn = liveMember(member);
202
+ if (!fn)
203
+ return undefined;
204
+ return (...args) => fn.apply(current, args);
205
+ },
206
+ });
207
+ break;
208
+ }
209
+ }
210
+ }
211
+ const attach = (next) => {
212
+ live = next;
213
+ bindLive();
214
+ notify();
215
+ return () => {
216
+ if (live !== next)
217
+ return;
218
+ live = null;
219
+ bindLive();
220
+ notify();
221
+ };
222
+ };
223
+ // THE ONE CAST. `exactOptionalPropertyTypes` forbids an optional member
224
+ // whose getter can yield `undefined`, but that is precisely the honest
225
+ // shape here — the getter IS how presence mirrors the live adapter — and a
226
+ // reflectively built object cannot be typed structurally anyway. Callers
227
+ // see exactly the absent/present behavior the adapter interface documents.
228
+ return { attach, slot: target };
229
+ }
@@ -14,5 +14,15 @@ export interface Transform {
14
14
  * needs simulation coordination (`physics`), or is best-effort/inspect-only
15
15
  * (`script`/`network`/`external`).
16
16
  */
17
- export type TransformOwner = 'editor' | 'physics' | 'animation' | 'script' | 'network' | 'external';
17
+ /**
18
+ * Who drives a node's transform right now.
19
+ *
20
+ * `'unresolved'` is the answer for a node THIS ADAPTER DOES NOT KNOW, and it is
21
+ * a distinct answer on purpose: every other member names a driver, so returning
22
+ * one of them for an unknown id is a positive claim about a node the
23
+ * implementer has never seen. A game-scoped physics adapter is asked about
24
+ * every node the editor touches, including nodes belonging to another root —
25
+ * "not mine" has to be sayable.
26
+ */
27
+ export type TransformOwner = 'editor' | 'physics' | 'animation' | 'script' | 'network' | 'external' | 'unresolved';
18
28
  //# sourceMappingURL=transform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/adapter/transform.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC"}
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../src/adapter/transform.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;;;GAKG;AACH;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,UAAU,GACV,YAAY,CAAC"}
@@ -55,7 +55,23 @@ export declare class NavMeshManager {
55
55
  private destroyRecast;
56
56
  /** True once a navmesh has been built (for the NavigationAdapter to gate on). */
57
57
  hasNavMesh(): boolean;
58
- /** Find a straight path between two world positions. Returns [] if no path. */
58
+ /**
59
+ * Find a straight path between two world positions.
60
+ *
61
+ * THREE OUTCOMES, and only one of them is an empty array:
62
+ *
63
+ * - **No pathfinder.** No navmesh has been built, so there is nothing to
64
+ * query. THROWS, the same way {@link createCrowd} does — `[]` here would
65
+ * say "I searched and there is no route between these points", which is a
66
+ * claim about the level rather than about this manager's state. Callers
67
+ * that can be in this position gate on {@link hasNavMesh} first.
68
+ * - **The query failed.** recast answered `success: false` WITH an error
69
+ * (bad half-extents, no polygon near an endpoint, a status code). THROWS,
70
+ * naming recast's own error — a failed search is not a searched-and-empty
71
+ * one, and the editor's probe already surfaces this separately from "no
72
+ * path found".
73
+ * - **Genuinely no route.** The query ran and found nothing. `[]`.
74
+ */
59
75
  findPath(start: Vector3Like, end: Vector3Like): Vector3Like[];
60
76
  /** Create a crowd with up to maxAgents agents. */
61
77
  createCrowd(maxAgents: number): Crowd;
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources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