@womp/spark-agent 5.0.1 → 5.0.2

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.
@@ -108,14 +108,15 @@ Check font, HDR, and material catalogs before selecting names. A host can explic
108
108
  unavailable. Selecting an HDR resets its intensity; apply a custom intensity after selecting it.
109
109
  For library materials, use listSuperMaterials(), then await materialImport(name) inside scene.access and assign the returned numeric ID the way that object requires: nodeSetMaterialId or curvePointSetMaterialId for scene nodes, the FlowIR SetMaterial node for a Geometry Nodes graph. A failed import rolls back the draft.
110
110
  Filter large read results with JavaScript and print only useful details.
111
- After a major edit, capture a screenshot outside the transaction and emitImage its reference.
112
- screenshot() captures the current Kakapo viewport without moving or fitting the camera.
111
+ After a major edit, capture a screenshot outside the transaction and emitImage its reference.
113
112
  screenshot({ camera: { position: {x,y,z}, target: {x,y,z}, projection: 'perspective', horizontalFovDegrees: 60 } })
114
- sets a world-space camera in Womp scene coordinates and current project units (Y-up), and leaves it active.
115
- Use horizontalFovDegrees for perspective zoom, or projection: 'orthographic' with orthographicWidth in project units.
116
- Omitted projection/lens settings are preserved. Position and target are required together; avoid coincident points or an exactly vertical direction.
117
- Pass an explicit camera again for repeatable captures; targetId and view presets are not supported.
118
- Respect the host's camera-lock restrictions. Only claim visual verification for features visible in the captured view. Verify silhouette,
113
+ sets a world-space camera in the same Womp coordinates and project units as scene positions (Y-up).
114
+ For orthographic framing use projection: 'orthographic' and orthographicWidth in project units instead of FOV.
115
+ Direction is derived from position/target; do not use coincident points or an exactly vertical viewing direction.
116
+ Omitted projection/lens settings come from the active camera. Pass the camera again for repeatable captures.
117
+ For object-focused screenshots, identify the requested object and frame it using world-space bounds. Convert local bounds using the object’s and applicable ancestor transforms, including translation, rotation, and scale; do not transform world-space bounds again. Reuse established framing when appropriate and avoid clipping the subject.
118
+ Omitting camera captures the active viewport without auto-fit. Use it when the user asks about the current viewport or clearly refers to what is visible on screen, not on the assumption that it shows the requested object.
119
+ Respect the host's camera-lock restrictions. Verify silhouette,
119
120
  connections, openings, proportions, and materials before claiming completion. Use the owning top-level Area for scene-space bounds;
120
121
  OpenSCAD part bounds are local to the part; individual primitive and curve bounds are unsupported. Renderer bounds and resize calls
121
122
  must finish before subsequent writes. Inside scene.access, complete renderer-backed bounds reads before the first
@@ -126,9 +127,7 @@ A failed script can retain earlier committed effects. Use receipts and inspect u
126
127
  "print(await womp.scene.health());",
127
128
  "print(await womp.scene.health([objectId]));",
128
129
  "print(await womp.scene.access(scene => scene.nodes({ name: 'body' })));",
129
- "const unit = await womp.scene.access(scene => scene.unitMultiplier); await emitImage(await womp.scene.screenshot({ camera: { position: { x: 100 * unit, y: 75 * unit, z: 100 * unit }, target: { x: 0, y: 0, z: 0 }, projection: 'perspective', horizontalFovDegrees: 60 } }));",
130
- "const unit = await womp.scene.access(scene => scene.unitMultiplier); await emitImage(await womp.scene.screenshot({ camera: { position: { x: 0, y: 25 * unit, z: 100 * unit }, target: { x: 0, y: 0, z: 0 }, projection: 'orthographic', orthographicWidth: 80 * unit } }));",
131
- "const result = await womp.scene.access(scene => { const diameter = 20 * scene.unitMultiplier; const areaId = scene.nodeCreate(scene.NodeType.Union, 0); const bodyId = scene.nodeCreate(scene.NodeType.Primitive, areaId); scene.nodeSetName(bodyId, '20 mm orange sphere'); scene.nodeSetPrimType(bodyId, scene.PrimitiveType.Sphere); scene.nodeSetSize(bodyId, { x: diameter, y: diameter, z: diameter }); scene.nodeSetPos(bodyId, { x: 0, y: diameter / 2, z: 0 }); const materialId = scene.materialCreate(); scene.materialSetColor(materialId, { r: 255, g: 128, b: 0 }); scene.nodeSetMaterialId(bodyId, materialId); return { areaId, bodyId }; }); print(result); await emitImage(await womp.scene.screenshot());",
130
+ "const snapshot = await womp.scene.access(scene => ({ unitMultiplier: scene.unitMultiplier })); const diameter = 20 * snapshot.unitMultiplier; const result = await womp.scene.access(scene => { const areaId = scene.nodeCreate(scene.NodeType.Union, 0); const bodyId = scene.nodeCreate(scene.NodeType.Primitive, areaId); scene.nodeSetName(bodyId, '20 mm orange sphere'); scene.nodeSetPrimType(bodyId, scene.PrimitiveType.Sphere); scene.nodeSetSize(bodyId, { x: diameter, y: diameter, z: diameter }); scene.nodeSetPos(bodyId, { x: 0, y: diameter / 2, z: 0 }); const materialId = scene.materialCreate(); scene.materialSetColor(materialId, { r: 255, g: 128, b: 0 }); scene.nodeSetMaterialId(bodyId, materialId); return { areaId, bodyId }; }); print(result); await emitImage(await womp.scene.screenshot({ camera: { position: { x: diameter * 2, y: diameter * 1.5, z: diameter * 2 }, target: { x: 0, y: diameter / 2, z: 0 }, projection: 'perspective', horizontalFovDegrees: 60 } }));",
132
131
  ],
133
132
  },
134
133
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@womp/spark-agent",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "Portable skills-based AI agent with local and durable chat transports for Womp",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",