@womp/spark-agent 15.2.0 → 15.4.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/agent-run.d.ts +1 -1
  3. package/dist/capabilities/materials.js +17 -15
  4. package/dist/generated/account-declarations.d.ts +1 -1
  5. package/dist/generated/account-declarations.js +1 -1
  6. package/dist/generated/asset-import-declarations.d.ts +1 -1
  7. package/dist/generated/asset-import-declarations.js +1 -1
  8. package/dist/generated/assets-declarations.d.ts +1 -1
  9. package/dist/generated/assets-declarations.js +1 -1
  10. package/dist/generated/flow-declarations.d.ts +1 -1
  11. package/dist/generated/flow-declarations.js +1 -1
  12. package/dist/generated/flow-runs-declarations.d.ts +1 -1
  13. package/dist/generated/flow-runs-declarations.js +1 -1
  14. package/dist/generated/geometry-declarations.d.ts +1 -1
  15. package/dist/generated/geometry-declarations.js +1 -1
  16. package/dist/generated/knowledge-declarations.d.ts +1 -1
  17. package/dist/generated/knowledge-declarations.js +1 -1
  18. package/dist/generated/materials-declarations.d.ts +1 -1
  19. package/dist/generated/materials-declarations.js +1 -1
  20. package/dist/generated/openscad-declarations.d.ts +1 -1
  21. package/dist/generated/openscad-declarations.js +1 -1
  22. package/dist/generated/operations-declarations.d.ts +1 -1
  23. package/dist/generated/operations-declarations.js +1 -1
  24. package/dist/generated/print-declarations.d.ts +1 -1
  25. package/dist/generated/print-declarations.js +1 -1
  26. package/dist/generated/scene-declarations.d.ts +1 -1
  27. package/dist/generated/scene-declarations.js +1 -1
  28. package/dist/generated/texture-import-declarations.d.ts +1 -1
  29. package/dist/generated/texture-import-declarations.js +1 -1
  30. package/dist/intent-bench-cases.d.ts +8 -1
  31. package/dist/intent-bench-cases.js +90 -0
  32. package/dist/intent-bench-cli.js +1 -1
  33. package/dist/intent-bench.js +3 -0
  34. package/dist/materials/flowir.d.ts +3 -2
  35. package/dist/materials/flowir.js +27 -19
  36. package/dist/materials/lift.js +11 -6
  37. package/dist/materials/schemas/materials-dialect.json +26 -248
  38. package/dist/models.d.ts +7 -0
  39. package/dist/models.js +9 -0
  40. package/dist/pricing.js +5 -0
  41. package/dist/prompt.d.ts +1 -1
  42. package/dist/prompt.js +16 -1
  43. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { comparableMaterialGraph, compileMaterialFlowir, materialDialectNames, materialFlowirRegistry, materialMathOperations, materialPortSlot, materialScalarMathOperations } from "./flowir.js";
1
+ import { comparableMaterialGraph, compileMaterialFlowir, materialDialectNames, materialFlowirRegistry, materialMathOperations, materialPortSlot, unaryMathOperations } from "./flowir.js";
2
2
  function number(node, slot) {
3
3
  const value = node[`in${slot}`];
4
4
  return value?.x ?? 0;
@@ -13,10 +13,9 @@ function literal(value, type) {
13
13
  }
14
14
  function nodeType(node) {
15
15
  if (node.op === "Math") {
16
- const name = materialMathOperations[number(node, 0)];
17
- if (!name)
16
+ if (!materialMathOperations[number(node, 0)])
18
17
  throw new Error("Unsupported Math operation");
19
- return name;
18
+ return "Math";
20
19
  }
21
20
  return node.op === "OptionSelector" ? "ProjectionModeSelector" : materialDialectNames[node.op] ?? node.op;
22
21
  }
@@ -45,7 +44,7 @@ export function liftMaterialFlowir(graph, catalog) {
45
44
  scalarMath(edge.output_node, next));
46
45
  };
47
46
  const types = graph.nodes.map((node, index) => scalarMath(index)
48
- ? materialScalarMathOperations[number(node, 0)] : nodeType(node));
47
+ ? "ScalarMath" : nodeType(node));
49
48
  const lines = [];
50
49
  const roles = new Map();
51
50
  for (const [index, node] of graph.nodes.entries()) {
@@ -129,6 +128,10 @@ export function liftMaterialFlowir(graph, catalog) {
129
128
  continue;
130
129
  if (type === "PredefinedTexture" && port.name === "Texture")
131
130
  continue;
131
+ if (node.op === "Math" && port.name === "Operation") {
132
+ bindings.push(`Operation=${materialMathOperations[number(node, 0)]}`);
133
+ continue;
134
+ }
132
135
  const nativeSlot = materialPortSlot(type, port.name, portIndex);
133
136
  const edge = incoming.get(`${index}:${nativeSlot}`);
134
137
  if (edge) {
@@ -136,7 +139,9 @@ export function liftMaterialFlowir(graph, catalog) {
136
139
  continue;
137
140
  }
138
141
  const stored = node[`in${nativeSlot}`];
139
- if (port.optional && stored === undefined)
142
+ const required = node.op === "Math" && port.name === "Second" &&
143
+ !unaryMathOperations.has(materialMathOperations[number(node, 0)]);
144
+ if (port.optional && !required && stored === undefined)
140
145
  continue;
141
146
  if (node.op === "OutputMaterial")
142
147
  continue;
@@ -5,6 +5,14 @@
5
5
  "name": "BlendMode",
6
6
  "values": ["Mix", "Add", "Subtract", "Multiply", "Divide", "Difference", "Screen", "Lighten", "Darken", "LinearLight", "SoftLight", "Overlay", "ColorBurn", "ColorDodge", "Color", "Hue", "Saturation", "Value"]
7
7
  },
8
+ {
9
+ "name": "ScalarOperation",
10
+ "values": ["Add", "Subtract", "Multiply", "Divide"]
11
+ },
12
+ {
13
+ "name": "MathOperation",
14
+ "values": ["Add", "Subtract", "Multiply", "Divide", "Power", "Sine", "Cosine", "AbsoluteValue", "Length", "Fraction", "Modulo", "Floor", "Min", "Max", "DotProduct", "Normalize", "Distance", "Snap", "PingPong", "Tangent", "Arcsine", "Arccosine", "Arctangent", "Arctan2"]
15
+ },
8
16
  {
9
17
  "name": "CompareOperation",
10
18
  "values": ["Less", "Greater", "Equal", "NotEqual", "LessOrEqual", "GreaterOrEqual"]
@@ -110,21 +118,21 @@
110
118
  "inputs": [
111
119
  { "name": "Position", "type": "Vec3" },
112
120
  { "name": "FrequencyScale", "type": "Vec3" },
113
- { "name": "Detail", "type": "Int", "desc": "octaves, 1 to 16; 3 to 6 is typical" },
114
- { "name": "Amplitude", "type": "Float", "desc": "multiplies the result" },
115
- { "name": "ExtendedRange", "type": "Bool", "optional": true, "desc": "result in -1..1 instead of 0..1" }
121
+ { "name": "Detail", "type": "Int", "desc": "octaves, 1..16, typically 3..6" },
122
+ { "name": "Amplitude", "type": "Float" },
123
+ { "name": "ExtendedRange", "type": "Bool", "optional": true }
116
124
  ],
117
125
  "outputs": [{ "name": "Output", "type": "Vec3" }]
118
126
  },
119
127
  {
120
128
  "name": "VectorNoise",
121
129
  "type": "Noise3D",
122
- "desc": "3D gradient noise at three offset positions, one sample per RGB/XYZ component; Amplitude multiplies the range",
130
+ "desc": "3D gradient noise at three offset positions, one sample per RGB/XYZ component",
123
131
  "inputs": [
124
132
  { "name": "Position", "type": "Vec3" },
125
133
  { "name": "FrequencyScale", "type": "Vec3" },
126
- { "name": "Detail", "type": "Int", "desc": "octaves, 1 to 16; 3 to 6 is typical" },
127
- { "name": "Amplitude", "type": "Float", "desc": "multiplies the result" },
134
+ { "name": "Detail", "type": "Int", "desc": "octaves, 1..16, typically 3..6" },
135
+ { "name": "Amplitude", "type": "Float" },
128
136
  { "name": "ExtendedRange", "type": "Bool", "optional": true, "desc": "result in -1..1 instead of 0..1" }
129
137
  ],
130
138
  "outputs": [{ "name": "Output", "type": "Vec3" }]
@@ -136,8 +144,8 @@
136
144
  "inputs": [
137
145
  { "name": "Position", "type": "Vec3" },
138
146
  { "name": "FrequencyScale", "type": "Vec3" },
139
- { "name": "Detail", "type": "Int", "desc": "octaves, 1 to 16; 3 to 6 is typical" },
140
- { "name": "Amplitude", "type": "Float", "desc": "multiplies the result" },
147
+ { "name": "Detail", "type": "Int", "desc": "octaves, 1..16, typically 3..6" },
148
+ { "name": "Amplitude", "type": "Float" },
141
149
  { "name": "ExtendedRange", "type": "Bool", "optional": true, "desc": "result in -1..1 instead of 0..1" }
142
150
  ],
143
151
  "outputs": [{ "name": "Output", "type": "Vec3" }]
@@ -161,8 +169,8 @@
161
169
  "inputs": [
162
170
  { "name": "Position", "type": "Vec3" },
163
171
  { "name": "FrequencyScale", "type": "Vec3" },
164
- { "name": "Amplitude", "type": "Float", "desc": "multiplies the result" },
165
- { "name": "ExtendedRange", "type": "Bool", "optional": true, "desc": "result in -1..1 instead of 0..1" }
172
+ { "name": "Amplitude", "type": "Float" },
173
+ { "name": "ExtendedRange", "type": "Bool", "optional": true }
166
174
  ],
167
175
  "outputs": [{ "name": "Output", "type": "Vec3" }]
168
176
  },
@@ -197,259 +205,29 @@
197
205
  ]
198
206
  },
199
207
  {
200
- "name": "ScalarAdd",
201
- "type": "Math",
202
- "desc": "First + Second, using scalar x components",
203
- "inputs": [
204
- { "name": "First", "type": "Float" },
205
- { "name": "Second", "type": "Float" },
206
- { "name": "Clamp", "type": "Bool", "optional": true, "desc": "clamps to 0..1" }
207
- ],
208
- "outputs": [{ "name": "Output", "type": "Float" }]
209
- },
210
- {
211
- "name": "ScalarSubtract",
212
- "type": "Math",
213
- "desc": "First - Second, using scalar x components",
214
- "inputs": [
215
- { "name": "First", "type": "Float" },
216
- { "name": "Second", "type": "Float" },
217
- { "name": "Clamp", "type": "Bool", "optional": true, "desc": "clamps to 0..1" }
218
- ],
219
- "outputs": [{ "name": "Output", "type": "Float" }]
220
- },
221
- {
222
- "name": "ScalarMultiply",
208
+ "name": "ScalarMath",
223
209
  "type": "Math",
224
- "desc": "First * Second, using scalar x components",
210
+ "desc": "First <Operation> Second, using scalar x components",
225
211
  "inputs": [
212
+ { "name": "Operation", "type": "ScalarOperation", "literal": true },
226
213
  { "name": "First", "type": "Float" },
227
214
  { "name": "Second", "type": "Float" },
228
- { "name": "Clamp", "type": "Bool", "optional": true, "desc": "clamps to 0..1" }
229
- ],
230
- "outputs": [{ "name": "Output", "type": "Float" }]
231
- },
232
- {
233
- "name": "ScalarDivide",
234
- "type": "Math",
235
- "desc": "First / Second, using scalar x components",
236
- "inputs": [
237
- { "name": "First", "type": "Float" },
238
- { "name": "Second", "type": "Float" },
239
- { "name": "Clamp", "type": "Bool", "optional": true, "desc": "clamps to 0..1" }
240
- ],
241
- "outputs": [{ "name": "Output", "type": "Float" }]
242
- },
243
- {
244
- "name": "MathAdd",
245
- "type": "Math",
246
- "desc": "First + Second, per component",
247
- "inputs": [
248
- { "name": "First", "type": "Vec3" },
249
- { "name": "Second", "type": "Vec3" },
250
- { "name": "Clamp", "type": "Bool", "optional": true, "desc": "clamps the result to 0..1" }
251
- ],
252
- "outputs": [{ "name": "Output", "type": "Vec3" }]
253
- },
254
- {
255
- "name": "MathSubtract",
256
- "type": "Math",
257
- "desc": "First - Second, per component",
258
- "inputs": [
259
- { "name": "First", "type": "Vec3" },
260
- { "name": "Second", "type": "Vec3" },
261
215
  { "name": "Clamp", "type": "Bool", "optional": true, "desc": "clamps the result to 0..1" }
262
216
  ],
263
- "outputs": [{ "name": "Output", "type": "Vec3" }]
217
+ "outputs": [{ "name": "Output", "type": "Float" }]
264
218
  },
265
219
  {
266
- "name": "MathMultiply",
220
+ "name": "Math",
267
221
  "type": "Math",
268
- "desc": "First * Second, per component",
222
+ "desc": "Operation per component, angles in radians. Power treats First below 0 as 0; Modulo is floored; Snap rounds First down to a multiple of Second; PingPong bounces First between 0 and Second; Arctan2 is atan2(First,Second); Arcsine and Arccosine clamp First to -1..1. Length, DotProduct and Distance put their scalar in x, y and z",
269
223
  "inputs": [
224
+ { "name": "Operation", "type": "MathOperation", "literal": true },
270
225
  { "name": "First", "type": "Vec3" },
271
- { "name": "Second", "type": "Vec3" },
226
+ { "name": "Second", "type": "Vec3", "optional": true, "desc": "required except by Sine, Cosine, Tangent, Arcsine, Arccosine, Arctangent, AbsoluteValue, Fraction, Floor, Length and Normalize" },
272
227
  { "name": "Clamp", "type": "Bool", "optional": true, "desc": "clamps the result to 0..1" }
273
228
  ],
274
229
  "outputs": [{ "name": "Output", "type": "Vec3" }]
275
230
  },
276
- {
277
- "name": "MathDivide",
278
- "type": "Math",
279
- "desc": "First / Second, per component",
280
- "inputs": [
281
- { "name": "First", "type": "Vec3" },
282
- { "name": "Second", "type": "Vec3" }
283
- ],
284
- "outputs": [{ "name": "Output", "type": "Vec3" }]
285
- },
286
- {
287
- "name": "MathPower",
288
- "type": "Math",
289
- "desc": "First to the power of Second, per component; First below 0 counts as 0",
290
- "inputs": [
291
- { "name": "First", "type": "Vec3" },
292
- { "name": "Second", "type": "Vec3" }
293
- ],
294
- "outputs": [{ "name": "Output", "type": "Vec3" }]
295
- },
296
- {
297
- "name": "MathSine",
298
- "type": "Math",
299
- "desc": "sin(Value), in radians, per component",
300
- "inputs": [{ "name": "Value", "type": "Vec3" }],
301
- "outputs": [{ "name": "Output", "type": "Vec3" }]
302
- },
303
- {
304
- "name": "MathCosine",
305
- "type": "Math",
306
- "desc": "cos(Value), in radians, per component",
307
- "inputs": [{ "name": "Value", "type": "Vec3" }],
308
- "outputs": [{ "name": "Output", "type": "Vec3" }]
309
- },
310
- {
311
- "name": "MathAbsoluteValue",
312
- "type": "Math",
313
- "desc": "abs(Value), per component",
314
- "inputs": [{ "name": "Value", "type": "Vec3" }],
315
- "outputs": [{ "name": "Output", "type": "Vec3" }]
316
- },
317
- {
318
- "name": "MathLength",
319
- "type": "Math",
320
- "desc": "the length of Value, in x, y and z",
321
- "inputs": [{ "name": "Value", "type": "Vec3" }],
322
- "outputs": [{ "name": "Output", "type": "Vec3" }]
323
- },
324
- {
325
- "name": "MathFraction",
326
- "type": "Math",
327
- "desc": "Value minus its floor, per component",
328
- "inputs": [{ "name": "Value", "type": "Vec3" }],
329
- "outputs": [{ "name": "Output", "type": "Vec3" }]
330
- },
331
- {
332
- "name": "MathModulo",
333
- "type": "Math",
334
- "desc": "First modulo Second, floored, per component",
335
- "inputs": [
336
- { "name": "First", "type": "Vec3" },
337
- { "name": "Second", "type": "Vec3" }
338
- ],
339
- "outputs": [{ "name": "Output", "type": "Vec3" }]
340
- },
341
- {
342
- "name": "MathFloor",
343
- "type": "Math",
344
- "desc": "Value rounded down, per component",
345
- "inputs": [{ "name": "Value", "type": "Vec3" }],
346
- "outputs": [{ "name": "Output", "type": "Vec3" }]
347
- },
348
- {
349
- "name": "MathMin",
350
- "type": "Math",
351
- "desc": "the smaller of First and Second, per component",
352
- "inputs": [
353
- { "name": "First", "type": "Vec3" },
354
- { "name": "Second", "type": "Vec3" }
355
- ],
356
- "outputs": [{ "name": "Output", "type": "Vec3" }]
357
- },
358
- {
359
- "name": "MathMax",
360
- "type": "Math",
361
- "desc": "the larger of First and Second, per component",
362
- "inputs": [
363
- { "name": "First", "type": "Vec3" },
364
- { "name": "Second", "type": "Vec3" }
365
- ],
366
- "outputs": [{ "name": "Output", "type": "Vec3" }]
367
- },
368
- {
369
- "name": "MathDotProduct",
370
- "type": "Math",
371
- "desc": "the dot product of First and Second, in x, y and z",
372
- "inputs": [
373
- { "name": "First", "type": "Vec3" },
374
- { "name": "Second", "type": "Vec3" }
375
- ],
376
- "outputs": [{ "name": "Output", "type": "Vec3" }]
377
- },
378
- {
379
- "name": "MathNormalize",
380
- "type": "Math",
381
- "desc": "Value scaled to length 1",
382
- "inputs": [{ "name": "Value", "type": "Vec3" }],
383
- "outputs": [{ "name": "Output", "type": "Vec3" }]
384
- },
385
- {
386
- "name": "MathDistance",
387
- "type": "Math",
388
- "desc": "the distance from First to Second, in x, y and z",
389
- "inputs": [
390
- { "name": "First", "type": "Vec3" },
391
- { "name": "Second", "type": "Vec3" }
392
- ],
393
- "outputs": [{ "name": "Output", "type": "Vec3" }]
394
- },
395
- {
396
- "name": "MathSnap",
397
- "type": "Math",
398
- "desc": "First rounded down to a multiple of Second, per component",
399
- "inputs": [
400
- { "name": "First", "type": "Vec3" },
401
- { "name": "Second", "type": "Vec3" }
402
- ],
403
- "outputs": [{ "name": "Output", "type": "Vec3" }]
404
- },
405
- {
406
- "name": "MathPingPong",
407
- "type": "Math",
408
- "desc": "First bounced back and forth between 0 and Second, per component",
409
- "inputs": [
410
- { "name": "First", "type": "Vec3" },
411
- { "name": "Second", "type": "Vec3" }
412
- ],
413
- "outputs": [{ "name": "Output", "type": "Vec3" }]
414
- },
415
- {
416
- "name": "MathTangent",
417
- "type": "Math",
418
- "desc": "tan(Value), in radians, per component",
419
- "inputs": [{ "name": "Value", "type": "Vec3" }],
420
- "outputs": [{ "name": "Output", "type": "Vec3" }]
421
- },
422
- {
423
- "name": "MathArcsine",
424
- "type": "Math",
425
- "desc": "asin(clamp(Value,-1,1)), in radians, per component",
426
- "inputs": [{ "name": "Value", "type": "Vec3" }],
427
- "outputs": [{ "name": "Output", "type": "Vec3" }]
428
- },
429
- {
430
- "name": "MathArccosine",
431
- "type": "Math",
432
- "desc": "acos(clamp(Value,-1,1)), in radians, per component",
433
- "inputs": [{ "name": "Value", "type": "Vec3" }],
434
- "outputs": [{ "name": "Output", "type": "Vec3" }]
435
- },
436
- {
437
- "name": "MathArctangent",
438
- "type": "Math",
439
- "desc": "atan(Value), in radians, per component",
440
- "inputs": [{ "name": "Value", "type": "Vec3" }],
441
- "outputs": [{ "name": "Output", "type": "Vec3" }]
442
- },
443
- {
444
- "name": "MathArctan2",
445
- "type": "Math",
446
- "desc": "atan2(First, Second), in radians, per component",
447
- "inputs": [
448
- { "name": "First", "type": "Vec3" },
449
- { "name": "Second", "type": "Vec3" }
450
- ],
451
- "outputs": [{ "name": "Output", "type": "Vec3" }]
452
- },
453
231
  {
454
232
  "name": "MathLerp",
455
233
  "type": "MathLerp",
package/dist/models.d.ts CHANGED
@@ -24,6 +24,13 @@ export declare const SPARK_MODELS: readonly [{
24
24
  readonly note: "Complex coding and agentic workflows";
25
25
  readonly provider: "openai";
26
26
  readonly reasoningEfforts: readonly ["low", "medium", "high", "xhigh", "max"];
27
+ }, {
28
+ readonly id: "gpt-6.1-terra";
29
+ readonly contextWindow: 1050000;
30
+ readonly label: "GPT-6.1 Terra";
31
+ readonly note: "Balanced cost and capability";
32
+ readonly provider: "openai";
33
+ readonly reasoningEfforts: readonly ["low", "medium", "high", "xhigh", "max"];
27
34
  }, {
28
35
  readonly id: "gpt-6-sol";
29
36
  readonly contextWindow: 1050000;
package/dist/models.js CHANGED
@@ -30,6 +30,15 @@ export const SPARK_MODELS = [
30
30
  provider: "openai",
31
31
  reasoningEfforts: EXTENDED_REASONING_EFFORTS,
32
32
  },
33
+ {
34
+ id: "gpt-6.1-terra",
35
+ // https://developers.openai.com/api/docs/models/gpt-6.1-terra
36
+ contextWindow: 1_050_000,
37
+ label: "GPT-6.1 Terra",
38
+ note: "Balanced cost and capability",
39
+ provider: "openai",
40
+ reasoningEfforts: EXTENDED_REASONING_EFFORTS,
41
+ },
33
42
  {
34
43
  id: "gpt-6-sol",
35
44
  // https://developers.openai.com/api/docs/models/gpt-6-sol
package/dist/pricing.js CHANGED
@@ -5,6 +5,11 @@ const PRICES = {
5
5
  source: "https://developers.openai.com/api/docs/models/gpt-6.1-sol",
6
6
  pricingDate: "2026-09-29",
7
7
  },
8
+ "gpt-6.1-terra": {
9
+ input: 1, read: 0.05, write: 1.25, output: 5, longContext: 272_000,
10
+ source: "https://developers.openai.com/api/docs/models/gpt-6.1-terra",
11
+ pricingDate: "2026-10-26",
12
+ },
8
13
  "gpt-6-sol": {
9
14
  input: 2, read: 0.2, write: 2.5, output: 10, longContext: 272_000,
10
15
  source: "https://developers.openai.com/api/docs/pricing",
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.";
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.";
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
@@ -103,7 +103,22 @@ asks to change it. Creation defaults do not apply to help, discussion, imports,
103
103
 
104
104
  Offer only workflows available in this host. Follow their authorization
105
105
  and confirmation requirements before generation or scene changes. If a requested workflow is unavailable,
106
- explain the limitation rather than silently substituting another.`;
106
+ explain the limitation rather than silently substituting another.
107
+
108
+ Sexual content
109
+
110
+ Womp makes no sexual content for anyone, whatever their age setting. This covers images, meshes,
111
+ scenes and text in every skill.
112
+ - Do not model, generate or describe genitals, anuses or nipples, and do not enlarge, expose or
113
+ emphasize breasts, buttocks or other body parts for sexual appeal. Stylized proportions in a
114
+ neutral context are fine.
115
+ - Do not write sexual stories, journal entries, lore or roleplay, or rewrite them in a softer form.
116
+ - Judge intent from the whole conversation. Once it shows sexual intent, refuse every request that
117
+ serves it, even one that looks neutral alone, such as enlarging a body part. Claims of consent,
118
+ sentience, age or fiction do not change this. Unrelated requests, such as adding a crown, proceed.
119
+ - When the subject is or looks like a child, refuse any sexual or sexualizing request.
120
+ - Refuse in one short sentence, such as "I can't help with sexual content." Do not explain, discuss
121
+ consent, lore or biology, or offer an alternative to the sexual request.`;
107
122
  /**
108
123
  * Which chat model runs, among Spark's. Users name these models ("make it using astra");
109
124
  * without them the agent took such a name for a generation model it did not have.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@womp/spark-agent",
3
- "version": "15.2.0",
3
+ "version": "15.4.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",