@womp/spark-agent 11.0.0 → 11.1.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,24 @@ 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
|
+
## 11.1.0 — 2026-10-15
|
|
8
|
+
|
|
9
|
+
A flow run can take the conversation's files for its Image and 3D Mesh inputs.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `womp.flowRuns.run({ inputs })` takes `{ artifacts: [ref] }` for an Image (`viewer.images`) or
|
|
14
|
+
3D Mesh (`viewer.meshes`) input that `describe()` lists: 1 to 16 refs from `womp.assets.list`,
|
|
15
|
+
each `{ id, mediaType, name? }` and nothing else. A malformed one is refused before the host is
|
|
16
|
+
called. The host turns each ref into a file of the flow; the flow-runs skill tells the model how,
|
|
17
|
+
and that Text inputs take a string.
|
|
18
|
+
|
|
19
|
+
### Host migration
|
|
20
|
+
|
|
21
|
+
- A `FlowRunsHost.start` may now receive `{ artifacts }` input values. A host that does not
|
|
22
|
+
resolve them should refuse them; crow resolves them through swan's
|
|
23
|
+
`POST /i/agent/thread/:threadId/flow-run/file` and starts the run with `{ flowAssetIds }`.
|
|
24
|
+
|
|
7
25
|
## 11.0.0 — 2026-10-14
|
|
8
26
|
|
|
9
27
|
Mesh Wompify is a skill the agent runs from a chat message, with a goal it sets itself, instead of
|
|
@@ -103,4 +103,6 @@ export type FlowRunsHost = {
|
|
|
103
103
|
};
|
|
104
104
|
export declare const FLOW_RUN_WAIT_MAX_SECONDS = 60;
|
|
105
105
|
export declare const FLOW_RUN_WAIT_DEFAULT_SECONDS = 30;
|
|
106
|
+
/** Most files one Image / 3D Mesh input takes (swan's FLOW_INPUT_FILES_MAX). */
|
|
107
|
+
export declare const FLOW_RUN_INPUT_FILES_MAX = 16;
|
|
106
108
|
export declare function createFlowRunsCapability(host: FlowRunsHost): SparkCapability<WompFlowRunsApi>;
|
|
@@ -7,9 +7,27 @@ const FLOW_RUN_WAIT_INLINE_MAX_SECONDS = 45;
|
|
|
7
7
|
const runId = z
|
|
8
8
|
.string()
|
|
9
9
|
.regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, "Use a runId returned by run().");
|
|
10
|
+
/** Most files one Image / 3D Mesh input takes (swan's FLOW_INPUT_FILES_MAX). */
|
|
11
|
+
export const FLOW_RUN_INPUT_FILES_MAX = 16;
|
|
12
|
+
const artifactRef = z
|
|
13
|
+
.object({ id: z.string().min(1), mediaType: z.string().min(1), name: z.string().optional() })
|
|
14
|
+
.strict();
|
|
15
|
+
/** An Image / 3D Mesh input: the conversation's files, as womp.assets.list returns them. */
|
|
16
|
+
const filesInput = z.object({ artifacts: z.array(artifactRef).min(1).max(FLOW_RUN_INPUT_FILES_MAX) }).strict();
|
|
17
|
+
const inputValue = z.json().superRefine((value, ctx) => {
|
|
18
|
+
if (typeof value !== "object" || value === null || Array.isArray(value) || !("artifacts" in value))
|
|
19
|
+
return;
|
|
20
|
+
const files = filesInput.safeParse(value);
|
|
21
|
+
if (!files.success) {
|
|
22
|
+
ctx.addIssue({
|
|
23
|
+
code: "custom",
|
|
24
|
+
message: `A file input is { artifacts: [ref] }: 1 to ${FLOW_RUN_INPUT_FILES_MAX} refs from womp.assets.list (id, mediaType, name), nothing else.`,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
});
|
|
10
28
|
const runOptions = z
|
|
11
29
|
.object({
|
|
12
|
-
inputs: z.record(z.string().min(1).max(200),
|
|
30
|
+
inputs: z.record(z.string().min(1).max(200), inputValue).optional(),
|
|
13
31
|
copy: z.boolean().optional(),
|
|
14
32
|
deleteCopy: z.boolean().optional(),
|
|
15
33
|
})
|
|
@@ -25,6 +43,7 @@ export function createFlowRunsCapability(host) {
|
|
|
25
43
|
description: "Run the user's saved Flow (AI Nodes) pipeline on their project, follow the run, and report its result.",
|
|
26
44
|
instructions: `Use womp.flowRuns to run the user's saved Flow pipeline. No canvas needs to be open.
|
|
27
45
|
A run operates on the user's real flow: the input values you pass are written into the flow and become its saved values. describe() lists the inputs by node id with their current values, and the output nodes. Pass only input node ids it lists.
|
|
46
|
+
Input values by typeId: base.input.string (a Text node) takes a string, such as a prompt. viewer.images (an Image node) and viewer.meshes (a 3D Mesh node) take files from this conversation: { artifacts: [ref] }, each ref an item's artifact from womp.assets.list (an attachment or a generated output), images for an Image node and 3D models for a 3D Mesh node. Never pass a url or recreate a file's value from describe(); a file the user has not shared here cannot be passed.
|
|
28
47
|
Only one run of a flow can be live. run() starts the run and returns at once. For a short flow, call wait(runId) and then report the result.
|
|
29
48
|
To leave the user's flow untouched, pass copy: true. The run then happens on a new copy of the project, placed in the user's "Flow runs" folder: the input values, outputs and any scene changes land on the copy, and the user's flow, its saved values and its scene are not changed. Use it when the user wants to try values without changing their flow, or when their flow is busy. A copy run does not lock the scene. run() returns the copy's projectUrl; give it to the user so they can open the result.
|
|
30
49
|
To keep only the result of a copy run, also pass deleteCopy: true: the copy is deleted when the run ends, whether it completed, failed or was cancelled. Use it when the user wants the outputs, not the project; do not give them that run's projectUrl, which stops working (status() then returns projectUrl null).
|
|
@@ -41,6 +60,7 @@ While a run is live on this project (not a copy run), womp.scene.access is refus
|
|
|
41
60
|
'const started = await womp.flowRuns.run({ inputs: { "input-node-id": 123 } }); print(await womp.flowRuns.wait(started.runId, 60));',
|
|
42
61
|
'const started = await womp.flowRuns.run({ inputs: { "input-node-id": 123 }, copy: true }); print(started.projectUrl);',
|
|
43
62
|
'const started = await womp.flowRuns.run({ inputs: { "input-node-id": 123 }, copy: true, deleteCopy: true }); print(await womp.flowRuns.wait(started.runId, 60));',
|
|
63
|
+
'const { items } = await womp.assets.list({ kind: "image" }); const started = await womp.flowRuns.run({ inputs: { "image-node-id": { artifacts: [items[0].artifact] }, "text-node-id": "a red ceramic vase" }, copy: true }); print(started);',
|
|
44
64
|
],
|
|
45
65
|
},
|
|
46
66
|
],
|
|
@@ -17,7 +17,7 @@ export function createFlowCapability(host, catalog) {
|
|
|
17
17
|
Read the current graph and flow-graphs-reference before writing. Supply the complete edited s-expression document and the latest revision. Preserve unrelated nodes and stable node IDs. Omitting a node deletes it; empty source clears the graph.
|
|
18
18
|
Existing node configuration, edge identity, layout, runtime metadata, and generated outputs are retained for unchanged node identities/types. Scalar inputs represented in source are replaced by your document. The host retains preservedInputs for those same nodes. Non-private preserved inputs can be explicitly replaced in the document; never recreate asset objects or cached values as JSON strings. Private settings remain editor-owned: preserve existing private connections unchanged between retained nodes and do not introduce new private literals or connections.
|
|
19
19
|
If read returns source null, explain the diagnostics. Do not replace an unreadable graph as though it were empty.
|
|
20
|
-
Build the requested graph from the catalog's nodes even when an input cannot be expressed in source, such as a conversation upload or an editor-owned image: leave that input unconnected and tell the user which node input to set in the editor.
|
|
20
|
+
Build the requested graph from the catalog's nodes even when an input cannot be expressed in source, such as a conversation upload or an editor-owned image: leave that input unconnected and tell the user which node input to set in the editor. An unconnected Image or 3D Mesh node can instead take one of this conversation's files when the flow runs (womp.flowRuns).
|
|
21
21
|
The Flow canvas must be open. If unavailable, tell the user to open Flow or Split in a project, or Nodes in the sidebar, and wait for their next message. Never claim a graph was created after a failed call.
|
|
22
22
|
Writes validate types, preserve the runner lifecycle, and await commit. They edit the graph; they do not report that generation jobs completed. Repair compiler errors in this same conversation with a fresh read. On committed/unknown receipts after failure, inspect the graph before retrying; do not replay blindly.`,
|
|
23
23
|
declarations: WOMP_FLOW_DECLARATIONS,
|