@womp/spark-agent 15.4.0 → 15.6.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,44 @@ 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.6.0 — 2026-10-29
8
+
9
+ Spark now raises an Area's resolution when its own screenshots show detail lost to a coarse Area,
10
+ instead of leaving every new Area at the default 0.3 or reshaping correct geometry.
11
+
12
+ ### Changed
13
+
14
+ - The `scene-editing` skill (version 49) lists what a too-coarse Area looks like: jagged or
15
+ stair-stepped edges, lumpy flat faces, rounded-off corners, blurred or merged small features and
16
+ thin parts that break up. It says wide views hide this, that detail is judged from a close-up, and
17
+ that the fix is raising the owning Area's resolution (up to 0.65) unless resource limits apply.
18
+ Before, the rule only covered fragmented or missing thin features.
19
+ - The `parametric-parts` skill (version 5) says an OpenSCAD part renders at its parent Area's
20
+ resolution, so sampling loss is fixed with `nodeSetUnionResolution`, not by reshaping the source.
21
+
22
+ ## 15.5.0 — 2026-10-27
23
+
24
+ An import question the user leaves unanswered now always adds the mesh to the scene, and Spark no
25
+ longer decides that itself (SW-009, SW-011).
26
+
27
+ ### Changed
28
+
29
+ - `importMesh` no longer takes `ifNoAnswer`, and rejects it. Hosts that time out the import
30
+ question import with the question's default settings on expiry and return `unanswered: true`.
31
+ Before, the model chose `"import"` or `"skip"`, an omitted field meant skip, and in a new project
32
+ it often chose skip because Womp's starter shapes looked like existing work, so users came back to
33
+ a generated model that was never placed. crow-backend's deadline is now about a minute. The
34
+ `asset-import` skill is version 10.
35
+ - Spark calls `importMesh` only for a mesh the user asked for, including one it generated for a
36
+ request to make something 3D. A model that is only Spark's suggestion, such as an extra part, an
37
+ alternative or a variant, is offered in the reply and imported once the user says yes.
38
+ - intent-bench: `IntentCase.expectIfNoAnswer` is gone.
39
+
40
+ ### Migration
41
+
42
+ - Hosts: stop reading `MeshImportRequest.ifNoAnswer`; on an unanswered question, import with the
43
+ default settings and set `unanswered: true` on the result.
44
+
7
45
  ## 15.4.0 — 2026-10-27
8
46
 
9
47
  ### Added
@@ -4,15 +4,7 @@ type ImportRequestBase = {
4
4
  source: ArtifactRef;
5
5
  destination: "scene" | "library";
6
6
  };
7
- export type MeshImportRequest = ImportRequestBase & {
8
- /**
9
- * What the host does when the user leaves the import question unanswered
10
- * past its deadline: "import" uses the question's default settings,
11
- * "skip" (the default) imports nothing. Either way the result says
12
- * `unanswered: true`.
13
- */
14
- ifNoAnswer?: "import" | "skip";
15
- };
7
+ export type MeshImportRequest = ImportRequestBase;
16
8
  export type ImageImportRequest = ImportRequestBase & {
17
9
  kind: "image-plane" | "sticker";
18
10
  removeBackground?: boolean;
@@ -42,7 +34,7 @@ export type AssetImportResult = {
42
34
  projectId: number | null;
43
35
  }[];
44
36
  reason?: string;
45
- /** The user did not answer the import question in time; the request's `ifNoAnswer` decided. */
37
+ /** The user did not answer the import question in time, so the host imported with default settings. */
46
38
  unanswered?: true;
47
39
  };
48
40
  export type AssetImportWaitOptions = {
@@ -14,7 +14,6 @@ const requestSchema = z
14
14
  destination: z.enum(["scene", "library"]),
15
15
  })
16
16
  .strict();
17
- const meshRequestSchema = requestSchema.extend({ ifNoAnswer: z.enum(["import", "skip"]).optional() });
18
17
  const waitSchema = z
19
18
  .object({ timeoutMs: z.number().int().min(1).max(30_000).default(15_000) })
20
19
  .strict();
@@ -31,17 +30,14 @@ export function createAssetImportsCapability(host) {
31
30
  skills: [
32
31
  {
33
32
  name: "asset-import",
34
- version: "9",
33
+ version: "10",
35
34
  description: "Import a conversation mesh, image plane, or sticker into the scene or asset library.",
36
35
  instructions: `Read the assets skill to find the exact mesh source reference first. importMesh asks the
37
36
  user in the chat whether to add the mesh (Add to scene / Keep in chat; they may also open the editable-field
38
- or mesh settings) and waits for the answer. The question has a deadline of a few minutes. Set ifNoAnswer
39
- to what you decide should happen if the user does not answer by then: "import" imports with the default
40
- settings, "skip" (the default) imports nothing. Use "import" when the user asked for this model in their
41
- scene, including a mesh you generated for a request to make something 3D; use "skip" when adding it is
42
- only your suggestion. A result with unanswered: true was decided by ifNoAnswer, not by the user: say so
43
- plainly in the reply, for example that you added it to the scene since they did not answer, and that
44
- Ctrl+Z or asking you removes it; or that nothing was imported and they can ask you to add it.
37
+ or mesh settings) and waits for the answer. The question has a deadline of about a minute: if the user
38
+ does not answer by then, the mesh is imported with the default settings. A result with unanswered: true
39
+ was added because the user did not answer: say so plainly in the reply, for example that you added it
40
+ to the scene since they did not answer, and that Ctrl+Z or asking you removes it.
45
41
  A scene import also retains the existing library copy. Library imports create assets only.
46
42
  If no project is open, a scene import asks for confirmation before creating and opening a new project.
47
43
  Continue in this same run after the import returns; the next model step lists the newly available scene
@@ -93,7 +89,7 @@ image plane in a new Area, preserving existing import placement. This API does n
93
89
  or meshes. Image imports can fail or have an unknown outcome; do not blindly upload them again.`,
94
90
  declarations: WOMP_ASSET_IMPORT_DECLARATIONS,
95
91
  examples: [
96
- 'const source = (await womp.assets.list({ kind: "mesh" })).items[0]; print(await womp.assets.importMesh({ key: "chair-import", source: source.artifact, destination: "scene", ifNoAnswer: "import" }));',
92
+ 'const source = (await womp.assets.list({ kind: "mesh" })).items[0]; print(await womp.assets.importMesh({ key: "chair-import", source: source.artifact, destination: "scene" }));',
97
93
  'print(await womp.assets.finishImport("chair-import", { timeoutMs: 15000 }));',
98
94
  'const images = await womp.assets.list({ kind: "image", source: "uploaded" }); print(images); // Match the requested filename/message before importing its artifact.',
99
95
  ],
@@ -106,7 +102,7 @@ or meshes. Image imports can fail or have an unknown outcome; do not blindly upl
106
102
  },
107
103
  importMesh: (request) => {
108
104
  context.signal.throwIfAborted();
109
- return host.importMesh(meshRequestSchema.parse(request), context);
105
+ return host.importMesh(requestSchema.parse(request), context);
110
106
  },
111
107
  retryMeshImport: (request) => {
112
108
  context.signal.throwIfAborted();
@@ -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.
@@ -1 +1 @@
1
- export declare const WOMP_ASSET_IMPORT_DECLARATIONS = "declare const womp: { assets: {\nimportMesh: ((request: {\nkey: string;\nsource: { id: string; mediaType: string; name?: string; };\ndestination: \"scene\" | \"library\";\n} & { ifNoAnswer?: \"import\" | \"skip\"; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nretryMeshImport: ((request: { key: string; fileName: string; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nimportImage: ((request: {\nkey: string;\nsource: { id: string; mediaType: string; name?: string; };\ndestination: \"scene\" | \"library\";\n} & { kind: \"image-plane\" | \"sticker\"; removeBackground?: boolean; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nreadImport: ((key: string) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nfinishImport: ((key: string, options?: { timeoutMs?: number; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\n} };\ndeclare function print(...values: unknown[]): void;\ndeclare function emitImage(ref: { id: string; mediaType: string; name?: string }, options?: { inspect?: boolean }): Promise<void>;\ndeclare function emitFile(ref: { id: string; mediaType: string; name?: string }): Promise<void>;\n";
1
+ export declare const WOMP_ASSET_IMPORT_DECLARATIONS = "declare const womp: { assets: {\nimportMesh: ((request: {\nkey: string;\nsource: { id: string; mediaType: string; name?: string; };\ndestination: \"scene\" | \"library\";\n}) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nretryMeshImport: ((request: { key: string; fileName: string; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nimportImage: ((request: {\nkey: string;\nsource: { id: string; mediaType: string; name?: string; };\ndestination: \"scene\" | \"library\";\n} & { kind: \"image-plane\" | \"sticker\"; removeBackground?: boolean; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nreadImport: ((key: string) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nfinishImport: ((key: string, options?: { timeoutMs?: number; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\n} };\ndeclare function print(...values: unknown[]): void;\ndeclare function emitImage(ref: { id: string; mediaType: string; name?: string }, options?: { inspect?: boolean }): Promise<void>;\ndeclare function emitFile(ref: { id: string; mediaType: string; name?: string }): Promise<void>;\n";
@@ -1,3 +1,3 @@
1
1
  // Generated by scripts/generate-skill-declarations.mjs.
2
2
  // prettier-ignore
3
- export const WOMP_ASSET_IMPORT_DECLARATIONS = "declare const womp: { assets: {\nimportMesh: ((request: {\nkey: string;\nsource: { id: string; mediaType: string; name?: string; };\ndestination: \"scene\" | \"library\";\n} & { ifNoAnswer?: \"import\" | \"skip\"; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nretryMeshImport: ((request: { key: string; fileName: string; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nimportImage: ((request: {\nkey: string;\nsource: { id: string; mediaType: string; name?: string; };\ndestination: \"scene\" | \"library\";\n} & { kind: \"image-plane\" | \"sticker\"; removeBackground?: boolean; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nreadImport: ((key: string) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nfinishImport: ((key: string, options?: { timeoutMs?: number; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\n} };\ndeclare function print(...values: unknown[]): void;\ndeclare function emitImage(ref: { id: string; mediaType: string; name?: string }, options?: { inspect?: boolean }): Promise<void>;\ndeclare function emitFile(ref: { id: string; mediaType: string; name?: string }): Promise<void>;\n";
3
+ export const WOMP_ASSET_IMPORT_DECLARATIONS = "declare const womp: { assets: {\nimportMesh: ((request: {\nkey: string;\nsource: { id: string; mediaType: string; name?: string; };\ndestination: \"scene\" | \"library\";\n}) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nretryMeshImport: ((request: { key: string; fileName: string; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nimportImage: ((request: {\nkey: string;\nsource: { id: string; mediaType: string; name?: string; };\ndestination: \"scene\" | \"library\";\n} & { kind: \"image-plane\" | \"sticker\"; removeBackground?: boolean; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nreadImport: ((key: string) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\nfinishImport: ((key: string, options?: { timeoutMs?: number; }) => Promise<{\nkey: string;\nstatus: \"ready\" | \"completed\" | \"unknown\" | \"processing\" | \"partial\" | \"cancelled\" | \"failed\";\ntasks: { id: number; projectId: null | number; status: string; fileName?: string; error?: string; }[];\nassets: { id: number; projectId: null | number; type: \"mesh\" | \"field\" | \"decal\"; }[];\nobjectIds: number[];\nomittedFiles?: { fileName: string; projectId: null | number; }[];\nreason?: string;\nunanswered?: true;\n}>);\n} };\ndeclare function print(...values: unknown[]): void;\ndeclare function emitImage(ref: { id: string; mediaType: string; name?: string }, options?: { inspect?: boolean }): Promise<void>;\ndeclare function emitFile(ref: { id: string; mediaType: string; name?: string }): Promise<void>;\n";
@@ -48,8 +48,6 @@ 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
- /** For an import: the `ifNoAnswer` it must set (unset counts as "skip"). */
52
- expectIfNoAnswer?: "import" | "skip";
53
51
  note?: string;
54
52
  };
55
53
  /**
@@ -232,11 +232,11 @@ export const INTENT_CASES = [
232
232
  },
233
233
  { id: "womp-mesh-named", group: "photo", turns: [user("make this 3D using Womp Mesh", [cup])], expect: ["image-to-mesh"] },
234
234
  {
235
- id: "photo-3d-place", group: "photo", completeGenerations: true, turns: [user("Make a 3D mesh of this", [cup])], expect: ["import"], expectIfNoAnswer: "import",
235
+ id: "photo-3d-place", group: "photo", completeGenerations: true, turns: [user("Make a 3D mesh of this", [cup])], expect: ["import"],
236
236
  note: "The generated model goes into the scene in the same turn. Beta thread 2804473 asked to add it three times; nobody answered.",
237
237
  },
238
238
  {
239
- id: "photo-generate-3d-place", group: "photo", completeGenerations: true, turns: [user("generate a mesh from this image", [cup])], expect: ["import"], expectIfNoAnswer: "import",
239
+ id: "photo-generate-3d-place", group: "photo", completeGenerations: true, turns: [user("generate a mesh from this image", [cup])], expect: ["import"],
240
240
  note: "Beta thread 2804702 said the mesh was ready to import; the user asked what it was.",
241
241
  },
242
242
  {
@@ -35,8 +35,6 @@ export type IntentRun = {
35
35
  };
36
36
  /** A solid-color PNG, so conversation cases need no image files. */
37
37
  export declare function solidPng([r, g, b]: [number, number, number], size?: number): Uint8Array;
38
- /** An import request's `ifNoAnswer`, as the host reads it: unset is "skip". */
39
- export declare const ifNoAnswer: (detail: unknown) => unknown;
40
38
  export type IntentModel = Pick<SparkAgentOptions, "model" | "modelId" | "providerOptions" | "maxOutputTokens">;
41
39
  /** The standalone server's provider settings for a Spark model. */
42
40
  export declare function intentBenchModel(settings: SparkRunSettings): IntentModel;
@@ -471,8 +471,6 @@ async function intentFixtures(testCase, controller) {
471
471
  }),
472
472
  };
473
473
  }
474
- /** An import request's `ifNoAnswer`, as the host reads it: unset is "skip". */
475
- export const ifNoAnswer = (detail) => detail?.ifNoAnswer ?? "skip";
476
474
  const sameNames = (actual, expected) => actual.length === expected.length && [...actual].sort().every((name, index) => name === [...expected].sort()[index]);
477
475
  /** The standalone server's provider settings for a Spark model. */
478
476
  export function intentBenchModel(settings) {
@@ -595,8 +593,7 @@ ${String(input.code ?? "")}`
595
593
  repeat: options.repeat,
596
594
  route,
597
595
  pass: testCase.expect.includes(route) &&
598
- (!testCase.expectInputs || sameNames(inputNames, testCase.expectInputs)) &&
599
- (!testCase.expectIfNoAnswer || ifNoAnswer(decision?.detail) === testCase.expectIfNoAnswer),
596
+ (!testCase.expectInputs || sameNames(inputNames, testCase.expectInputs)),
600
597
  ...(decision ? { decision } : {}),
601
598
  ...(inputNames.length ? { inputs: inputNames } : {}),
602
599
  skills,
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 with ifNoAnswer\n \"import\", then say it is in the scene and that they can undo or delete it. If the user chose to\n keep it in the chat, say it stays there. Use ifNoAnswer \"skip\" when the scene already holds other\n work the new model could overlap or crowd.\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\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
@@ -69,10 +69,11 @@ asks to change it. Creation defaults do not apply to help, discussion, imports,
69
69
 
70
70
  - Generating a result does not authorize importing, converting, or building it in the scene,
71
71
  except a mesh generated as the user's requested 3D model: the user expects it in their scene.
72
- When mesh import is available, import that mesh into the scene in the same turn with ifNoAnswer
73
- "import", then say it is in the scene and that they can undo or delete it. If the user chose to
74
- keep it in the chat, say it stays there. Use ifNoAnswer "skip" when the scene already holds other
75
- work the new model could overlap or crowd.
72
+ When mesh import is available, import that mesh into the scene in the same turn, then say it is
73
+ in the scene and that they can undo or delete it. If the user chose to keep it in the chat, say
74
+ it stays there. Call mesh import only for a mesh the user asked for, since an unanswered import
75
+ question adds it to the scene. Offer a model that is only your suggestion, such as an extra part,
76
+ an alternative or a variant, in the reply, and import it only after the user says yes.
76
77
 
77
78
  - Use Workbench Flow only when the user names Flow or nodes for the request, or continues edits
78
79
  to an existing Flow workflow. Otherwise run image and mesh generation, including image-to-mesh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@womp/spark-agent",
3
- "version": "15.4.0",
3
+ "version": "15.6.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",