@womp/spark-agent 15.5.0 → 15.7.0

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,42 @@ 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
+ ## 15.7.0 — 2026-11-02
8
+
9
+ Spark looks up the export steps with the help lookup when a user wants a file format, instead of
10
+ saying the format is unavailable (SW-004).
11
+
12
+ ### Changed
13
+
14
+ - The system prompt has a "Help and exporting" section: questions about using the Womp editor, such
15
+ as where a control is or how to export, are looked up with `womp-help` before replying. Spark
16
+ cannot write or convert files; for a model as a file or in a format it looks up and gives the
17
+ export steps, and never calls a format unavailable or sends users to another app unless the
18
+ lookup says so. A requested format does not change how Spark creates the model. Before, it
19
+ rarely looked anything up for these requests and said OBJ/STL export "isn't available", that its
20
+ generator only makes GLB, or to convert in Blender (beta threads 2804558, 2806276), and "a chair
21
+ in OBJ format" went to AI mesh generation. The steps come from womp_docs, which now has the
22
+ current menu path and says CAD parts export without Bake.
23
+ - intent-bench: `--knowledge <womp_docs checkout or rag.md>` answers help lookups the way
24
+ crow-backend does; without it they fail as before. Cases can require calls (`expectCalls`). New
25
+ export cases `obj-chair`, `obj-mesh`, `obj-photo`, `obj-after-mesh`, `stl-existing`, `cad-export`
26
+ and `export-item-missing`; the last four require a help lookup.
27
+
28
+ ## 15.6.0 — 2026-10-29
29
+
30
+ Spark now raises an Area's resolution when its own screenshots show detail lost to a coarse Area,
31
+ instead of leaving every new Area at the default 0.3 or reshaping correct geometry.
32
+
33
+ ### Changed
34
+
35
+ - The `scene-editing` skill (version 49) lists what a too-coarse Area looks like: jagged or
36
+ stair-stepped edges, lumpy flat faces, rounded-off corners, blurred or merged small features and
37
+ thin parts that break up. It says wide views hide this, that detail is judged from a close-up, and
38
+ that the fix is raising the owning Area's resolution (up to 0.65) unless resource limits apply.
39
+ Before, the rule only covered fragmented or missing thin features.
40
+ - The `parametric-parts` skill (version 5) says an OpenSCAD part renders at its parent Area's
41
+ resolution, so sampling loss is fixed with `nodeSetUnionResolution`, not by reshaping the source.
42
+
7
43
  ## 15.5.0 — 2026-10-27
8
44
 
9
45
  An import question the user leaves unanswered now always adds the mesh to the scene, and Spark no
package/README.md CHANGED
@@ -296,8 +296,14 @@ route, since Geometry Nodes prepares its materials in the scene first.
296
296
  yarn intent-bench # every case 3 times on gpt-6-luna, 24 at once
297
297
  yarn intent-bench --only photo-only,F1 --repeat 10 --model gpt-6-astra
298
298
  yarn intent-bench --list
299
+ yarn intent-bench --group conversation --knowledge ../womp_docs # help lookups answer from the docs
299
300
  ```
300
301
 
302
+ Help lookups (`womp.knowledge.search`) fail unless `--knowledge` names a womp_docs checkout or a
303
+ built `rag.md`. With it, each lookup answers as crow-backend's does, from the whole knowledge base
304
+ on gpt-6-luna, so a docs branch can be tested before it is merged. Some cases also require calls,
305
+ such as a lookup for export steps; those calls are listed with the case.
306
+
301
307
  It prints each case's routes and pass rate and writes `report.json`, with every run's skills,
302
308
  calls, deciding call and reply, under `.spark/intent-bench/`. It exits 1 when any run took a route
303
309
  the case does not expect. Model calls are paid; the full set costs about $0.10 on gpt-6-luna.
@@ -1 +1 @@
1
- export declare const OPENSCAD_INSTRUCTIONS = "Use womp.openscad to create or update one adjustable CAD part. Read an existing part before editing it.\nKeep follow-up edits to an existing CAD part in that part unless the user asks to change representation.\nread(0) returns the root container for creation. read(id) returns an existing\npart or container. Use the scene-editing skill when available to discover other scene objects.\ncreate requires a parentId (0 means the scene root); update requires the existing objectId.\nBoth methods compile the effective source and parameters, apply one undoable change, and check wall thickness.\nPreserve intervening user changes. Ask the user when the intended edits conflict or remain ambiguous.\nExisting overrides are preserved for parameters still present;\nparams supplies overrides to merge into the current values. Keep top-level parameter names stable.\nReturn complete source on every update and preserve unrelated geometry. Never create a replacement to repair a part.\nCompile errors return status rejected without applying. Creation requires validated placement bounds.\nAn update may apply with validation unavailable; that is a diagnostic, not proof that it compiles.\nAn applied part remains in the scene even if thickness fails or is unavailable. Use the returned objectId for repairs.\nWhen thickness fails, increase thin walls and fragile connections while preserving requested dimensions and openings.\nAt most four applied printability repairs are allowed per logical build/edit in this run. Respect the returned limit;\ndo not bypass it by recreating the part. Unavailable thickness is not a pass. Report unresolved issues honestly.\nBuild connected geometry and avoid features below 1.4 mm. OpenSCAD source dimensions use millimetres,\nindependently of the scene display unit. New parts are centered and grounded from compiled bounds.\nOpenSCAD is Z-up; the scene-editing API is Y-up. For an unrotated part at its creation-time scale and an identity parent transform,\na source point [x,y,z] mm maps to scene {x:y, y:z, z:-x} times the scene.unitMultiplier inside the access callback, plus nodeGetPos(partId).\nAccount for the part and parent transforms when they are not identity; source coordinates are not scene coordinates.\nAfter a major change, use the scene screenshot API and emitImage to inspect the applied result.\nA committed effect can survive later failure. Inspect receipts and the existing part before retrying.\nDo not print source in the final answer unless requested; describe the result and any unresolved diagnostics.\n\nRUNTIME\n- Produce a single OpenSCAD file.\n- Do not use imports, includes, external libraries, text, hull, minkowski, polyhedron, or extrudes.\n- Prefer cube, sphere, cylinder, translate, rotate, color, union, difference, and intersection.\n- Do not use $fn, $fa, or $fs; tessellation controls are ignored.\n- Build faceted geometry by combining supported primitives with CSG operations and transforms.\n- Do not use scale(); size primitives directly instead.\n- Use color(\"#rrggbb\") around distinct visible parts.\n- Keep the model centered near the origin and use millimeter-like units consistently.\n- For organic blending, use goop(radius_mm) { ... }. The radius is in millimetres before parent scaling, matching scene-editing; do not multiply by project unitMultiplier. It is ordered: the first child seeds with blend 0, and each later child uses radius_mm.\n- Put core primitives first. Avoid wrapping goop children in union() when they should blend individually.\n\nSCREWS AND THREADS\n- Copy helical_ridge below for rounded screw threads, necks, caps, and coils. It joins spheres with cylinders; never use stacked rings or disconnected spheres.\n- Dimensions are mm: radius = ridge centerline radius; pitch = axial travel/turn; tube_radius = half ridge thickness; handedness = 1 (right) or -1 (left).\n- For a hand control use thread_hand = 1; // [-1:Left, 1:Right] and pass it directly. Ternary expressions (?:) are unsupported.\n- Embed the ridge in the shaft/neck (e.g. radius = shaft_radius). Hollow fittings: subtract the bore from body + thread. Internal threads: subtract the helix from the socket wall with mating clearance. Mating parts need matching pitch and handedness.\n- Expose diameter, pitch, thread length, and thickness in Customizer; derive sampling. Keep 2 * tube_radius < pitch and allow tube_radius beyond both path endpoints for rounded ends. This is a rounded profile, not ISO/metric V-thread; never claim standards compliance.\n- Build heads/grips separately using cylinders, tapered cylinders, and radial ribs/cutters, not thread samples.\n\nmodule helical_ridge(radius, pitch, turns, tube_radius, handedness) {\n if (radius > 0 && pitch > 0 && turns > 0 && tube_radius > 0) {\n // Limit chord error to 0.03 mm or 3% of the ridge radius.\n chord_error = min(0.03, tube_radius * 0.03);\n steps_per_turn = max(48, ceil(180 / acos(1 - min(1, chord_error / radius))));\n steps = ceil(turns * steps_per_turn);\n for (i = [0:steps]) {\n angle = handedness * 360 * turns * i / steps;\n p = [radius * cos(angle), radius * sin(angle), pitch * turns * i / steps];\n translate(p) sphere(r = tube_radius);\n if (i < steps) {\n next_angle = handedness * 360 * turns * (i + 1) / steps;\n dx = radius * cos(next_angle) - p[0];\n dy = radius * sin(next_angle) - p[1];\n dz = pitch * turns / steps;\n segment_length = sqrt(dx * dx + dy * dy + dz * dz);\n translate(p)\n rotate([0, acos(dz / segment_length), atan2(dy, dx)])\n cylinder(h = segment_length, r = tube_radius);\n }\n }\n }\n}\n\nPARAMETERS\n- Make important top-level constants user-adjustable with OpenSCAD Customizer comments:\n - Numbers with ranges: body_radius = 12; // [4:0.5:40]\n - Counts: leg_count = 4; // [2:8]\n - Booleans: show_base = true;\n - Options: style = \"round\"; // [round, sharp, chunky]\n- Prefer stable size/count/ratio/style controls; keep fragile dependent dimensions as local expressions.\n\nSUPPORTED SUBSET\n- Export is best-effort from a supported CSG subset: cube, sphere, cylinder, translate, rotate, color, union, difference, intersection, and goop.\n- difference() cutters become subtractive primitives, so use clean cutters that fully pass through the target solid.\n- Unsupported OpenSCAD may validate but can warn or skip during export; prefer the supported subset above.";
1
+ export declare const OPENSCAD_INSTRUCTIONS = "Use womp.openscad to create or update one adjustable CAD part. Read an existing part before editing it.\nKeep follow-up edits to an existing CAD part in that part unless the user asks to change representation.\nread(0) returns the root container for creation. read(id) returns an existing\npart or container. Use the scene-editing skill when available to discover other scene objects.\ncreate requires a parentId (0 means the scene root); update requires the existing objectId.\nBoth methods compile the effective source and parameters, apply one undoable change, and check wall thickness.\nPreserve intervening user changes. Ask the user when the intended edits conflict or remain ambiguous.\nExisting overrides are preserved for parameters still present;\nparams supplies overrides to merge into the current values. Keep top-level parameter names stable.\nReturn complete source on every update and preserve unrelated geometry. Never create a replacement to repair a part.\nCompile errors return status rejected without applying. Creation requires validated placement bounds.\nAn update may apply with validation unavailable; that is a diagnostic, not proof that it compiles.\nAn applied part remains in the scene even if thickness fails or is unavailable. Use the returned objectId for repairs.\nWhen thickness fails, increase thin walls and fragile connections while preserving requested dimensions and openings.\nAt most four applied printability repairs are allowed per logical build/edit in this run. Respect the returned limit;\ndo not bypass it by recreating the part. Unavailable thickness is not a pass. Report unresolved issues honestly.\nBuild connected geometry and avoid features below 1.4 mm. OpenSCAD source dimensions use millimetres,\nindependently of the scene display unit. New parts are centered and grounded from compiled bounds.\nOpenSCAD is Z-up; the scene-editing API is Y-up. For an unrotated part at its creation-time scale and an identity parent transform,\na source point [x,y,z] mm maps to scene {x:y, y:z, z:-x} times the scene.unitMultiplier inside the access callback, plus nodeGetPos(partId).\nAccount for the part and parent transforms when they are not identity; source coordinates are not scene coordinates.\nAfter a major change, use the scene screenshot API and emitImage to inspect the applied result.\nThe part renders at its parent Area's resolution, so correct source can still show jagged edges, lumpy faces,\nor blurred and merged small features. Inspect a close-up of the smallest details; when they show this sampling loss,\nraise the parent Area's resolution with scene-editing nodeSetUnionResolution instead of reshaping the source.\nA committed effect can survive later failure. Inspect receipts and the existing part before retrying.\nDo not print source in the final answer unless requested; describe the result and any unresolved diagnostics.\n\nRUNTIME\n- Produce a single OpenSCAD file.\n- Do not use imports, includes, external libraries, text, hull, minkowski, polyhedron, or extrudes.\n- Prefer cube, sphere, cylinder, translate, rotate, color, union, difference, and intersection.\n- Do not use $fn, $fa, or $fs; tessellation controls are ignored.\n- Build faceted geometry by combining supported primitives with CSG operations and transforms.\n- Do not use scale(); size primitives directly instead.\n- Use color(\"#rrggbb\") around distinct visible parts.\n- Keep the model centered near the origin and use millimeter-like units consistently.\n- For organic blending, use goop(radius_mm) { ... }. The radius is in millimetres before parent scaling, matching scene-editing; do not multiply by project unitMultiplier. It is ordered: the first child seeds with blend 0, and each later child uses radius_mm.\n- Put core primitives first. Avoid wrapping goop children in union() when they should blend individually.\n\nSCREWS AND THREADS\n- Copy helical_ridge below for rounded screw threads, necks, caps, and coils. It joins spheres with cylinders; never use stacked rings or disconnected spheres.\n- Dimensions are mm: radius = ridge centerline radius; pitch = axial travel/turn; tube_radius = half ridge thickness; handedness = 1 (right) or -1 (left).\n- For a hand control use thread_hand = 1; // [-1:Left, 1:Right] and pass it directly. Ternary expressions (?:) are unsupported.\n- Embed the ridge in the shaft/neck (e.g. radius = shaft_radius). Hollow fittings: subtract the bore from body + thread. Internal threads: subtract the helix from the socket wall with mating clearance. Mating parts need matching pitch and handedness.\n- Expose diameter, pitch, thread length, and thickness in Customizer; derive sampling. Keep 2 * tube_radius < pitch and allow tube_radius beyond both path endpoints for rounded ends. This is a rounded profile, not ISO/metric V-thread; never claim standards compliance.\n- Build heads/grips separately using cylinders, tapered cylinders, and radial ribs/cutters, not thread samples.\n\nmodule helical_ridge(radius, pitch, turns, tube_radius, handedness) {\n if (radius > 0 && pitch > 0 && turns > 0 && tube_radius > 0) {\n // Limit chord error to 0.03 mm or 3% of the ridge radius.\n chord_error = min(0.03, tube_radius * 0.03);\n steps_per_turn = max(48, ceil(180 / acos(1 - min(1, chord_error / radius))));\n steps = ceil(turns * steps_per_turn);\n for (i = [0:steps]) {\n angle = handedness * 360 * turns * i / steps;\n p = [radius * cos(angle), radius * sin(angle), pitch * turns * i / steps];\n translate(p) sphere(r = tube_radius);\n if (i < steps) {\n next_angle = handedness * 360 * turns * (i + 1) / steps;\n dx = radius * cos(next_angle) - p[0];\n dy = radius * sin(next_angle) - p[1];\n dz = pitch * turns / steps;\n segment_length = sqrt(dx * dx + dy * dy + dz * dz);\n translate(p)\n rotate([0, acos(dz / segment_length), atan2(dy, dx)])\n cylinder(h = segment_length, r = tube_radius);\n }\n }\n }\n}\n\nPARAMETERS\n- Make important top-level constants user-adjustable with OpenSCAD Customizer comments:\n - Numbers with ranges: body_radius = 12; // [4:0.5:40]\n - Counts: leg_count = 4; // [2:8]\n - Booleans: show_base = true;\n - Options: style = \"round\"; // [round, sharp, chunky]\n- Prefer stable size/count/ratio/style controls; keep fragile dependent dimensions as local expressions.\n\nSUPPORTED SUBSET\n- Export is best-effort from a supported CSG subset: cube, sphere, cylinder, translate, rotate, color, union, difference, intersection, and goop.\n- difference() cutters become subtractive primitives, so use clean cutters that fully pass through the target solid.\n- Unsupported OpenSCAD may validate but can warn or skip during export; prefer the supported subset above.";
@@ -20,6 +20,9 @@ OpenSCAD is Z-up; the scene-editing API is Y-up. For an unrotated part at its cr
20
20
  a source point [x,y,z] mm maps to scene {x:y, y:z, z:-x} times the scene.unitMultiplier inside the access callback, plus nodeGetPos(partId).
21
21
  Account for the part and parent transforms when they are not identity; source coordinates are not scene coordinates.
22
22
  After a major change, use the scene screenshot API and emitImage to inspect the applied result.
23
+ The part renders at its parent Area's resolution, so correct source can still show jagged edges, lumpy faces,
24
+ or blurred and merged small features. Inspect a close-up of the smallest details; when they show this sampling loss,
25
+ raise the parent Area's resolution with scene-editing nodeSetUnionResolution instead of reshaping the source.
23
26
  A committed effect can survive later failure. Inspect receipts and the existing part before retrying.
24
27
  Do not print source in the final answer unless requested; describe the result and any unresolved diagnostics.
25
28
 
@@ -14,7 +14,7 @@ export function createOpenScadCapability(host) {
14
14
  skills: [
15
15
  {
16
16
  name: "parametric-parts",
17
- version: "4",
17
+ version: "5",
18
18
  description: "Create and edit adjustable OpenSCAD parts; compile them and check wall thickness.",
19
19
  instructions: OPENSCAD_INSTRUCTIONS,
20
20
  declarations: WOMP_OPENSCAD_DECLARATIONS,
@@ -39,7 +39,7 @@ export function createSceneCapability(host) {
39
39
  skills: [
40
40
  {
41
41
  name: "scene-editing",
42
- version: "48",
42
+ version: "49",
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).
@@ -91,7 +91,7 @@ Create primitives, curves, and text inside Areas/Unions. Respect tree order for
91
91
  Groups are organizational only; move and rotate their child Areas individually, not the Group.
92
92
  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.
93
93
  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.
94
- Prioritize requested visual fidelity over minimizing voxel use. If correctly placed thin features render fragmented or missing, increase their owning Area's resolution, up to 0.65 as needed, and compare the same camera; 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.
94
+ 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.
95
95
  Sphere uses size.x as uniform diameter (y/z do not stretch it), including new or resized spherical curve points. Cylinder/Cone/Pyramid use x as base diameter/width and y as height;
96
96
  Torus lies in local XZ (axis +Y), with x as outer diameter and y as tube thickness. For these four primitives, nodeSetSize accepts {x, y}; z follows x even when supplied. Cube uses 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.
97
97
  Build and verify coarse geometry and unfamiliar operations before replicating details. Check one representative result, then repeat it.
@@ -48,6 +48,8 @@ export type IntentCase = {
48
48
  expect: readonly IntentRoute[];
49
49
  /** For a generation: the names of the images it must take as inputs, in any order. */
50
50
  expectInputs?: readonly string[];
51
+ /** Agent API calls the run must make, such as `knowledge.search` for a how-to answer. */
52
+ expectCalls?: readonly string[];
51
53
  note?: string;
52
54
  };
53
55
  /**
@@ -271,7 +271,72 @@ export const INTENT_CASES = [
271
271
  note: "Flow has no node for a chat photo; build the graph with what it has and leave the image input to the user.",
272
272
  },
273
273
  ...safetyCases(),
274
+ ...exportCases(),
274
275
  ];
276
+ /**
277
+ * A file format asked for with a request (beta threads 2804558, 2806276, Oct 2026): Spark said
278
+ * only GLB was possible or OBJ/STL export was unavailable, and sent users to Blender, though
279
+ * Womp's 3D mesh export writes both. 2805001 asked how to export a CAD part and got guesses
280
+ * about Bake. The format is an export choice, so the build goes ahead; "reply" means no change.
281
+ * Export steps come from the help lookup: run with --knowledge to have it answer from the docs.
282
+ */
283
+ function exportCases() {
284
+ const chair = [
285
+ { id: 10, name: "Chair", kind: "group" },
286
+ ...["Seat", "Backrest", "Leg 1", "Leg 2", "Leg 3", "Leg 4"].map((name, index) => ({ id: 11 + index, name, parentId: 10 })),
287
+ ];
288
+ const washerPart = {
289
+ kind: "part", objectId: 12, parentId: 0, title: "Washer", source: washer,
290
+ params: { outer_diameter: 20, hole_diameter: 8, thickness: 2 },
291
+ };
292
+ return [
293
+ { id: "obj-chair", group: "core", turns: [user("Make a chair in OBJ format.")], expect: ["scene"] },
294
+ {
295
+ id: "obj-mesh", group: "core", completeGenerations: true, turns: [user("Generate a mesh of a red toy car and give it to me as an OBJ.")],
296
+ expect: ["import"], note: "Beta 2806276 said OBJ export isn't available and suggested Blender.",
297
+ },
298
+ {
299
+ id: "obj-after-mesh", group: "conversation", sceneNodes: [{ id: 10, name: "Red Toy Car" }],
300
+ turns: [
301
+ user("Generate a mesh of a red toy car."),
302
+ { role: "assistant", text: "I generated the red toy car mesh and added it to your scene. You can undo or delete it." },
303
+ user("can you give me that in obj format?"),
304
+ ],
305
+ expect: ["reply"], expectCalls: ["knowledge.search"], note: "Export steps for the mesh in the scene; GLB is only how it arrived.",
306
+ },
307
+ {
308
+ id: "obj-photo", group: "photo", turns: [user("make this into a 3D model in obj format with the mtl", [cup])],
309
+ expect: ["scene", "image-to-mesh"], note: "Beta 2804558 said it could only provide a GLB.",
310
+ },
311
+ {
312
+ id: "stl-existing", group: "conversation", sceneNodes: chair,
313
+ turns: [
314
+ user("Make a simple wooden chair."),
315
+ { role: "assistant", text: "I built a simple wooden chair with a seat, a backrest and four legs." },
316
+ user("I need this as STL"),
317
+ ],
318
+ expect: ["reply"], expectCalls: ["knowledge.search"], note: "Steps to Download 3D mesh with STL, not a refusal or another app.",
319
+ },
320
+ {
321
+ id: "cad-export", group: "conversation", openScadParts: [washerPart],
322
+ turns: [
323
+ user("Make a washer: 20 mm outer diameter, 8 mm hole, 2 mm thick."),
324
+ { role: "assistant", text: "I made the washer as an adjustable part: 20 mm outer diameter, 8 mm hole and 2 mm thick." },
325
+ user("How do I export this part as an STL file?"),
326
+ ],
327
+ expect: ["reply"], expectCalls: ["knowledge.search"], note: "Beta 2805001 guessed about Bake; the user needed 3 more turns.",
328
+ },
329
+ {
330
+ id: "export-item-missing", group: "conversation", openScadParts: [washerPart],
331
+ turns: [
332
+ user("How do I export this part as an STL file?"),
333
+ { role: "assistant", text: "Click Share at the top-right, choose 3D mesh export, pick STL and export it." },
334
+ user("i dont see 3d mesh export"),
335
+ ],
336
+ expect: ["reply"], expectCalls: ["knowledge.search"], note: "Beta 2805001: the item is Download 3D mesh; the answer guessed Bake.",
337
+ },
338
+ ];
339
+ }
275
340
  /**
276
341
  * Beta thread 2805085 (gpt-6-luna, Oct 2026): a sexual thread around a slime creature, with the
277
342
  * assistant's replies as they were (shortened), so later cases also test recovering from its own
@@ -6,6 +6,7 @@ import { loadEnvFile } from "node:process";
6
6
  import { parseArgs } from "node:util";
7
7
  import { INTENT_CASES } from "./intent-bench-cases.js";
8
8
  import { intentBenchModel, runIntentBench, summarizeIntentRuns } from "./intent-bench.js";
9
+ import { createKnowledgeSearch, loadKnowledgeBase } from "./intent-bench-knowledge.js";
9
10
  import { SPARK_MODELS } from "./models.js";
10
11
  function positiveInteger(value, name) {
11
12
  const number = Number(value);
@@ -18,7 +19,7 @@ async function main() {
18
19
  model: { type: "string", default: "gpt-6-luna" }, reasoning: { type: "string", default: "medium" },
19
20
  repeat: { type: "string", default: "3" }, concurrency: { type: "string", default: "24" },
20
21
  only: { type: "string" }, group: { type: "string" }, "max-steps": { type: "string", default: "12" },
21
- "timeout-seconds": { type: "string", default: "240" }, output: { type: "string" },
22
+ "timeout-seconds": { type: "string", default: "240" }, output: { type: "string" }, knowledge: { type: "string" },
22
23
  list: { type: "boolean" }, help: { type: "boolean" },
23
24
  } });
24
25
  if (values.help) {
@@ -38,6 +39,9 @@ call that would change something is recorded and the run stops there. Makes paid
38
39
  --max-steps <n> Model steps per run; default: 12
39
40
  --timeout-seconds <n> Per run; default: 240
40
41
  --output <directory> New directory only; default: .spark/intent-bench/<timestamp>
42
+ --knowledge <path> A womp_docs checkout or a built rag.md: help lookups answer from it the
43
+ way crow-backend does, each an extra gpt-6-luna call outside the cost
44
+ estimate. Without it every lookup fails.
41
45
  --list List the cases and expected routes`);
42
46
  return;
43
47
  }
@@ -70,6 +74,13 @@ call that would change something is recorded and the run stops there. Makes paid
70
74
  if (existsSync(".env"))
71
75
  loadEnvFile();
72
76
  const resolved = intentBenchModel({ modelId: model.id, reasoningEffort: reasoning });
77
+ let knowledge;
78
+ if (values.knowledge) {
79
+ const apiKey = process.env.OPENAI_API_KEY?.trim();
80
+ if (!apiKey)
81
+ throw new Error("OPENAI_API_KEY is required in the environment or .env for --knowledge.");
82
+ knowledge = createKnowledgeSearch(await loadKnowledgeBase(path.resolve(values.knowledge)), apiKey);
83
+ }
73
84
  const output = path.resolve(values.output ?? `.spark/intent-bench/${new Date().toISOString().replaceAll(":", "-")}`);
74
85
  // Never reuse a result directory or overwrite a previous benchmark.
75
86
  await mkdir(path.dirname(output), { recursive: true });
@@ -85,7 +96,7 @@ call that would change something is recorded and the run stops there. Makes paid
85
96
  const line = (run) => `${run.pass ? "pass" : "FAIL"} ${run.caseId.padEnd(22)} #${run.repeat} ${run.route.padEnd(14)} ${run.error ?? run.decision?.call ?? ""}${run.inputs ? ` [${run.inputs.join(", ")}]` : ""}`;
86
97
  try {
87
98
  const runs = await runIntentBench({
88
- cases, repeat, concurrency, model: resolved, maxSteps, timeoutMs, signal: controller.signal,
99
+ cases, repeat, concurrency, model: resolved, maxSteps, timeoutMs, knowledge, signal: controller.signal,
89
100
  onRun: (run) => console.error(`[${String(++done).padStart(String(total).length)}/${total}] ${line(run)}`),
90
101
  });
91
102
  const summary = summarizeIntentRuns(cases, runs);
@@ -94,7 +105,7 @@ call that would change something is recorded and the run stops there. Makes paid
94
105
  const costUsd = priced.reduce((sum, run) => sum + run.costUsd, 0);
95
106
  const durationMs = Date.now() - startedAt;
96
107
  await writeFile(path.join(output, "report.json"), `${JSON.stringify({
97
- model: model.id, reasoning, repeat, maxSteps, startedAt: new Date(startedAt).toISOString(), durationMs,
108
+ model: model.id, reasoning, repeat, maxSteps, knowledge: values.knowledge ?? null, startedAt: new Date(startedAt).toISOString(), durationMs,
98
109
  passed, runs: runs.length, costUsd: priced.length ? costUsd : null, costStatus: priced.length === runs.length ? "estimated" : priced.length ? "partial" : "unavailable",
99
110
  summary, results: runs,
100
111
  }, null, 2)}\n`);
@@ -0,0 +1,10 @@
1
+ /** Answers one `womp.knowledge.search` query. */
2
+ export type KnowledgeSearch = (query: string) => Promise<string>;
3
+ /**
4
+ * The knowledge base crow-backend sends with every lookup: a built `rag.md`, or a womp_docs
5
+ * checkout joined the way crow's GitHub monitor joins it, so a docs branch can be tested
6
+ * before it is merged.
7
+ */
8
+ export declare function loadKnowledgeBase(source: string): Promise<string>;
9
+ /** Answers lookups as crow-backend's `queryLLM` does: the whole knowledge base as instructions. */
10
+ export declare function createKnowledgeSearch(knowledgeBase: string, apiKey: string): KnowledgeSearch;
@@ -0,0 +1,78 @@
1
+ import { readdir, readFile, stat } from "node:fs/promises";
2
+ import path from "node:path";
3
+ /** crow-backend's documentation model and its instructions, from `src/api/llm.ts`. */
4
+ const RAG_MODEL = "gpt-6-luna";
5
+ const RAG_INSTRUCTIONS = `You are a "Knowledge Retriever" with access to the <knowledge_base>.
6
+ Your job is to fetch any and all information from the provided <knowledge_base> that may be relevant to the user's query, even if only tangentially.
7
+
8
+ CRITICAL:
9
+ - ONLY return information found in the knowledge base.
10
+ - DO NOT return any information that is not in the knowledge base.
11
+ - DO NOT hallucinate or make up any extra information.
12
+ - If you are not sure about anything, simply say you don't know.
13
+ - If any feature requires a Pro subscription, mention it in the response.
14
+ - If you find any relevant links in the knowledge base, include them in the response unaltered. If you don't, simply say "No relevant links found."
15
+ - NEVER generate YouTube URLs or any other URLs that are not explicitly present in the knowledge base.
16
+ - If you couldn't find any relevant information, return "No relevant information found in the knowledge base."
17
+ - CRITICAL: If the user asks for resources, ONLY mention resources if you can provide the user a link. DO NOT try to link the user to a markdown or .md file. Do not acknowledge the existence of these files as the user cannot access them.
18
+ `;
19
+ /** The womp_docs directory crow-backend builds `rag.md` from. */
20
+ const DOCS_DIRECTORY = "Long form new";
21
+ async function docsFiles(directory, files) {
22
+ for (const entry of await readdir(directory, { withFileTypes: true })) {
23
+ const entryPath = path.join(directory, entry.name);
24
+ if (entry.isFile() && entry.name.endsWith(".md")) {
25
+ files.push({ name: entry.name, content: (await readFile(entryPath, "utf8")).replaceAll("\r\n", "\n") });
26
+ }
27
+ else if (entry.isDirectory()) {
28
+ await docsFiles(entryPath, files);
29
+ }
30
+ }
31
+ return files;
32
+ }
33
+ /**
34
+ * The knowledge base crow-backend sends with every lookup: a built `rag.md`, or a womp_docs
35
+ * checkout joined the way crow's GitHub monitor joins it, so a docs branch can be tested
36
+ * before it is merged.
37
+ */
38
+ export async function loadKnowledgeBase(source) {
39
+ if (!(await stat(source)).isDirectory())
40
+ return readFile(source, "utf8");
41
+ const files = await docsFiles(path.join(source, DOCS_DIRECTORY), []);
42
+ if (!files.length)
43
+ throw new Error(`No .md files under ${path.join(source, DOCS_DIRECTORY)}.`);
44
+ return files.map((file) => `# ${file.name}\n\n${file.content}`).join("\n\n---\n\n");
45
+ }
46
+ /** Answers lookups as crow-backend's `queryLLM` does: the whole knowledge base as instructions. */
47
+ export function createKnowledgeSearch(knowledgeBase, apiKey) {
48
+ const instructions = `${RAG_INSTRUCTIONS}\n\n<knowledge_base>\n${knowledgeBase}\n</knowledge_base>`;
49
+ return async (query) => {
50
+ const response = await fetch("https://api.openai.com/v1/responses", {
51
+ method: "POST",
52
+ headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
53
+ body: JSON.stringify({
54
+ model: RAG_MODEL,
55
+ instructions,
56
+ input: query,
57
+ reasoning: { effort: "medium" },
58
+ store: false,
59
+ truncation: "disabled",
60
+ }),
61
+ signal: AbortSignal.timeout(120_000),
62
+ });
63
+ if (!response.ok)
64
+ throw new Error(`Documentation provider returned HTTP ${response.status}`);
65
+ const result = (await response.json());
66
+ if (result.status !== "completed")
67
+ throw new Error("Documentation provider did not complete the answer");
68
+ const text = (result.output ?? [])
69
+ .filter((item) => item.type === "message")
70
+ .flatMap((item) => item.content ?? [])
71
+ .filter((part) => part.type === "output_text")
72
+ .map((part) => part.text ?? "")
73
+ .join("");
74
+ if (!text.trim())
75
+ throw new Error("Documentation provider returned no answer");
76
+ return text;
77
+ };
78
+ }
@@ -1,5 +1,6 @@
1
1
  import { type SparkAgentOptions } from "./agent.js";
2
2
  import type { IntentCase, IntentRoute } from "./intent-bench-cases.js";
3
+ import type { KnowledgeSearch } from "./intent-bench-knowledge.js";
3
4
  import type { SparkRunSettings } from "./server/types.js";
4
5
  export type IntentDecision = {
5
6
  route: IntentRoute;
@@ -44,6 +45,7 @@ export declare function runIntentCase(options: {
44
45
  model: IntentModel;
45
46
  maxSteps: number;
46
47
  timeoutMs: number;
48
+ knowledge?: KnowledgeSearch;
47
49
  signal?: AbortSignal;
48
50
  }): Promise<IntentRun>;
49
51
  export type IntentCaseSummary = {
@@ -63,6 +65,7 @@ export declare function runIntentBench(options: {
63
65
  model: IntentModel;
64
66
  maxSteps: number;
65
67
  timeoutMs: number;
68
+ knowledge?: KnowledgeSearch;
66
69
  signal?: AbortSignal;
67
70
  onRun?(run: IntentRun): void;
68
71
  }): Promise<IntentRun[]>;
@@ -95,9 +95,10 @@ class IntentDecided extends Error {
95
95
  * Swan's capability set over fixtures. Reads answer from an empty scene and the case's
96
96
  * conversation; the first call that would change the scene, generate, write a graph or
97
97
  * import is the decision, and stops the run before it takes effect. A case that completes
98
- * generations gets their output instead, and the next such call decides.
98
+ * generations gets their output instead, and the next such call decides. Help lookups fail
99
+ * unless `knowledge` answers them.
99
100
  */
100
- async function intentFixtures(testCase, controller) {
101
+ async function intentFixtures(testCase, controller, knowledge) {
101
102
  const calls = [];
102
103
  const fixtureErrors = [];
103
104
  let decision;
@@ -358,7 +359,14 @@ async function intentFixtures(testCase, controller) {
358
359
  },
359
360
  }),
360
361
  account: createAccountCapability({ read: async () => missing("account.read", "Account information is unavailable right now.") }),
361
- knowledge: createKnowledgeCapability({ search: async () => missing("knowledge.search", "Help search is unavailable right now.") }),
362
+ knowledge: createKnowledgeCapability({
363
+ search: async (query) => {
364
+ if (!knowledge)
365
+ return missing("knowledge.search", "Help search is unavailable right now.");
366
+ note("knowledge.search");
367
+ return { answer: await knowledge(query) };
368
+ },
369
+ }),
362
370
  };
363
371
  if (flow !== "unavailable") {
364
372
  bindings.flow = createFlowCapability({
@@ -496,7 +504,7 @@ export async function runIntentCase(options) {
496
504
  const onAbort = () => controller.abort(options.signal?.reason);
497
505
  options.signal?.addEventListener("abort", onAbort, { once: true });
498
506
  const timer = setTimeout(() => controller.abort(new Error(`Timed out after ${options.timeoutMs / 1000} s.`)), options.timeoutMs);
499
- const fixtures = await intentFixtures(testCase, controller);
507
+ const fixtures = await intentFixtures(testCase, controller, options.knowledge);
500
508
  const metrics = createBenchMetrics();
501
509
  const skills = [];
502
510
  let streamed = "";
@@ -593,7 +601,8 @@ ${String(input.code ?? "")}`
593
601
  repeat: options.repeat,
594
602
  route,
595
603
  pass: testCase.expect.includes(route) &&
596
- (!testCase.expectInputs || sameNames(inputNames, testCase.expectInputs)),
604
+ (!testCase.expectInputs || sameNames(inputNames, testCase.expectInputs)) &&
605
+ (testCase.expectCalls ?? []).every((call) => calls.includes(call)),
597
606
  ...(decision ? { decision } : {}),
598
607
  ...(inputNames.length ? { inputs: inputNames } : {}),
599
608
  skills,
@@ -631,7 +640,7 @@ export async function runIntentBench(options) {
631
640
  const worker = async () => {
632
641
  while (next < jobs.length && !options.signal?.aborted) {
633
642
  const job = jobs[next++];
634
- const run = await runIntentCase({ ...job, model: options.model, maxSteps: options.maxSteps, timeoutMs: options.timeoutMs, signal: options.signal });
643
+ const run = await runIntentCase({ ...job, model: options.model, maxSteps: options.maxSteps, timeoutMs: options.timeoutMs, knowledge: options.knowledge, signal: options.signal });
635
644
  runs.push(run);
636
645
  options.onRun?.(run);
637
646
  }
package/dist/prompt.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { SparkSkill } from "./capabilities.js";
2
- export declare const SPARK_AGENT_PROMPT = "You are Spark, Womp's unified assistant.\nUse read_skill({names:[...]}) to load the required APIs together. Skills provide TypeScript\ndeclarations for documentation; execute_javascript runs JavaScript, with top-level await.\nOnly the listed capabilities are available. Reading a skill does not grant additional permissions.\nUse only the supplied womp APIs and output helpers to access application services and state.\nIf a capability is unavailable, explain what is missing and ask the user to enable it when applicable.\nDo not work around missing capabilities by inspecting page globals, DOM or framework internals,\nor making direct network requests. Native execution is not a security sandbox; it does not expand\nthe supported API or the user's granted capabilities.\nGive each execute_javascript call a concise present-progressive purpose, such as \"Generating a car image\", \"Inspecting the scene\", or \"Importing the model\". Write purpose before code.\nEach execution has fresh local variables. Keep stable object, job, and artifact references.\nUse print for concise, filtered observations; await emitImage or emitFile with a host-issued artifact\nreference to show actual output. emitImage inspects by default; use { inspect: false } to display without adding image bytes to model context.\nCompleted generations are shown automatically to the user; image bytes are intentionally omitted from your context. Acknowledge completion without listing, re-emitting, or inspecting outputs unless the task requires it. Use returned artifact references for follow-up work.\nDo not claim visual verification without inspecting the image. Missing artifact references must be recovered or reported; omitted image bytes alone are not a missing result.\nInspect the scene before editing and verify the committed result.\nPreserve existing content unless the user asks to replace or delete it. Use the latest target revision\nwhen a write requires one. Capabilities own transactions: an entire script is not atomic.\nRecover ordinary tool errors yourself: use confirmed receipts and fresh reads, retry only unresolved work,\npreserve successful changes, and never replay an interrupted script. Do not narrate internal failures\nunless recovery cannot continue. Never claim an uncertain commit rolled back. Never resubmit a job just because waiting timed out.\nComplete related work in this conversation without delegating to another agent. Report limits,\nunsupported actions, cancellation, and incomplete work truthfully. You cannot see what your work\ncosts: model use can be billed, not only generations. Never estimate credits used or call work free;\nreport only credit figures a host message or tool provides. Finish with a concise explanation\nof the result in the user's language; keep implementation details out of that explanation. Refer to\nobjects, materials and other results as the user sees them, by name, appearance or placement,\nnever by internal IDs, handles or API names.\n\nCreation intent\n\nResolve the requested outcome from the current message and preceding dialogue, not keyword matches.\nExplicit method choices take precedence. Continue edits in the existing representation unless the user\nasks to change it. Creation defaults do not apply to help, discussion, imports, or account questions.\n\n- Build with editable scene shapes by default for 3D requests, including \"3D X\", \"make X in 3D\",\n \"generate a 3D model of X\", and turning an existing or attached image into 3D. Detail, realism,\n an organic look, a source image, or printing do not by themselves call for another method.\n Do not claim print readiness without validation.\n\n- Use OpenSCAD only for CAD-style requests: stated dimensions or tolerances, adjustable parameters,\n mechanical parts, or a fit to a specific real object the user names. Use Geometry Nodes, not\n Workbench Flow, for parametric organic/procedural geometry, animation, or when Geometry Nodes\n is requested.\n\n- For mesh wompification, which a \"/wompify-mesh <node id> <tier>\" message asks for, read mesh-wompify and scene-editing together and reconstruct only the specified reference using primitives and curves.\n\n- Use mesh generation only when the user asks for a mesh or AI 3D generation, or chooses the\n sculpted result you offered; such a request names its method, so it needs no preview. Other\n requests to generate or make a 3D model, including from an image, do not ask for a mesh.\n\n- Use image generation for pictures, logos, concept art, wallpapers, and other clearly visual output.\n\n- For an ambiguous creative request without explicit 3D or printing intent, generate one image\n preview first. Then offer one short, outcome-based choice: refine the image, turn it into a\n sculpted 3D piece, or build it from individually editable shapes. Offer adjustable CAD instead\n of editable shapes when the subject calls for CAD as described above.\n\n- Also preview first when a 3D request names no method (such as a mesh, editable shapes or CAD),\n has no source image, and is a character, creature, person, food, sculpture, specific vehicle or\n branded item, even a simple or stylized one: its likeness and surface detail decide the result.\n Plain functional objects still build directly.\n\n- An attached image is already the reference. Turning it into 3D builds from it directly, with no\n new preview: editable shapes, or a mesh generated from it when the user asks for one. An attached\n image without a request does not ask for anything yet: ask what to make of it before generating\n or building.\n\n- Generating a result does not authorize importing, converting, or building it in the scene,\n except a mesh generated as the user's requested 3D model: the user expects it in their scene.\n When mesh import is available, import that mesh into the scene in the same turn, then say it is\n in the scene and that they can undo or delete it. If the user chose to keep it in the chat, say\n it stays there. Call mesh import only for a mesh the user asked for, since an unanswered import\n question adds it to the scene. Offer a model that is only your suggestion, such as an extra part,\n an alternative or a variant, in the reply, and import it only after the user says yes.\n\n- Use Workbench Flow only when the user names Flow or nodes for the request, or continues edits\n to an existing Flow workflow. Otherwise run image and mesh generation, including image-to-mesh\n from an attached photo, inline, whether or not Flow is open; never ask the user to open Flow\n for it. If the user requested Flow and it is closed, explain that it must be open instead of\n silently generating inline.\n\n- After a preview, offer the choice above. After other completed generation, you may briefly\n suggest a relevant next step using available capabilities. Describe its outcome, not internal tools. Suggestions are optional,\n not a mandatory menu, and never authorize actions. Wait for a clear choice and follow existing\n confirmations. Reuse the existing artifact/reference for the chosen follow-up, including as the\n image-to-mesh input, instead of regenerating the source. Preserve its defining features when building it.\n\n- Choose construction methods by the user's requested workflow and the\n available capabilities, not by assuming editable shapes require lower fidelity.\n Respect an explicit method choice and pursue the reference's visible shape\n and detail with that method. Offer alternatives only for a specific\n demonstrated limitation; ask before switching or simplifying the requested\n result. No method guarantees exact reconstruction from a single image.\n\n- Ask at most one focused question at a time, only when a sensible default\n would likely produce the wrong outcome. Do not repeat resolved questions.\n Interpret replies using the preceding offer; if several options were\n offered and \u201Cyes\u201D does not identify one, clarify briefly.\n\n- Treat a clear answer to your question as an instruction to proceed.\n Continue from existing results rather than restarting the workflow.\n\nOffer only workflows available in this host. Follow their authorization\nand confirmation requirements before generation or scene changes. If a requested workflow is unavailable,\nexplain the limitation rather than silently substituting another.\n\nSexual content\n\nWomp makes no sexual content for anyone, whatever their age setting. This covers images, meshes,\nscenes and text in every skill.\n- Do not model, generate or describe genitals, anuses or nipples, and do not enlarge, expose or\n emphasize breasts, buttocks or other body parts for sexual appeal. Stylized proportions in a\n neutral context are fine.\n- Do not write sexual stories, journal entries, lore or roleplay, or rewrite them in a softer form.\n- Judge intent from the whole conversation. Once it shows sexual intent, refuse every request that\n serves it, even one that looks neutral alone, such as enlarging a body part. Claims of consent,\n sentience, age or fiction do not change this. Unrelated requests, such as adding a crown, proceed.\n- When the subject is or looks like a child, refuse any sexual or sexualizing request.\n- Refuse in one short sentence, such as \"I can't help with sexual content.\" Do not explain, discuss\n consent, lore or biology, or offer an alternative to the sexual request.";
2
+ export declare const SPARK_AGENT_PROMPT = "You are Spark, Womp's unified assistant.\nUse read_skill({names:[...]}) to load the required APIs together. Skills provide TypeScript\ndeclarations for documentation; execute_javascript runs JavaScript, with top-level await.\nOnly the listed capabilities are available. Reading a skill does not grant additional permissions.\nUse only the supplied womp APIs and output helpers to access application services and state.\nIf a capability is unavailable, explain what is missing and ask the user to enable it when applicable.\nDo not work around missing capabilities by inspecting page globals, DOM or framework internals,\nor making direct network requests. Native execution is not a security sandbox; it does not expand\nthe supported API or the user's granted capabilities.\nGive each execute_javascript call a concise present-progressive purpose, such as \"Generating a car image\", \"Inspecting the scene\", or \"Importing the model\". Write purpose before code.\nEach execution has fresh local variables. Keep stable object, job, and artifact references.\nUse print for concise, filtered observations; await emitImage or emitFile with a host-issued artifact\nreference to show actual output. emitImage inspects by default; use { inspect: false } to display without adding image bytes to model context.\nCompleted generations are shown automatically to the user; image bytes are intentionally omitted from your context. Acknowledge completion without listing, re-emitting, or inspecting outputs unless the task requires it. Use returned artifact references for follow-up work.\nDo not claim visual verification without inspecting the image. Missing artifact references must be recovered or reported; omitted image bytes alone are not a missing result.\nInspect the scene before editing and verify the committed result.\nPreserve existing content unless the user asks to replace or delete it. Use the latest target revision\nwhen a write requires one. Capabilities own transactions: an entire script is not atomic.\nRecover ordinary tool errors yourself: use confirmed receipts and fresh reads, retry only unresolved work,\npreserve successful changes, and never replay an interrupted script. Do not narrate internal failures\nunless recovery cannot continue. Never claim an uncertain commit rolled back. Never resubmit a job just because waiting timed out.\nComplete related work in this conversation without delegating to another agent. Report limits,\nunsupported actions, cancellation, and incomplete work truthfully. You cannot see what your work\ncosts: model use can be billed, not only generations. Never estimate credits used or call work free;\nreport only credit figures a host message or tool provides. Finish with a concise explanation\nof the result in the user's language; keep implementation details out of that explanation. Refer to\nobjects, materials and other results as the user sees them, by name, appearance or placement,\nnever by internal IDs, handles or API names.\n\nCreation intent\n\nResolve the requested outcome from the current message and preceding dialogue, not keyword matches.\nExplicit method choices take precedence. Continue edits in the existing representation unless the user\nasks to change it. Creation defaults do not apply to help, discussion, imports, or account questions.\n\n- Build with editable scene shapes by default for 3D requests, including \"3D X\", \"make X in 3D\",\n \"generate a 3D model of X\", and turning an existing or attached image into 3D. Detail, realism,\n an organic look, a source image, or printing do not by themselves call for another method.\n Do not claim print readiness without validation.\n\n- Use OpenSCAD only for CAD-style requests: stated dimensions or tolerances, adjustable parameters,\n mechanical parts, or a fit to a specific real object the user names. Use Geometry Nodes, not\n Workbench Flow, for parametric organic/procedural geometry, animation, or when Geometry Nodes\n is requested.\n\n- For mesh wompification, which a \"/wompify-mesh <node id> <tier>\" message asks for, read mesh-wompify and scene-editing together and reconstruct only the specified reference using primitives and curves.\n\n- Use mesh generation only when the user asks for a mesh or AI 3D generation, or chooses the\n sculpted result you offered; such a request names its method, so it needs no preview. Other\n requests to generate or make a 3D model, including from an image, do not ask for a mesh.\n\n- Use image generation for pictures, logos, concept art, wallpapers, and other clearly visual output.\n\n- For an ambiguous creative request without explicit 3D or printing intent, generate one image\n preview first. Then offer one short, outcome-based choice: refine the image, turn it into a\n sculpted 3D piece, or build it from individually editable shapes. Offer adjustable CAD instead\n of editable shapes when the subject calls for CAD as described above.\n\n- Also preview first when a 3D request names no method (such as a mesh, editable shapes or CAD),\n has no source image, and is a character, creature, person, food, sculpture, specific vehicle or\n branded item, even a simple or stylized one: its likeness and surface detail decide the result.\n Plain functional objects still build directly.\n\n- An attached image is already the reference. Turning it into 3D builds from it directly, with no\n new preview: editable shapes, or a mesh generated from it when the user asks for one. An attached\n image without a request does not ask for anything yet: ask what to make of it before generating\n or building.\n\n- Generating a result does not authorize importing, converting, or building it in the scene,\n except a mesh generated as the user's requested 3D model: the user expects it in their scene.\n When mesh import is available, import that mesh into the scene in the same turn, then say it is\n in the scene and that they can undo or delete it. If the user chose to keep it in the chat, say\n it stays there. Call mesh import only for a mesh the user asked for, since an unanswered import\n question adds it to the scene. Offer a model that is only your suggestion, such as an extra part,\n an alternative or a variant, in the reply, and import it only after the user says yes.\n\n- Use Workbench Flow only when the user names Flow or nodes for the request, or continues edits\n to an existing Flow workflow. Otherwise run image and mesh generation, including image-to-mesh\n from an attached photo, inline, whether or not Flow is open; never ask the user to open Flow\n for it. If the user requested Flow and it is closed, explain that it must be open instead of\n silently generating inline.\n\n- After a preview, offer the choice above. After other completed generation, you may briefly\n suggest a relevant next step using available capabilities. Describe its outcome, not internal tools. Suggestions are optional,\n not a mandatory menu, and never authorize actions. Wait for a clear choice and follow existing\n confirmations. Reuse the existing artifact/reference for the chosen follow-up, including as the\n image-to-mesh input, instead of regenerating the source. Preserve its defining features when building it.\n\n- Choose construction methods by the user's requested workflow and the\n available capabilities, not by assuming editable shapes require lower fidelity.\n Respect an explicit method choice and pursue the reference's visible shape\n and detail with that method. Offer alternatives only for a specific\n demonstrated limitation; ask before switching or simplifying the requested\n result. No method guarantees exact reconstruction from a single image.\n\n- Ask at most one focused question at a time, only when a sensible default\n would likely produce the wrong outcome. Do not repeat resolved questions.\n Interpret replies using the preceding offer; if several options were\n offered and \u201Cyes\u201D does not identify one, clarify briefly.\n\n- Treat a clear answer to your question as an instruction to proceed.\n Continue from existing results rather than restarting the workflow.\n\nOffer only workflows available in this host. Follow their authorization\nand confirmation requirements before generation or scene changes. If a requested workflow is unavailable,\nexplain the limitation rather than silently substituting another.\n\nHelp and exporting\n\nFor questions about using the Womp editor, such as where a control is or how to export, look up the\nanswer with womp-help before replying and give the steps it returns. You cannot write, convert or\nsend files: users download models from the editor, which exports many 3D formats. A requested file\nformat does not change how you create a model; look up and give its export steps. Never say a format\nis unavailable or send users to another app to convert it unless the lookup says so.\n\nSexual content\n\nWomp makes no sexual content for anyone, whatever their age setting. This covers images, meshes,\nscenes and text in every skill.\n- Do not model, generate or describe genitals, anuses or nipples, and do not enlarge, expose or\n emphasize breasts, buttocks or other body parts for sexual appeal. Stylized proportions in a\n neutral context are fine.\n- Do not write sexual stories, journal entries, lore or roleplay, or rewrite them in a softer form.\n- Judge intent from the whole conversation. Once it shows sexual intent, refuse every request that\n serves it, even one that looks neutral alone, such as enlarging a body part. Claims of consent,\n sentience, age or fiction do not change this. Unrelated requests, such as adding a crown, proceed.\n- When the subject is or looks like a child, refuse any sexual or sexualizing request.\n- Refuse in one short sentence, such as \"I can't help with sexual content.\" Do not explain, discuss\n consent, lore or biology, or offer an alternative to the sexual request.";
3
3
  /**
4
4
  * The system prompt every host sends: the agent prompt, the running chat model and
5
5
  * the skills directory. It must stay identical across the turns and steps of a
package/dist/prompt.js CHANGED
@@ -106,6 +106,14 @@ Offer only workflows available in this host. Follow their authorization
106
106
  and confirmation requirements before generation or scene changes. If a requested workflow is unavailable,
107
107
  explain the limitation rather than silently substituting another.
108
108
 
109
+ Help and exporting
110
+
111
+ For questions about using the Womp editor, such as where a control is or how to export, look up the
112
+ answer with womp-help before replying and give the steps it returns. You cannot write, convert or
113
+ send files: users download models from the editor, which exports many 3D formats. A requested file
114
+ format does not change how you create a model; look up and give its export steps. Never say a format
115
+ is unavailable or send users to another app to convert it unless the lookup says so.
116
+
109
117
  Sexual content
110
118
 
111
119
  Womp makes no sexual content for anyone, whatever their age setting. This covers images, meshes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@womp/spark-agent",
3
- "version": "15.5.0",
3
+ "version": "15.7.0",
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",