Build and revise procedural 3D assets with your coding agent. Local MCP server, CLI and TypeScript engine with rendered review, editable source and GLB export.
JavaScript 3d3d-assets3d-modelingagent-skillsagent-toolsai-agentsasset-pipelinecligame-assetsglbgltfmcpmcp-servermodel-context-protocolprocedural-generationprocedural-modelingtext-to-3dthreejstypescript
fix(render): keep CPU renderer identity lazy (#24)
Matthew Kissinger1651319a00af
diff --git a/src/agent/generate.ts b/src/agent/generate.tsindex 8be4a541..415b3f81 100644--- a/src/agent/generate.ts+++ b/src/agent/generate.ts@@ -24,7 +24,6 @@ import {type ResolvedCapture,} from '../views/capture';import { compositeViewPngGrid } from '../views/grid';-import { CPU_RASTER_RENDERER_ID } from '../views/renderer-id';import type { AssetStyle } from '../prompt';import { createAssetIntentV1, type AssetCategory, type AssetIntentV1 } from '../contracts';import { runKilnAgent, type RefineMode, type KilnKnowhow, type KilnInputImage } from './run';@@ -419,7 +418,10 @@ export async function generateKilnAsset(}if (!views) {try {- const { renderCodeViewGrid } = await import('../views');+ // Keep the renderer id on this same lazy entrypoint. renderer-id.ts reads+ // package metadata at module initialization; an eager import changes the+ // production agent boot graph even when no CPU fallback is needed.+ const { renderCodeViewGrid, CPU_RASTER_RENDERER_ID } = await import('../views');// The degrade path must reproduce the SAME layout the port was asked// for, or a GPU outage silently reshapes the artifact.const grid = await renderCodeViewGrid(agent.code, capture ? { capture } : {});