@womp/spark-agent 15.4.0 → 15.5.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 +23 -0
- package/dist/capabilities/asset-imports.d.ts +2 -10
- package/dist/capabilities/asset-imports.js +7 -11
- package/dist/generated/asset-import-declarations.d.ts +1 -1
- package/dist/generated/asset-import-declarations.js +1 -1
- package/dist/intent-bench-cases.d.ts +0 -2
- package/dist/intent-bench-cases.js +2 -2
- package/dist/intent-bench.d.ts +0 -2
- package/dist/intent-bench.js +1 -4
- package/dist/prompt.d.ts +1 -1
- package/dist/prompt.js +5 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,29 @@ 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.5.0 — 2026-10-27
|
|
8
|
+
|
|
9
|
+
An import question the user leaves unanswered now always adds the mesh to the scene, and Spark no
|
|
10
|
+
longer decides that itself (SW-009, SW-011).
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- `importMesh` no longer takes `ifNoAnswer`, and rejects it. Hosts that time out the import
|
|
15
|
+
question import with the question's default settings on expiry and return `unanswered: true`.
|
|
16
|
+
Before, the model chose `"import"` or `"skip"`, an omitted field meant skip, and in a new project
|
|
17
|
+
it often chose skip because Womp's starter shapes looked like existing work, so users came back to
|
|
18
|
+
a generated model that was never placed. crow-backend's deadline is now about a minute. The
|
|
19
|
+
`asset-import` skill is version 10.
|
|
20
|
+
- Spark calls `importMesh` only for a mesh the user asked for, including one it generated for a
|
|
21
|
+
request to make something 3D. A model that is only Spark's suggestion, such as an extra part, an
|
|
22
|
+
alternative or a variant, is offered in the reply and imported once the user says yes.
|
|
23
|
+
- intent-bench: `IntentCase.expectIfNoAnswer` is gone.
|
|
24
|
+
|
|
25
|
+
### Migration
|
|
26
|
+
|
|
27
|
+
- Hosts: stop reading `MeshImportRequest.ifNoAnswer`; on an unanswered question, import with the
|
|
28
|
+
default settings and set `unanswered: true` on the result.
|
|
29
|
+
|
|
7
30
|
## 15.4.0 — 2026-10-27
|
|
8
31
|
|
|
9
32
|
### 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
|
|
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: "
|
|
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
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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"
|
|
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(
|
|
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 WOMP_ASSET_IMPORT_DECLARATIONS = "declare const womp: { assets: {\nimportMesh: ((request: {\nkey: string;\nsource: { id: string; mediaType: string; name?: string; };\ndestination: \"scene\" | \"library\";\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}
|
|
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"],
|
|
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"],
|
|
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
|
{
|
package/dist/intent-bench.d.ts
CHANGED
|
@@ -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;
|
package/dist/intent-bench.js
CHANGED
|
@@ -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
|
|
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
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|