@womp/spark-agent 17.7.1 → 17.7.3

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ Notable changes to `@womp/spark-agent`, newest first. Versions follow
4
4
  [Semantic Versioning](https://semver.org/). Add an entry with each version bump; describe what
5
5
  changed for hosts and users, and how to migrate across breaking changes.
6
6
 
7
+ ## 17.7.3 — 2026-11-25
8
+
9
+ ### Changed
10
+
11
+ - Fit shallow parts to their rounded footprints and use fitted profiles for rolled cuffs and hems.
12
+ - Repair loft banding by adjusting sample overlap or blend when density tuning leaves visible bands.
13
+ Recheck the affected surface and nearby clearances after each adjustment.
14
+
15
+ ## 17.7.2 — 2026-11-24
16
+
17
+ ### Changed
18
+
19
+ - Choose editable outlines or swept profiles from the target geometry. Teach the scene-editing
20
+ skill to fit long Bézier spans with deliberate handles and verify contour, cross-sections and
21
+ material transitions between anchors. Include a two-anchor bend and guidance for refitting
22
+ an existing curve.
23
+
7
24
  ## 17.7.1 — 2026-11-22
8
25
 
9
26
  ### Changed
@@ -39,7 +39,7 @@ export function createSceneCapability(host) {
39
39
  skills: [
40
40
  {
41
41
  name: "scene-editing",
42
- version: "73",
42
+ version: "77",
43
43
  description: "Inspect the open scene and edit its objects, materials, curves, and environment.",
44
44
  instructions: `Use womp.scene.access(callback) for both inspection and edits. Inspect targets inside each callback using scene.nodes({ name, type, parentId, ids, offset, limit }) and detailed getters; filters are optional, name is a case-insensitive substring, and results default to 100 (maximum 1000). Page with offset as needed. Inspection reflects changes made in the callback. scene.unitMultiplier gives project units. Do not reuse an earlier inspection as current state.
45
45
  Use womp.scene.health() to refresh whole-scene health or womp.scene.health(objectIds) to check specific objects (mapped to their owning Areas).
@@ -66,13 +66,14 @@ Decals require an existing loaded image and receiving geometry. Projection is a
66
66
  nodeCreate(SVG, parentAreaId) creates an editable SVG node. Set structured paths with nodeSetSvgPaths(id, paths) and read them with nodeGetSvgPaths(id). Each path has closed and at least two segments; point, handleIn and handleOut are 2D vectors in project units, with handles relative to their point. SVG coordinates are local to the node, with y up. Unrotated SVG geometry lies in the node's Y–Z plane facing ±X; nodeSetRot(id, {x: 0, y: -90, z: 0}) faces it toward +Z with path x to the right. Fill uses the nonzero rule: a contour wound opposite to its enclosing contour cuts a hole, and same-direction overlaps merge. nodeSetSvgDepth(id, depth) sets normal extrusion in project units, including the parent Area scale; nodeGetSvgDepth reads it back. Native local depth must be 0.01–1000 mm. Generic nodeSetSize does not set this depth. SVG nodes have no round or color property; color them with a material. Inspect the visible result before claiming holes or exact thickness.
67
67
 
68
68
  ## Curve authoring
69
- - Choose the construction. Prefer one or a few editable Curves for complex forms defined by a path and changing cross-sections, such as limbs, tails, fabric folds, tapered straps and sculpted trim. Use standalone primitives for simple volumes, Boolean operations for joins and cuts, and intersected SVG outlines when separate view silhouettes define the form.
70
- - Choose the profile. Each curve blends samples of one primitive type. Set it with nodeSetPrimType before adding points. Use Cube for broad flat faces, including faces with rounded edges, and Ellipsoid for rounded sections. Sphere uses size.x as a uniform diameter when creating or resizing points. Use separate curves where the primitive type changes.
71
- - Size and orient each profile. For Cube and Ellipsoid, set all three local dimensions independently in project units with curvePointAdd's size or curvePointSetSize. Rotate the profile so its axial dimension follows the path tangent, set width and depth across it, and set roll about the tangent. Vary these along the path to taper, flatten, thicken or twist the form. For a cuff or sloped hem that continues a loft, shape and tilt the end profiles, then check the slope from the side. Size and rotation ease between anchors independently of the handles. Keep the curve-node scale at its default while sizing points.
72
- - Fit the path. Start with endpoints and landmarks that need independent control, such as the widest section. A V3 span from A to B uses control positions A, A + handleOut(A), B + handleIn(B), B. Aim the outgoing handle forward and the incoming handle backward. Handles are offsets in the curve frame and project units. Start with lengths about a third of the span chord and fit to measured checkpoints between anchors. At a smooth join use nonzero, opposite, collinear handles with independently adjustable lengths. Two zero handles make a straight span. Close a loop with curveSetClosed, and pass closed: true when using curveFit on its sampled path.
73
- - Fit sampled paths with curveFit(points, {tolerance?, closed?}) in the curve's own frame and units. It accepts up to 2000 samples and returns {pos, handleIn, handleOut, index}. Append the anchors in order and use index to recover the original profile measurements when available. Start with the default tolerance of 0.2% of the samples' extent. The minimum is 0.1%.
74
- - Tune sampling after the contour and cross-sections are right. For a rounded loft using Ellipsoid slices, axial thickness near 0.15 of transverse width and blend near 0.2 of that width are starting values. Convert the blend radius to local millimetres before parent scaling. Curve blend fuses its samples and can also join the curve to earlier geometry in the Area. Evaluate at the existing density first. V3 spacing uses Cylinder width or the smallest dimension of Cube or Ellipsoid, so thinner slices can generate more primitives. For beading, gaps or bands, check orientation, axial thickness, overlap and blend. Raise nodeSetDensity for visible undersampling when the Area has headroom. Density is capped at 250 and native primitive budgets also limit sampling. Extra overlap or blend can swell surfaces and close gaps.
75
- - Verify and repair. Inspect the silhouette from the front and thickness, twist and transitions from an oblique view. Adjust existing handles or profiles on the affected span first. Add an anchor only where contour, thickness, orientation or material needs independent control. Recheck the affected span and its neighbors, including openings and attachments.
69
+ - Choose the construction by the geometry. Use standalone primitives for simple volumes. Replace Cube placeholders for shallow parts with full-width rounded ends, such as the toe of a sneaker sole. Fit the perimeter first. For an outline-defined part of uniform thickness, extrude its fitted closed SVG contours once, using as few Bézier spans as each contour needs. For a form defined by a path and cross-sections, try one editable V3 Curve when a single profile type can describe the sections along it. Use intersected SVG outlines where independent projected contours define the shape, and Boolean cuts or joins for cross-sections that need several shapes.
70
+ - Choose the profile by its cross-section. Each curve blends samples of one primitive type. Set it with nodeSetPrimType before adding points. Use Cube for broad flat faces. Use Ellipsoid for rounded sections or flatten one axis for a broad thin section with a soft edge. Sphere uses size.x as a uniform diameter when creating or resizing points. Use separate curves where the primitive type changes.
71
+ - Size and orient each profile. For Cube and Ellipsoid, set the sample length along the path, transverse width and thickness independently in project units with curvePointAdd's size or curvePointSetSize. Orient the profile for the intended cross-section and face normal. Change roll about the path to twist a broad face. Fit a sloped loft end to its target profile. Build a rounded garment cuff or hem into the loft's end profiles, as a short Ellipsoid loft fitted around an oval opening, or as a Torus around a circular opening. Check that the band follows the limb from the side. Size and rotation ease between anchors independently of the handles. Keep the curve-node scale at its default while sizing points.
72
+ - Plan V3 curves with the fewest anchors and simplest handles that fit the intended form. Start an open curve with its endpoints and add controls only where the path, cross-section, roll or material needs independent adjustment. Fit each span across as many measured stations as its handles allow. Use crowns and inflections inside a span as checkpoints when the span can carry them. A span from A to B uses A, A + handleOut(A), B + handleIn(B), B. These handle offsets use the curve frame and project units. Aim the outgoing handle along the departure tangent and the incoming handle back along the arrival tangent. At a smooth join, choose one unit tangent T and set handleOut = T * outgoingLength and handleIn = -T * incomingLength. Fit both positive lengths independently across their spans. Two zero handles make a straight span.
73
+ - Worked V3 bend. A quarter turn of radius 30 mm in XY from (0, 0, 0) to (30, 30, 0) departs along +X and arrives along +Y. Set handleOut at the start to (16.57, 0, 0) mm and handleIn at the end to (0, -16.57, 0) mm, converted to project units. The midpoint of the span is about (21.21, 8.79, 0) mm and serves as a fit checkpoint. Use two anchors with the same Sphere diameter for a constant circular profile along this bend.
74
+ - Fit densely traced V3 paths in script memory before laying out anchors. Use curveFit(points, {tolerance?, closed?}) on ordered samples in the curve's own frame and units. For an existing Bézier, sample along the evaluated spans to capture its shape between the old anchors. The fitter accepts up to 2000 samples and returns {pos, handleIn, handleOut, index}. Use index to recover profile measurements when available, then check the eased cross-sections between anchors. Choose positional tolerance for the visible contour and nearby clearances. The default is 0.2% of the samples' extent and the minimum is 0.1%. For a loop, pass closed: true to curveFit and close the authored curve with curveSetClosed.
75
+ - Tune sampling after the contour and cross-sections are right. Generated primitive count depends on path length, profile size and density as well as the authored spans. V3 spacing uses Sphere diameter, Cylinder width or the smallest dimension of Cube or Ellipsoid, so thinner slices can generate more primitives. For rounded Ellipsoid lofts, axial length near 0.15 of transverse width and blend near 0.2 of that width are starting values. For a wide thin section, choose blend relative to its thickness and clearances, then check the edge and face. Blend takes local millimetres before parent scaling. Curve blend fuses its samples and can also join the curve to earlier geometry in the Area. Inspect a prominent smooth loft in a close-up before adding details or repeating it. For repeated bands on a correctly oriented loft, raise nodeSetDensity on the affected curve and compare the same close-up with anchors and blend held fixed. Keep the lowest density that clears the bands within the Area budget. If bands persist, adjust axial sample length to improve overlap or increase the affected curve's own blend in small steps. Check the same close-up and nearby joins and clearances after each adjustment. Density is capped at 250 and native primitive budgets also limit sampling. Extra overlap or blend can swell surfaces and close gaps.
76
+ - Check the fit before detailing. When adjacent V3 spans share a smooth sweep and their intermediate anchors appear redundant, test a longer fit in script memory. Use curveFit on the sampled path or fit the handles across the combined span directly. Compare the centerline and eased profiles at intermediate stations before editing. Keep the simplest fit that preserves the intended silhouette, depth, taper, roll, material transitions and clearances. After applying a refit, check the affected area and joins from a matching and an oblique view. Add an anchor only when a visible or measured mismatch needs independent control after adjusting the existing handles and profiles. For a profile-only change, subdivide the fitted cubic at the new anchor to preserve its path.
76
77
  - API details. nodeCreate(Curve, parentId) creates an empty curve with zero blend. curvePointAdd returns the inserted index. Omit the index to append, or pass an integer from zero through the point count to insert before it. Pass {} for a point with zero position, rotation and handles, size {x:1,y:1,z:1} in project units, the curve's material, fixed false and round 0. Zero points are allowed and one point gives a single primitive. New curves use V3 Bezier unless the run disables it, in which case they use V2 spline control points. V1/V2 node transforms are read-only, so edit their points. Handles, closure and the strap example below require V3.
77
78
 
78
79
  ## Area settings, transforms and materials
@@ -97,9 +98,9 @@ Groups are organizational only; move and rotate their child Areas individually,
97
98
  An Area is an outermost Union with no Union ancestor: it has its own modeller, bounds, and volumetric resolution. Nested Unions share that Area's resolution, even through Groups.
98
99
  Choose Area boundaries for evaluation needs, not individual editability: parts within an Area remain independently editable. Sibling Areas under a Group can overlap without blending together, while each blends internally and has independent resolution. Keep required shared smooth joins or Boolean evaluation within one Area; overlapping independent Areas are not a watertight Boolean union. Build each continuous surface in one Area with its parts blended, such as a garment with its sleeves, trousers with both legs and the seat, or a body with its limbs: parts in separate Areas never blend, so splitting them leaves a visible seam where they meet.
99
100
  Prioritize requested visual fidelity over minimizing voxel use. An Area too coarse for its detail renders jagged or stair-stepped edges, lumpy flat faces, rounded-off corners, blurred or merged small features, and thin parts that break up or vanish. Wide views hide this: judge detail from a close-up where the smallest important features fill much of the frame. When correctly authored geometry shows these symptoms, increase its owning Area's resolution, up to 0.65 as needed, and compare the same close-up; distinguish sampling loss from material/lighting contrast or authored gaps. A higher voxel count is acceptable when detail improves within engine limits. If resolution is insufficient or hits resource limits/downscaling, consider smaller independent Areas where shared blending or Booleans are unnecessary.
100
- Sphere uses size.x as a uniform diameter. Use an Ellipsoid for a simple rounded volume with independent dimensions, such as a head, a fish body or a shoe toe. Use Cube where the part needs flat faces, such as a buckle, a crate or a wall. Capsule is a cylinder with round ends, x its diameter and y its full height. Cylinder/Cone/Pyramid use x as base diameter/width and y as height;
101
+ Sphere uses size.x as a uniform diameter. Use an Ellipsoid for a simple rounded volume with independent dimensions, such as a head, a fish body or a shoe toe. Reserve standalone Cube for volumes with straight sides and a box-like outline in the target, such as a buckle, a crate or a wall. Build rolled garment cuffs or hems with fitted rounded sections or outlines. At the main-form review, replace standalone Cube placeholders for those shapes. Capsule is a cylinder with round ends, x its diameter and y its full height. Cylinder/Cone/Pyramid use x as base diameter/width and y as height;
101
102
  Torus lies in local XZ (axis +Y), with x as outer diameter and y as tube thickness. For Capsule and these four primitives, nodeSetSize accepts {x, y}; z follows x even when supplied. Cube and Ellipsoid use all three dimensions. Node and curve-point round are dimensionless fractions clamped to [0, 1], not radii in project units; rounding does not set size. Cube rounding reaches half its shortest dimension at 1, so a shallow Cube retains broad flat faces rather than becoming an ellipsoid.
102
- Womp shapes are signed distance fields. Build the way Womp's library assets are made: many small parts, each with a clear role and its own material, fused, carved and shaped with field operations rather than stacked as plain primitives.
103
+ Womp shapes are signed distance fields. Build continuous main forms with fitted geometry, then add distinct parts and materials where they describe visible structure. Use field operations to fuse, carve and shape their interfaces.
103
104
  - Fuse parts that grow out of each other, such as a head into a neck, a limb into a torso or a handle into a pot, with nodeSetBlend on the joining part. A blend reaches only what was built before that part in the same Area. Start it at about a third of the thinner part's thickness, then judge the join in a close-up: too much dissolves small parts into lumps and swells rims, too little leaves a hard crease. To blend a curve into a body without changing its own smoothing, put it in its own Union inside the body's Area and set that Union's blend. Build a hand as a palm, a thumb and four fingers, posed as in the image even when curled into a fist or holding something: each finger a short curve from knuckle to tip; put the fingers and thumb in their own Union with no blend between them and set that Union's blend to fuse them into the palm, so they join the palm without melting into each other; and the wrist starting inside its sleeve or cuff.
104
105
  - Keep a crisp seam, blend 0, where two colours or a panel gap meet. Make windows, lights and lenses real parts, not paint. Glaze an opening with real glass, a material with transmittance about 0.5, as a thin panel or SVG outline set at the true angle and curvature of the surface it fills, flush in a thin frame, with a simple interior behind it, such as seats and a dashboard, so it reads as glass rather than a black plate. Use Stain sparingly, only for markings that lie flat on a surface, such as a stripe, a logo or an animal's coat pattern: a Stain shape (nodeSetOp with OperationType.Stain) placed after the geometry recolours the surface inside it and leaves the shape unchanged.
105
106
  - Shape each small detail as a miniature of the real part, never a placeholder block or disc: its real outline, housing and inner face, such as a mirror's shaped housing on its arm or a vent carved with fins inside. Place it where the real one is and keep it clear of neighbouring parts, such as a wheel or a door line.
@@ -109,17 +110,17 @@ Womp shapes are signed distance fields. Build the way Womp's library assets are
109
110
  - Put a sub-assembly that joins or cuts as one unit in a nested Union: its blend fuses the whole unit to what came before, and a Subtract Union cuts all its children at once, such as every window of a cabin.
110
111
  - Model one side of a symmetric object and mirror it: nodeSetMirror(id, slot, axis, planePosition) reflects a Primitive or Curve across a plane in its parent frame, so one wheel, eye, fender or wing makes the pair and later edits stay symmetric.
111
112
  - For a hollow or recess with a continuous rim, fit the shell and cutter together. Adjust the cutter's offset, cross-section and taper to shape the remaining wall before adding raised details. Inspect the rim and wall from an oblique view.
112
- - Shape a mass whose top and side silhouettes define it, such as a sole, a hull, a blade or a guitar body, from those outlines. Draw the top as one closed SVG path, preserving any asymmetry, and extrude it through the height. Draw the side as a second SVG facing sideways and extruded through the width, with OperationType.Intersect. A blend of a few millimetres on the Intersect node rounds its edges. Intersect the parts that sit on it, such as a shoe's upper, with the same outline so they follow it.
113
+ - To intersect two independently fitted outlines, draw the top as a closed SVG path, preserving any asymmetry, and extrude it through the height. Draw the side as a second SVG facing sideways and extruded through the width, with OperationType.Intersect. Set the blend for the intended edge radius and verify the resulting contours. Intersect mating parts with the same outline when they need to follow that surface.
113
114
  - Keep surfaces smooth and continuous, as if cast in one mould: shape bumpers, intakes, spoilers, face plates, panels, feet and bases to follow the body's curvature, with a curve or a rounded shape, and fillet each one into the body with a blend of a few millimetres. A flat block laid on a curved surface, a hard ledge or a stair-step reads as stacked parts. Round boxes with nodeSetRound; keep sharp only what is sharp on the real thing.
114
115
  - Give every visibly distinct part its own material and colour.
115
- Before building, settle a reference in numbers: the side, front and top silhouettes with their key heights, widths and lengths. After each stage, screenshot the build from the matching view and compare it with that reference, or with the user's image, and fix the largest mismatch in proportion or silhouette before adding detail. Finish with fine detail at its real scale, such as meshes, treads, fasteners, seams and trim: build one, then repeat it or copy its assembly with cloneSubtree.
116
+ Before building, settle the target in numbers: the side, front and top silhouettes with their key heights, widths and lengths, using actual references when available. Inspect the main forms from matching views and fix their largest mismatch before adding detail. Batch related changes and capture the views needed to check their effect. A rounded outline may enclose a broad flat face; preserve that distinction rather than inflating every section. Finish with fine detail at its real scale, such as meshes, treads, fasteners, seams and trim: build one, then repeat it or copy its assembly with cloneSubtree.
116
117
  Build and verify coarse geometry and unfamiliar operations before replicating details. Check one representative result, then repeat it.
117
118
  Construct both sides of a joint from shared attachment points and axes. Create each mounted part together with its contact or mounting geometry, derived from the supporting surface; preserve intended clearances and separate editability. If contact is uncertain, check the authored positions, dimensions, and axes in 3D: projected overlap is not a connection.
118
119
  Fix unintended gaps, floating attachments, and fragmented geometry before decorative detail or presentation. Use inspection to identify a concrete defect and verify its correction, not merely to collect screenshots or healthy receipts.
119
120
  Reference fidelity:
120
121
  When recreating an image, treat its visible geometry and level of detail as the target—not merely its subject, colors, or list of parts. Preserve the user's chosen workflow and editability requirements.
121
122
  Establish a comparison view matching the reference's angle, projection, and subject framing as closely as practical. Match silhouette, proportions, pose, and negative spaces first; then local contours, thickness, curvature, surface transitions, and defining details. Infer unseen geometry conservatively. Size each defining detail, such as a printed graphic, a face, a held object, a hand or a shoe, from the image: measure its width and height as fractions of the subject's height, and its position, and build it at that size; details estimated by eye come out too small and too simple.
122
- Compare each rendered pass directly with the source. Identify the largest remaining visible shape mismatch, edit it, and verify that it improved before moving to smaller details. Use close-ups when the comparison view cannot resolve a feature; return to the comparison view afterward. Adjust sampling or resolution when visible faceting or segmentation requires it—not as a substitute for reshaping.
123
+ Compare the main forms and each major repair with the source. Identify the largest remaining visible shape mismatch, edit it, and verify that it improved before moving to smaller details. Use close-ups when the comparison view cannot resolve a feature; return to the comparison view afterward. Adjust sampling or resolution when visible faceting or segmentation requires it—not as a substitute for reshaping.
123
124
  Do not stop at semantic resemblance or after a fixed number of screenshots. Continue while substantial visible mismatches remain and supported edits are making progress, within the available budget. If progress stalls or the chosen representation cannot achieve the requested fidelity, explain the specific limitation and ask before changing workflows. Before finishing, compare the latest render with the reference and address the largest remaining visible mismatch; if substantial differences remain, identify the concrete stopping reason rather than treating an approximation disclaimer as completion.
124
125
 
125
126
  await cloneSubtree(id, { parentId?, name?, index? }) copies a node and its complete hierarchy with fresh IDs,
@@ -170,6 +171,7 @@ A failed script can retain earlier committed effects. Use receipts and inspect u
170
171
  scene.nodeSetMaterialId(curve, material);
171
172
 
172
173
  // The centerline is y = 15 * (1 - (x / 40) ** 2) mm, so its end slopes are +0.75 and -0.75.
174
+ // The crown anchor sets the widest profile independently of both ends.
173
175
  const spanThird = 40 / 3;
174
176
  const degrees = radians => radians * 180 / Math.PI;
175
177
  const heading = Math.atan(0.75);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@womp/spark-agent",
3
- "version": "17.7.1",
3
+ "version": "17.7.3",
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",