Files
editor/apps
Adrian PerezandClaude Opus 4.7 bdb47a6e5d feat(editor): expose useScene on window in dev for MCP-editor bridging
Adds window.__pascalScene = useScene in development builds so that a
running MCP process (which has its own Node-side in-memory store) can
inject a built scene into the browser editor for visual verification:

  fetch('/dev/casa-sol.json')
    .then(r => r.json())
    .then(s => window.__pascalScene.getState().setScene(s.nodes, s.rootNodeIds))

Also ships /public/dev/casa-sol.json as a reference scene — the
artefact exported from the MCP Casa del Sol test build.

Gated behind NODE_ENV !== 'production' so nothing leaks to prod.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 18:38:07 +02:00
..