{
  "name": "JEPA Shared World",
  "version": 1,
  "source": "./env.js",
  "description": "A deterministic multi-agent car and drone environment with explicit policy controllers, geometry observations and configurable rewards. DM-JEPA weights are fixed; this environment does not train a model by itself.",
  "verification": {
    "asOf": "2026-10-09",
    "passedChecks": [
      {
        "file": "./env.test.mjs",
        "passed": 23,
        "scope": "Deterministic environment logic"
      },
      {
        "file": "./mesh-collision.test.mjs",
        "passed": 15,
        "scope": "Triangle collision and ray queries against synthetic geometry"
      },
      {
        "file": "./city-geometry.test.mjs",
        "passed": 7,
        "scope": "Synthetic tile geometry decoding, coordinates, textures and selection"
      },
      {
        "file": "./protocol.test.mjs",
        "passed": 36,
        "scope": "In-memory room/RL/geometry/preset/proxy/host requests and mocked browser networking"
      },
      {
        "file": "./control-policy.test.mjs",
        "passed": 6,
        "scope": "Explicit assisted-turn limiter; raw/manual commands unchanged; alignment, sign, no-target and obstacle guards"
      }
    ],
    "passedIntegrationScripts": [
      "./mesh-env.test.mjs",
      "./terrain.test.mjs",
      "./city-scene.test.mjs"
    ],
    "integrationScope": "Synthetic triangle attachment, contacts, range observations, reset identity, atomic failure and metadata-only snapshots.",
    "liveHTTPVerified": true,
    "liveHTTPEvidence": "./verification/live-http-evidence.json",
    "liveCapacityEvidence": "./verification/live-capacity-evidence.json",
    "liveSFEvidence": "./verification/live-sf-evidence.json",
    "liveSFTerrainEvidence": "./verification/live-sf-terrain-evidence.json",
    "liveAssistanceEvidence": "./verification/live-assist-evidence.json",
    "liveLANEvidence": "./verification/live-lan-evidence.json",
    "liveLANScope": "Actual HTTP/SSE to loopback and the advertised private LAN address from this Mac, with shared-room manual movement, Origin/Host checks and static-asset scope. A second physical device and browser play are separate checks.",
    "liveSFTerrainScope": "Fresh server with measured ground: two actual SSE peers preserve all 6561 heights and both mesh hashes; 8 seconds of human car/drone input yields ground-following motion and touchdown. Real HTTP RL episodes repeat exactly after reset, including ground range and rewards.",
    "liveHTTPScope": "Two real SSE players, authoritative physics and synthetic bot metadata, real-time expiry, reconnect pause/resume, matching synthetic triangle geometry, and deterministic RL reset/step/reward/truncation. This is transport evidence, not model inference or public SF rendering evidence.",
    "browserRenderingVerified": false,
    "publicSFTilesFetched": true,
    "phoneInstallationVerifiedForThisWorld": false,
    "screenshotsCapturedForThisWorld": false,
    "genuineModelInferenceVerified": true,
    "modelInferenceEvidence": "./verification/live-sf-model-evidence.json",
    "modelInferenceScope": "Historical FP32 adaptive Node CPU runs on the initial four-goal course: raw and old assisted control each reached 0/4 in 30 seconds. That course crossed buildings and held-yaw assistance oscillated; both environment defects are now fixed. These historical runs are retained without treating them as a benchmark result.",
    "liveAssistedModelEvidence": "./verification/live-sf-room-model-evidence.json",
    "liveAssistedModelScope": "Historical generic-assistance (+2.5 on the scripted baseline action) with actual FP32 adaptive ONNX inference in a real-time authoritative room completed the visible 13-gate street circuit in 79.5 simulated seconds with zero collisions. Explicit navigation assistance changed all 150 policy selections; raw, policy and applied actions are recorded separately. This establishes assisted-controller gameplay, not raw-model competence or browser rendering. This predates danger-world-v1 custom rule priors.",
    "liveRawModelEvidence": "./verification/live-sf-room-raw-model-evidence.json",
    "liveRawModelScope": "The same FP32 adaptive graph controlled a bot on the new 13-gate course with assistance disabled. A 30-second wall-clock probe produced 51 actual decisions and 0 checkpoints, with no collisions or overrides. This short environment-specific run is not a benchmark ranking.",
    "inputFormatEvidence": "./verification/sf-input-format-comparison.json",
    "exportComparisonEvidence": "./verification/sf-export-comparison.json",
    "exportComparisonScope": "Six SF observations: fixed-four-step FP32 matched adaptive FP32 probabilities exactly; INT8 agreed on 5 of 6 choices with maximum probability difference 0.0122076. This small comparison is not a general parity claim.",
    "remaining": "Browser rendering, browser model execution, screenshot review and phone installation remain unverified. The browser tool still reports a saved denial for http://127.0.0.1:8100, including a retry after the user reported access allowed. The local server is running normally.",
    "circuitEvidence": "./verification/sf-circuit-baseline-evidence.json",
    "circuitScope": "Deterministic scene generation from the actual frozen SF triangles and measured terrain; 26 visible gates (13 per vehicle), 2934 full-body clearance samples, and bounded scripted baseline completion. Car: 13/13 in 35.00 seconds, zero contacts; drone: 13/13 in 47.23 seconds, zero contacts. No model inference or browser rendering is claimed by this check.",
    "terrainEvidence": "./verification/terrain-evidence.json",
    "terrainScope": "Measured SF grid and NAVD88\u2192EGM96 conversion; exact rendered triangle/height/range agreement, uphill car motion, gentle drone landing, deterministic terrain serialization. Local real-SF geometry run moved a car and drone for four seconds with zero collisions. Browser appearance remains unverified.",
    "dangerWorldPriorRuntimeVerified": true,
    "dangerWorldPriorScope": "Current motion contract and trusted SF preset, actual adaptive-FP32 inference in real-time rooms: drone13/13 in92.10simulatedseconds, car13/13 in69.07seconds, zero contacts. Priors changed all33drone and39car choices. This is assisted navigation, not raw-model competence or browser/native rendering.",
    "dangerWorldPriorFailedEvidence": "./verification/live-sf-room-custom-prior-2026-10-09T22-28-09.081Z.json",
    "dangerWorldPriorEvidence": "./verification/live-sf-room-custom-prior-2026-10-09T23-46-15.954Z.json",
    "motionInputEvidence": "./verification/world-motion-input-2026-10-09T23-39-30.259Z.json",
    "motionInputScope": "Six actual adaptive-FP32 SF simulator probes after exposing signed velocity and truthful action dynamics. All three drone inputs chose climb and all three car inputs chose brake. Input execution passes; improved navigation, browser rendering and new phone deployment are not established.",
    "liveMotionContractEvidence": "./verification/live-motion-contract-2026-10-09.json",
    "liveMotionContractScope": "Isolated current-source HTTP server: both cars and drones expose motion/control fields; 90-step action sequence and rewards reproduce exactly after reset. No screenshot or current 8100 deployment claim.",
    "livePresetEvidence": "./verification/live-preset-evidence-2026-10-09.json",
    "livePresetScope": "Two actual SSE clients on the updated usual port8100 shared exact14184-triangle SF geometry and6561terrain heights, moved car/drone with zero contacts and received31snapshots each. RL reset/replay matched; arbitrary upload without key returned403. Browser rendering and physical-device play remain separate.",
    "priorContributionRecordedStatesEvidence": "./verification/prior-model-contribution-recorded-states-2026-10-09.json",
    "priorContributionRecordedStatesScope": "On the recorded states, replacing model scores with uniform probabilities leaves all72inference-time and1159fresh-prior choices unchanged. This is counterfactual selection on the captured observations, not a new trajectory/reward ablation; useful model contribution is not established."
  },
  "coordinates": {
    "unit": "meters",
    "x": "east",
    "y": "up",
    "z": "south",
    "yaw": "radians clockwise from negative Z",
    "forward": [
      "sin(yaw)",
      0,
      "-cos(yaw)"
    ]
  },
  "observation": {
    "source": "simulated-geometry",
    "cameraInput": false,
    "fields": {
      "state": "Raw telemetry text for DM-JEPA, including geometry ranges, goal, nearby actors, signed world/body velocity and simulator control dynamics.",
      "instructions": "Task instructions supplied to the model.",
      "options": "Ordered label/criteria action candidates. Index is the action ID.",
      "vector": "22 floating point values in the order below; values are not normalized.",
      "info": "Episode, step, simulation time, target, ranges, nearby actors, completion and ruleAction. ruleAction is an explicit baseline suggestion outside the model's state/instructions."
    },
    "vectorLength": 22,
    "vectorNames": [
      "position_x_m",
      "position_y_m",
      "position_z_m",
      "velocity_x_mps",
      "velocity_y_mps",
      "velocity_z_mps",
      "heading_sin",
      "heading_cos",
      "target_distance_m",
      "target_bearing_error_rad",
      "target_altitude_error_m",
      "range_front_m",
      "range_left_m",
      "range_right_m",
      "range_back_m",
      "range_front_left_m",
      "range_front_right_m",
      "range_up_m",
      "range_down_m",
      "goal_index",
      "collision_count",
      "battery_percent"
    ],
    "rangeMaximumMeters": 65,
    "motionCoordinates": {
      "world": "east, up, south in meters/second",
      "body": "forward, right, up in meters/second",
      "precision": "Velocity components are rounded to 0.01 meters/second in model text; the numerical observation vector remains unrounded."
    }
  },
  "actions": {
    "car": [
      "keep",
      "accelerate",
      "brake",
      "slow",
      "left",
      "right",
      "turnLeft",
      "turnRight"
    ],
    "drone": [
      "hold",
      "climb",
      "descend",
      "yawLeft",
      "yawRight",
      "forward",
      "backward",
      "rth",
      "land"
    ],
    "continuous": {
      "throttle": [
        -1,
        1
      ],
      "steer": [
        -1,
        1
      ],
      "lift": [
        -1,
        1
      ],
      "brake": [
        0,
        1
      ]
    },
    "continuousExample": {
      "throttle": 0.7,
      "steer": -0.2,
      "lift": 0,
      "brake": 0
    },
    "note": "One action per agent ID per step. Discrete indices are zero-based. Missing REST actions use environment defaults: cars coast under drag, drones decelerate to hover. Send car action 2 for a full brake. rth is the explicitly named built-in return-to-home controller.",
    "duration": "Discrete choices are continuous rate commands while applied. The caller controls hold duration; inference latency can age the observation. They are not completed finite-distance or finite-angle maneuvers."
  },
  "scenarios": {
    "explore": "Continuous exploration; checkpoints loop and maxSeconds does not end the episode.",
    "race": "Complete every checkpoint for the vehicle kind, or truncate at maxSeconds.",
    "courier": "Reach pickup then delivery, or truncate at maxSeconds. The default route uses the second and final checkpoints."
  },
  "rewards": {
    "newCollisionContact": -5,
    "checkpoint": 20,
    "completedMission": 50,
    "newExplorationCell": 1,
    "explorationCellMeters": [
      12,
      10,
      12
    ],
    "progress": "0.035 * (previous target distance - current target distance)",
    "time": "-0.01 * dt outside explore; zero in explore",
    "score": "Sum of the agent's rewards during the episode."
  },
  "scene": {
    "default": "harbor-yard",
    "descriptorFields": [
      "id",
      "name",
      "bounds",
      "spawnPoints",
      "colliders",
      "checkpoints",
      "decor",
      "splat",
      "city",
      "collisionMesh",
      "terrain"
    ],
    "collisionSource": {
      "withoutCollisionMesh": "scene-aabbs",
      "withCollisionMesh": "rendered-triangles-and-scene-aabbs",
      "worldBounds": "World bounds remain enforced; terrain replaces the constant lower plane and cars follow the measured surface.",
      "withTerrain": "rendered-triangles-and-heightfield"
    },
    "appearanceSource": "Procedural harbor meshes; public PLW/Esri textured SF buildings on measured USGS ground with aerial orthoimagery; optional Gaussian splat appearance.",
    "splatProvidesCollisions": false,
    "limits": {
      "colliders": 512,
      "checkpoints": 128,
      "spawnPoints": 64,
      "decor": 256,
      "collisionTriangles": 200000,
      "terrainColumns": 129,
      "terrainRows": 129
    },
    "collisionMesh": {
      "metadataFields": [
        "id",
        "hash",
        "triangleCount",
        "bounds"
      ],
      "storedInSnapshot": "Identity metadata only; triangle arrays and BVH are never serialized in snapshots.",
      "localAttachment": "WorldEnv config.collisionWorld must contain a matching TriangleCollider.",
      "serverAttachment": "Upload triangles through /api/geometry, then provide the returned private capability and exact scene.collisionMesh metadata."
    },
    "city": {
      "provider": "plw-sf",
      "attribution": "San Francisco 3D buildings \u00b7 Precision Light Works (PLW) \u00b7 Esri",
      "sourceURL": "https://tiles.arcgis.com/tiles/z2tnIkrLQ2BRzr6P/arcgis/rest/services/SanFrancisco_Bldgs/SceneServer/layers/0",
      "sourceItemURL": "https://www.arcgis.com/home/item.html?id=d3344ba99c3f4efaa909ccfbcc052ed5",
      "loader": "./city-layer.js",
      "loaderIntegratedInSource": true,
      "publicDataRuntimeVerified": true,
      "publicDataRuntimeScope": "Six fetched public I3S tiles, 14184 triangles. Actual HTTP upload preserves hash/bounds; two SSE players share the frozen mesh; a real facade blocks drone motion and supplies matching sensor/reward observations. Browser texture rendering is a separate check.",
      "episodeGeometry": "One frozen tile selection supplies the rendered triangles and collision triangles. Mesh identity must match across the local simulator and room server.",
      "circuit": {
        "sceneArtifact": "./verification/sf-circuit-scene.json",
        "geometryFixture": "./verification/fixtures/sf-neighborhood.json.gz",
        "checkpointsPerVehicle": 13,
        "gridSpacingMeters": 6,
        "maximumLegMeters": 45,
        "clearanceEnvelopeRadiusMeters": 3,
        "generation": "Connected street graph, shortest paths between circuit anchors, then body-clear line-of-sight simplification. Generated once from the actual building triangles and measured terrain.",
        "runtime": "All planned corners are serialized, visible checkpoints. No hidden runtime planner controls the vehicle. Model-only actions retain their supplied physics.",
        "scenarioScope": "Race and explore follow the complete ordered circuit. Courier selects pickup/delivery goals and does not automatically traverse all intermediate gates.",
        "verification": "./city-scene.test.mjs; bounded to 120 simulated seconds per scripted vehicle; no network or browser dependency.",
        "historicalEvidence": "The earlier live-sf-model-evidence.json four-gate runs are preserved unchanged and must not be reported as results on this circuit."
      },
      "terrain": {
        "descriptor": "scene.terrain",
        "sourceFile": "./data/sf-ground.json",
        "imageFile": "./data/sf-ground.jpg",
        "captureDate": "2026-10-09",
        "origin": {
          "latitude": 37.7939,
          "longitude": -122.3965,
          "altitude": 0
        },
        "coverageMeters": [
          420,
          420
        ],
        "playableMeters": [
          360,
          360
        ],
        "sampleCount": [
          81,
          81
        ],
        "sampleSpacingMeters": 5.25,
        "heightRangeMeters": [
          0.6159,
          7.5515
        ],
        "source": "USGS 3DEP bare-earth DEM (raw float32 export, not hillshade)",
        "elevationService": "https://elevation.nationalmap.gov/arcgis/rest/services/3DEPElevation/ImageServer",
        "imagerySource": "USGS National Map orthoimagery",
        "imageryService": "https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer",
        "imagePixels": [
          2048,
          2048
        ],
        "verticalDatum": "EGM96 (PLW vertical CRS EPSG:5773)",
        "sourceVerticalDatum": "NAVD88",
        "datumConversion": "NOAA VDatum, westcoast region, GEOID18\u2192EGM1996, epoch 2010",
        "verticalOffsetMeters": -0.798,
        "datumUncertaintyMeters": 0.926,
        "offsetVariationAcrossPatchMeters": 0.005,
        "provenance": "Source request URLs, raster/image SHA-256 hashes and five complete NOAA responses are preserved in sf-ground.json. Capture date is not the aerial acquisition date.",
        "physics": "The serialized heightfield drives car grade, drone ground landing and terrain rays; rendering uses the same triangle split. Building collisions remain in the separately frozen building BVH.",
        "limitations": "One bounded neighborhood; 5.25 m terrain samples do not resolve curbs, stairs or traffic. Imagery has its native source resolution; exporting 2048 pixels does not create extra detail. These independently acquired public layers can differ in capture date and registration by around a meter; this is a simulator, not surveyed drone navigation."
      }
    },
    "note": "A Gaussian scene must be aligned with matching collision geometry for meaningful physics. Uploading a splat alone does not reconstruct geometry or supply camera perception."
  },
  "rest": {
    "baseURL": "http://127.0.0.1:8100",
    "contentType": "application/json",
    "authorization": "Authorization: Bearer <token returned by reset>",
    "idleExpirySeconds": 600,
    "maxBodyBytes": 262144,
    "maxAgents": 16,
    "defaultDt": 0.03333333333333333,
    "dtRange": [
      0.008333333333333333,
      0.1
    ],
    "framesRange": [
      1,
      120
    ],
    "endpoints": [
      {
        "method": "POST",
        "path": "/api/env/reset",
        "authenticated": false,
        "requestExample": {
          "seed": 7,
          "scenario": "race",
          "maxSeconds": 300,
          "agents": [
            {
              "id": "drone",
              "name": "Policy A",
              "kind": "drone",
              "controller": "dmjepa",
              "assist": false
            },
            {
              "id": "car",
              "name": "Policy B",
              "kind": "car",
              "controller": "human",
              "assist": false
            }
          ]
        },
        "responseFields": [
          "id",
          "token",
          "snapshot",
          "observations"
        ],
        "note": "Creates an isolated environment. Controller labels are metadata: the REST API never runs a model or silently inserts a rules policy."
      },
      {
        "method": "POST",
        "path": "/api/env/{id}/step",
        "authenticated": true,
        "requestExample": {
          "actions": {
            "drone": 5,
            "car": 1
          },
          "dt": 0.03333333333333333,
          "frames": 1
        },
        "responseFields": [
          "observations",
          "rewards",
          "terminated",
          "truncated",
          "info",
          "snapshot"
        ],
        "note": "Maps are keyed by agent ID. For frames > 1, rewards are summed and observations/info are from the last step. Execution stops early if every agent has terminated or truncated."
      },
      {
        "method": "POST",
        "path": "/api/env/{id}/reset",
        "authenticated": true,
        "requestExample": {
          "seed": 8,
          "scenario": "courier"
        },
        "responseFields": [
          "snapshot",
          "observations"
        ],
        "note": "Resets the existing environment, preserving unspecified configuration."
      },
      {
        "method": "GET",
        "path": "/api/env/{id}/state",
        "authenticated": true,
        "responseFields": [
          "snapshot",
          "observations"
        ]
      },
      {
        "method": "DELETE",
        "path": "/api/env/{id}",
        "authenticated": true,
        "responseFields": [
          "ok"
        ]
      }
    ],
    "errors": {
      "400": "Invalid configuration or action",
      "401": "Invalid environment capability",
      "404": "Missing or expired environment",
      "413": "Body too large",
      "429": "Rate limited",
      "503": "Environment capacity reached"
    }
  },
  "multiplayer": {
    "module": "./room-client.js",
    "maxPlayers": 8,
    "maxBots": 3,
    "physicsHz": 30,
    "snapshotHz": 10,
    "inputExpiryMs": {
      "human": 500,
      "dmjepa": 2000
    },
    "membershipExpirySeconds": 120,
    "actionValidation": "Actions carry episode and observation step; player inputs also carry a controller/vehicle revision. Old generations and delayed inputs are rejected. Room versions prevent stale HTTP replies from replacing newer SSE snapshots.",
    "authority": "Server owns poses, physics, collisions, goals and rewards. Clients send actions only.",
    "modelExecution": "Host browser runs DM-JEPA bots. Each player may run DM-JEPA for their own vehicle. Rules bots are explicitly labeled and run on the server.",
    "hostDisconnected": "World pauses and bot commands are cleared until the host reconnects. Room expires after 120 seconds without host activity.",
    "invite": "Share the room URL or six-character code on the same reachable room server. Tokens are private capabilities and must not be shared as invites.",
    "serverInfo": {
      "method": "GET",
      "path": "/api/server-info",
      "responseFields": [
        "scope",
        "inviteBaseURL",
        "inviteBaseURLs"
      ],
      "scope": "lan when the listener serves detected RFC1918 IPv4 interfaces; local when it only exposes a local page origin.",
      "use": "Keep the host's RoomClient on its current origin. Use a returned LAN origin only in friend invitations; guests open that origin's own page. Localhost remains a secure context for host inference while HTTP LAN guests can use manual controls."
    },
    "allowedHosts": "localhost, loopback, the explicit bound IP and detected private IPv4 interface addresses. JEPA_ALLOWED_HOSTS adds comma-separated host names/IPs without schemes, ports or paths. Unknown Host names are rejected before API/static dispatch.",
    "staticScope": "Only application paths under dual-loop-web are served. Dot/private/log paths, verification artifacts, fixtures, test sources and package metadata are excluded; paths and resolved symlink targets must both pass the same scope checks.",
    "nativePageLimitation": "Packaged appassets pages do not connect to arbitrary room servers. Open that server's own browser page for the implemented same-origin room protocol.",
    "runtimeVerified": true,
    "runtimeVerificationScope": "Actual HTTP/SSE protocol with two clients and explicitly synthetic model metadata; two clients also shared and moved through the same frozen public SF geometry. Browser multiplayer play and real inference are separate acceptance checks.",
    "runtimeEvidence": "./verification/live-http-evidence.json"
  },
  "geometryAPI": {
    "maxBodyBytes": 25165824,
    "maxTrianglesPerUpload": 200000,
    "maxTotalStoredTriangles": 400000,
    "maxRegistryEntries": 8,
    "maxConcurrentUploadBodies": 2,
    "unusedExpirySeconds": 600,
    "activeReferencesPinGeometry": true,
    "rateLimits": {
      "perIPPerSecond": 0.1,
      "perIPBurst": 2,
      "globalPerSecond": 1,
      "globalBurst": 4
    },
    "endpoints": [
      {
        "method": "POST",
        "path": "/api/geometry",
        "authenticated": true,
        "requestExample": {
          "id": "wall-example",
          "triangles": [
            -10,
            0,
            -10,
            10,
            0,
            -10,
            10,
            20,
            -10,
            -10,
            0,
            -10,
            10,
            20,
            -10,
            -10,
            20,
            -10
          ]
        },
        "responseFields": [
          "geometryId",
          "token",
          "metadata",
          "idleExpirySeconds"
        ],
        "note": "A flat JSON array contains nine finite numbers per triangle, in world meters. Server construction copies Float32 coordinates and returns the resulting metadata."
      },
      {
        "method": "DELETE",
        "path": "/api/geometry/{geometryId}",
        "authenticated": true,
        "authorization": "Authorization: Bearer <geometry upload token>",
        "responseFields": [
          "ok"
        ],
        "note": "Only unused uploads can be deleted; active room/RL references return 409."
      }
    ],
    "attachToRoomOrEnvironment": {
      "scene.collisionMesh": "Copy the upload response metadata object unchanged.",
      "geometry.geometryId": "Copy the upload response geometryId.",
      "geometry.token": "Copy the upload response token. Keep it private.",
      "where": "Include scene and geometry together in room create/reset or the RL reset configuration. Wrapped RL requests place both inside config."
    },
    "matchingRequired": [
      "id",
      "hash",
      "triangleCount",
      "bounds.min",
      "bounds.max"
    ],
    "resetBehavior": "An ordinary reset retains the attached matching collider. Switching mesh requires its capability. Missing or mismatched geometry rejects the operation; failed resets preserve the current world.",
    "clientHelpers": [
      "RoomClient.uploadGeometry(triangles, {id})",
      "RoomClient.releaseGeometry(capability)"
    ],
    "privacy": "Capabilities and triangle bytes are private in-memory server data. Snapshots and invitations carry no geometry capability. No triangle download endpoint exists.",
    "verifiedScope": "In-memory requests plus actual HTTP upload, attachment, matched identity, active-reference deletion protection, synthetic wall contact, and atomic failed resets. Real HTTP checks also verify the 24 MiB body limit, 200000-triangle upload limit, per-IP rate burst, 400000 stored-triangle capacity and release/reuse. Capacity evidence: verification/live-capacity-evidence.json.",
    "trustedPresets": {
      "catalog": "GET /api/scene-presets",
      "selection": {
        "geometry": {
          "presetId": "sf-downtown-v1"
        }
      },
      "scene": "Use the matching catalog scene manifest. The server validates mesh identity, city alignment and terrain. Checkpoints may be customized while preserving that physical identity.",
      "auth": "Trusted preset selection needs no upload key; arbitrary geometry uploads remain operator-authenticated.",
      "lifetime": "Server-owned preset collider is reused across room and RL episodes; no private upload capability is exposed.",
      "browser": "RoomClient.geometryForScene resolves a matching loaded city to the preset.",
      "data": [
        "./data/sf-downtown-scene.json",
        "./data/sf-downtown-collision.json.gz"
      ]
    }
  },
  "assistance": {
    "module": "./control-policy.js",
    "optIn": "Applies only to actors explicitly configured controller=dmjepa and assist=true.",
    "yawLimiter": "At each 30 Hz local/room tick, an assisted drone yaw is held at hover when target bearing reaches the existing 0.14-radian deadband or the held direction now turns away. It requires a current target and at least 6 meters of forward clearance; close-obstacle avoidance turns remain unchanged. For danger-world-v1 metadata, only turns explicitly marked priorTurnTarget=true are limited; avoidance turns are left intact.",
    "decisionFields": {
      "modelChoice": "Raw model argmax, preserved.",
      "executedChoice": "Assisted policy selection before the actuation limiter, preserved.",
      "appliedChoice": "Actual assisted command after the limiter.",
      "assistLimitReason": "Explicit reason when the limiter changes a held turn to hover; null otherwise.",
      "appliedPrior": "Current telemetry prior applied between real model replies, stored separately from the original prior selection.",
      "modelFresh": "Whether the actual model command is within its existing two-second validity window; rules do not renew it."
    },
    "rl": "The isolated REST step API applies supplied actions exactly. External learners may explicitly call the helper each step; assistance is never inserted by the RL endpoint.",
    "prior": {
      "module": "./prior.js",
      "version": "danger-world-v1",
      "method": "softmax(log(max(rawProbability, 1e-9)) + boundedOffset), followed by argmax",
      "enabled": "New solo sessions use world priors by default, clearly labeled JEPA + world priors. The player toggle is stored under danger-world-priors. Bot policy can select model only, world priors, or a separate scripted baseline.",
      "inputs": "Labeled action candidates and current visible simulated telemetry: ranges, velocity, nearby actors, target bearing/distance/altitude. The prior never reads info.ruleAction, hidden route geometry, answer keys, or future states.",
      "telemetry": "Raw probabilities/modelChoice are preserved alongside priorOffsets, priorReasons, adjustedProbabilities, priorChoice, priorVersion and priorTurnTarget. Actual per-tick action remains separate.",
      "scope": "Simulation only. These hand-written priors do not update DM-JEPA weights and are not a real-aircraft obstacle-avoidance system.",
      "refreshHz": 30,
      "refresh": "Local and room controllers reweight the last real model probabilities from fresh visible telemetry at 30 Hz. Original model and inference-time prior fields remain unchanged; appliedPrior records current offsets, reasons, choice and observation step/time/target. Refreshing never extends the two-second model-result timeout."
    }
  },
  "learning": {
    "onlineTraining": false,
    "description": "Use reset/observe/step/reward to connect an external learner. Existing DM-JEPA integration performs fixed-weight inference only."
  },
  "deployment": {
    "edition": "Cloudflare Pages + WebRTC peers",
    "physicsAuthority": "Hosting browser",
    "serverRestAPIAvailable": false,
    "rl": "Client-side reset/observe/step hooks; no hosted Node environment endpoints",
    "persistence": "IndexedDB on this browser; no shared account database",
    "signaling": "Only room membership and SDP/ICE relay in Durable Objects",
    "legacyServerDocumentation": "Any Node REST descriptions below are source-reference metadata, not services exposed by this deployment"
  }
}
