Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Skills: the docs say a single studio step is priced only, and studio steps beside others test-run as demos

Claude9a1b384933a1
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index 59e0190e..c0d44323 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -467,7 +467,7 @@ Round 5 part 1 (Work2Skill W1 and W2; plan in `docs/research/work2skill-7.md`).
- **The format** (`src/lib/recipe.ts`, pure and browser-safe; `RecipeSchema`, `fuobeRecipe: 1`). Typed inputs (`params`: image, video, audio, text, number, choice or @element; at most 12) and either a graph of `generate` steps (each a `GenerationRequest` with `after` and `chain`, exactly as `createPipeline` takes them; at most 24) or one `tool` step (a gated Assist tool such as `dub_video` or `add_captions`, alone). A string that is exactly `"{{id}}"` takes the input with its type; `{{id}}` inside a longer string inserts its text. Optional `checks` per step (kind, count, aspect, seconds, sound, and a `look` sentence for a model that sees images) and `verified` per engine (the day the plan check, the dry run and the real test passed, and `catalog`, a hash of each step's model, operation, route and price table). Server-set fields (`SERVER_FIELDS`: `skill`, `demo`, `asked`, `chainFilled`…) are stripped from a recipe's requests. `recipeProblems` refuses at save time, never at run time: unknown or unused placeholders, duplicate ids and keys, a tool step that isn't alone, a graph `createPipeline` would refuse, a count that varies on a step others wait for, and inputs whose default, example or options don't fit their type.
- **Fill and compile.** `fill` puts the values in (defaults for what isn't given). `compile` turns one run into the filled requests of one `createPipeline`, each stamped with `skill {name, run}` and the skill's title as `batchTitle` (a dry run adds `demo: true` and the hidden feature `skill-check`), or into one tool call. `checkValues` validates a row and `parseRows` a pasted or uploaded CSV / TSV (up to 50 rows), the same in the browser and on the server. `recipeMarkdown` writes the "Run it" section (inputs, steps, the equivalent `generate` or studio-tool call; at most 20,000 characters) that `load_skill`, the chat context and MCP prompts add to a recipe skill.
- **Runs on the server** (`src/server/recipes.ts`; routes under `src/app/api/assist/skills/[name]/` with `src/server/recipe-routes.ts`). `compileRun` sends every filled request through the API's own `GenerationRequestSchema` and puts a dual-engine Original on the run's engine. Fuobe never moves a step to the other engine: `recipeEngines` is the engines every step allows under Settings → Engine mode. `estimateRecipe` prices one run or many with `planSteps` / `planFor`, as Assist's approval card does. `runRecipe` starts one `createPipeline` per row, or one `executeTool` call per row whose rows `stampRequests` (`generations.ts`) stamps afterwards. A run is refused with 409 until the plan check has passed on that engine, or while the skill is switched off; a CSV with a header and no rows is a 422.
-- **Checks** (`verifyRecipe`, `POST …/verify`). `plan`: each step planned and priced as it would start; when every refusal is only a provider to connect (`onlyConnect`: messages that start "Connect"), the same run on the demo route stands in, with a note. `demo` (the default): the plan check, then a free dry run on the mock provider whatever Settings → Demo mode says (`request.demo`; at most 120 s per engine; small stand-in files for media inputs with no example), whose hidden rows go to the Trash; a Run doesn't wait for it. `real` (API only, needs `confirm: true`, holds the request up to 15 minutes): the examples on the user's keys, outputs checked by their structure (`probeMedia`) and the look judged only by a model that sees images (`llmSeesImages`; on the GPU only Ollama, never paid Claude). Tool steps get the plan check only. `needsRecheck` asks for a check again when a step's model was retired (`REPLACED_BY`) or switched off, or the plan hash changed. A check that finds the recipe changed while it ran refuses with 409 and keeps the edit. An uploaded `recipe.json` loses its `verified` dates, and the .zip download (`?format=zip`) never carries this install's checks; examples and source stay out unless `&examples=1`.
+- **Checks** (`verifyRecipe`, `POST …/verify`). `plan`: each step planned and priced as it would start; when every refusal is only a provider to connect (`onlyConnect`: messages that start "Connect"), the same run on the demo route stands in, with a note. `demo` (the default): the plan check, then a free dry run on the mock provider whatever Settings → Demo mode says (`request.demo`; at most 120 s per engine; small stand-in files for media inputs with no example), whose hidden rows go to the Trash; a Run doesn't wait for it. `real` (API only, needs `confirm: true`, holds the request up to 15 minutes): the examples on the user's keys, outputs checked by their structure (`probeMedia`) and the look judged only by a model that sees images (`llmSeesImages`; on the GPU only Ollama, never paid Claude). A studio tool step on its own gets the plan check only; in a recipe that runs in stages (`isStaged`) the dry run is `stagedDryRun` (`src/server/skill-runs.ts`): every step on the demo provider, its studio steps inside `runAsDemo` (`src/server/demo-scope.ts`), then the studio records they made are deleted and their rows go to the Trash. `needsRecheck` asks for a check again when a step's model was retired (`REPLACED_BY`) or switched off, or the plan hash changed. A check that finds the recipe changed while it ran refuses with 409 and keeps the edit. An uploaded `recipe.json` loses its `verified` dates, and the .zip download (`?format=zip`) never carries this install's checks; examples and source stay out unless `&examples=1`.
- **Making a skill from results** (W2; `src/server/recipe-builder.ts`, `src/lib/recipe-builder.ts`, `src/components/skills/*`). `draftFromGenerations` walks the picked results back through `depends_on` and chain slots to the exact requests that made them. Results handed on by hand in the composer (Edit, Animate) are linked by matching file URLs (`linkByFile`); a stack that ran as one job per result becomes one step (`jobsOf`); an expansion comes back as the request it was asked as (`GenerationRequest.asked`; older ones are told apart by step labels and refused with `STEPS_REFUSAL`); a retired model moves to its replacement (`currentRequest`); and Translate & dub, Katana and Captions are lifted to their Assist tools (`dub_video`, `katana`, `add_captions`). Other studios that plan their own steps are refused by name (`STUDIOS`, `notSupported`). Every input starts Fixed. The review screen marks what varies (media, @elements, whole prompts, words picked in a prompt, and the takes, shape, length and quality), and `buildRecipe` and `skillBody` write the recipe and SKILL.md live. `POST /api/assist/skills/draft` returns the draft and the refusals; `/draft/check` runs the plan check and the dry run on an unsaved recipe (kept in memory by recipe hash, `draftKey`: 200 entries for 6 hours, so a restart loses a passed dry run); `/draft/name` is an optional naming pass by Claude or Ollama; `/draft/save` checks the plan again and saves, with 409 for a taken name and 422 for a failing plan. "draft" is a reserved skill name; a user skill already called that would have its GET, PATCH and DELETE routes shadowed by the POST-only draft route (read from the routing, not tested, and nothing renames it). A skill made from demo results says so in its Run form (`DEMO_NOTE`, `source.demo`) until a real test passes.
- **UI.** A recipe skill's card on the Skills page shows "Runs by itself", and its dialog shows where it was checked or why it needs a re-check (`skills-view.tsx`). The Run form (`run-skill-dialog.tsx`, `/assist/skills?run=<name>`) builds its fields from the inputs, offers only engines whose check passed, prices live, lists the steps (`plan-jobs.tsx`) and has a Many tab for CSV rows. ⌘K lists "Run <skill>…" (`skillEntries` in `src/lib/command-search.ts`). "Make a skill from this…" is in every finished result's ⋯ menu and "Make a skill" in the Library's selection bar; `SkillBuilderProvider` wraps the frame in `StudioChrome` (`nav/studio-chrome.tsx`), so the viewer opened from ⌘K or a job notification has it too, and loads the review screen on first open.
- **Checked** in demo mode only: unit and API tests (`recipe`, `recipes`, `recipe-builder`) with Demo mode off and no keys, and the browser checks `skills-run` and `skills-builder`. No skill has run with a paid key or on a GPU, the naming pass and look judging have not met a live Claude or Ollama vision model, the three lifts are tested as drafts only, and the real check level has no button. The text agents read (the "Run it" section, a built skill's SKILL.md) mentions a `run_skill` MCP tool that comes with W3 and doesn't exist yet.
diff --git a/skills/README.md b/skills/README.md
index e4ae3365..4585e709 100644
--- a/skills/README.md
+++ b/skills/README.md
@@ -64,9 +64,10 @@ The easiest way to write one is not to: **Make a skill from this…** on a resul
in the Library, builds the recipe from the steps behind your results, and you pick which inputs change.
A recipe runs on an engine only after a free **Test run** has passed there: Fuobe plans and prices
-every step. The test run also runs it once with placeholder results (a studio step runs as a demo too,
-and what it opened is deleted after), so nothing runs for real and nothing is spent; a run doesn't wait
-for that part. A retired, switched-off or repriced model asks for a new test run (**Test again**). Fuobe
+every step. The test run also runs it once with placeholder results (not for a studio tool step on its
+own, which is priced only; beside other steps a studio step runs as a demo too, and what it opened is
+deleted after), so nothing runs for real and nothing is spent; a run doesn't wait for that part. A
+retired, switched-off or repriced model asks for a new test run (**Test again**). Fuobe
writes the `verified` dates itself: an uploaded `recipe.json` loses them and starts unchecked, and a
downloaded `.zip` leaves out this install's checks (and, unless you ask, the examples and where the
recipe came from). The built-in skills here carry no recipe and can't be checked: duplicate one