DreamLake

Environments development note

Tracking: #261 and master #247.

2026-09-17 — envs deployed to production; sim playback ships in sources

Everything the 2026-09-15 entry below described as local-only has since been merged, released and deployed, and a second increment on top of it — sim playback for recorded MuJoCo/URDF trajectories — merged and deployed today.

Envs shipped. dreamlake env push for MJCF and URDF directories — versioned, content-addressed, interactive web viewer, public/private sharing — is live in production. The guide is published at /envs (live); a public demo is at dreamlake.ai/marvin/envs/g1. The CLI's native channel serves v0.24.2 (today's Source v1 DTO fix) on both latest and stable from R2. The three-repo split the previous entry planned landed as: server — workspace#483, #509, #625; UI — dreamlake-ai#274, #312; CLI — dreamlake-cli#80, #106, #107.

Sim playback (today). A teleop recorder that runs MuJoCo can now write a DreamLake sim-playback dataset directly, and the dashboard plays it back kinematically in 3D:

  • hand_teleop records parquet datasets natively (recorder --dataset; named-channel contract, one model snapshot per dataset) and converts its legacy npz recordings — hand_teleop#1.
  • New mujoco and urdf dataset-viz views: kinematic 3D playback with shared-timeline scrubbing and a Ctrl/⌘+wheel zoom gate — dreamlake-ai#327, #328; viz-workspace#121, #122, #123.
  • A generic conversion contract lets any MuJoCo or URDF trajectory be exported to the same layout. It is documented in /sources (live) and in the downloadable skill (dreamlake-skills#10).
  • Workspace docs and submodule pins: #637, #638, #639.

Demos (production, fortyfive org). sharpa-teleop — MuJoCo hand-teleop recordings, three episodes. g1-dance — URDF G1 dance from a LAFAN1 retarget; kept private because the retarget data is licensed CC BY-NC-ND 4.0.

Validation. hand_teleop: 368 tests green, including bit-for-bit scatter-back of a recorded dataset. dreamlake-ai: 1745 unit tests plus the production build. The eight-item E2E checklist passed on the local stack (pixel-identical seek-back, two-episode isolation, env-override degradation). Playwright smokes passed against deployed staging and production for both views. The only failing CI is the pre-existing tests/host-runs.spec.ts e2e on dreamlake-ai main, red since before #327 and unrelated to this work.

Deployment. dreamlake-ai staging and production run 932cdac. docs.dreamlake.ai serves the envs and sources guides. dreamlake-cli v0.24.2 is published on the native R2 latest and stable channels.

Remaining work

  • The CLI's npm channel still resolves 0.21.2; republishing 0.24.2 there needs an npm login.
  • viz.dreamlake.ai has no option-level reference for the mujoco/urdf views yet (views/spec entries); the contract is documented in /sources and the skill.
  • The pre-existing host-runs.spec.ts e2e failure on dreamlake-ai main is unfixed.
  • g1-dance cannot be made public under the retarget data's CC BY-NC-ND 4.0 license.

2026-09-15 — envs v1 implemented and locally verified; nothing committed, released or deployed

Scope was set with Marvin in-session, per the tracker's "coordinate scope with Marvin" instruction; this entry is the durable record of those decisions.

Decisions

  • Flat identity namespace/env-name with immutable integer versions (latest = max). No grouping/collection tier — explicitly decided against for v1. If "collections" in the tracker title means named groups of envs, that is a separate future layer over this model, not a blocker to it.
  • envType metadata distinguishes simulator families (free string: mujoco | urdf | isaaclab | …). Every type is stored, versioned and pullable; mujoco (live simulation) and urdf (kinematic posing) have web viewers (other types show the version's file listing).
  • Dedup is per env across its versions only — no cross-env content sharing, by explicit security decision.
  • Env file bytes never transit the API server: uploads go through short-lived prefix-scoped STS credentials straight to S3; reads are presigned GETs. The server resolves KB-scale DreamDB metadata only.
  • The read path is plain REST for every client (browser, CLI pull, any HTTP consumer) — no client-side DreamDB SDK on reads.

Storage. Each env owns the prefix envs/<ns>/<name>/ in ENVS_BUCKET (falls back to ARTIFACTS_BUCKET), holding two DreamDB datasets: blobs (one row per unique file; fragment objects are content-addressed, so identical bytes across versions store once and the CLI's hash diff uploads only changed files) and manifests (one row per version: entry file + path→hash listing). The Mongo EnvCatalog row mirrors latest-version metadata for the list page.

Implemented (local working trees across three repos; no commits yet)

  • dreamlake-server: EnvEntry model; member routes (register/upsert with envType, upload-credential broker, restore, soft delete, purge, thumbnail store) and public routes (list, detail, version list, per-version manifest with presigned file URLs); server-side DreamDB reader (envResolve.ts).
  • dreamlake-cli: the former dreamlake env login-environment switcher moved to dreamlake auth env (clean cutover; docs/README updated). New dreamlake env push|create|list|pull|delete|restore with --type, entry auto-detection, incremental hash-diff upload, CAS-conflict retry and hash-verified pull. A CLI docs page exists in the cli.dreamlake.ai source.
  • dreamlake-ai: /:ns/envs list (browser-captured thumbnails, envType tags) and /:ns/envs/:name viewer — interactive MuJoCo scene via @vuer-ai/mujoco-ts (wasm vendored, see gaps), live simulation with play/pause/reset/speed, actuator (ctrl) and joint sliders, geom-group and grid toggles, Alt/Option-drag force perturbation, collapsible file panel.

Validation (all local; no hosted environment touched)

Server route tests 24 passed against the local test database; CLI env tests 21 passed (full suite 1010 with 15 pre-existing unrelated failures); frontend route-layout tests passed and the three repos type-check clean in the touched files. Local end-to-end against MinIO + test Mongo: push, dedup re-push ("0 uploaded, N reused"), byte-identical hash-verified pull, anonymous public reads with private-env 404 gating, browser rendering of three real scenes (car, agility_cassie, cards) including version switching, thumbnail capture round-trip and Alt-drag forces with arrow visualization.

Status. Implementation exists only in local working trees. No commits, no PRs, no staging or production deployment, no CLI/npm/docs release. Not reviewed or tested by Ge. PRs will be linked from #261 when opened.

Remaining work

  • Open the three PRs (server / CLI / UI) and link them from #261.
  • Publish @vuer-ai/mujoco-wasm to npm: pnpm cannot resolve the package-internal file: dependency, so dreamlake-ai currently vendors the wasm (2.8 MB) with a pnpm override.
  • Deploy-order note: prisma db push pre-creates EnvCatalog on deploy.
  • Type-level only: viz-workspace's embedded older @types/three conflicts with the three@0.180 single-copy override the viewer requires.
  • Deferred by design: engine-layer migration to the official @mujoco/mujoco wasm inside mujoco-ts; fit-to-bounds camera; single-file edit API (the manifest format already supports it); env branch/fork.