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.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Merge branch 'o/w2s-w7' into claude/fuobe-parity-4
Claude0751b6deba8a
diff --cc src/components/assist/skills-view.tsxindex 47b62904,97156d30..9871f8b8--- a/src/components/assist/skills-view.tsx+++ b/src/components/assist/skills-view.tsx@@@ -33,11 -33,11 +33,12 @@@ import { SKILL_LIMITS, SKILL_NAME_RE, simport { cn } from "@/lib/utils";import { refusalShown, toastError } from "@/lib/refusals";import { radioKeys } from "@/components/studio/radio-keys";-import { useRecipe, useRecipeActions, useSkill, useSkillActions, useSkills, type RecipeFailure, type SkillForm } from "./hooks";+import { useRecipe, useRecipeActions, useSkill, useSkillActions, useSkills, useStepFixes, type RecipeFailure, type SkillForm } from "./hooks";import { RunSkillDialog } from "./run-skill-dialog";+ import { SkillRuns } from "./skill-runs";import { RailButton } from "./shell";import { SKILL_ICONS, SkillIcon } from "./skill-icon";+import { SkillHistorySection, SuggestFix } from "./skill-upkeep";import { AssistVisitorNote } from "./visitor-note";/**diff --cc src/lib/recipe.tsindex fcd0d4b6,eeecb88e..8eb9029c--- a/src/lib/recipe.ts+++ b/src/lib/recipe.ts@@@ -388,25 -566,49 +567,49 @@@ export const SKILL_CHECK_FEATURE = "ski/** One run of a recipe: a pipeline of generate steps, or one tool call. Values are checked first (checkValues). */export function compile(recipe: Recipe, values: RecipeValues, o: CompileOptions): Compiled {const { steps, checks } = fill(recipe, values);+ const n = steps.length;+ const generate = (s: GenerateStep): CompiledStep => ({+ key: s.key,+ request: {+ ...s.request,+ batchTitle: o.title.slice(0, 200),- skill: { name: o.skill, run: o.run },++ skill: { name: o.skill, run: o.run, step: s.key },+ ...(s.label && { step: { label: s.label, index: steps.indexOf(s), of: n } }),+ ...(o.demo && { demo: true, feature: SKILL_CHECK_FEATURE }),+ },+ ...(s.after !== undefined && { after: s.after }),+ ...(s.chain && { chain: s.chain as ChainSlot[] }),+ });+ if (isStaged(recipe)) {+ const byKey = new Map(steps.map((s) => [s.key, s]));+ const parts = recipeParts(recipe).map((p): CompiledPart => {+ const first = byKey.get(p.keys[0])!;+ if (first.kind === "tool") return { kind: "tool", key: first.key, tool: first.tool, input: first.input, ...(first.label && { label: first.label }), needs: p.needs };+ return { kind: "pipeline", steps: p.keys.map((k) => generate(byKey.get(k) as GenerateStep)), needs: p.needs };+ });+ return { kind: "staged", parts, checks };+ }const tool = steps.find((s): s is ToolStep => s.kind === "tool");if (tool) return { kind: "tool", key: tool.key, tool: tool.tool, input: tool.input, checks };- const n = steps.length;- return {- kind: "pipeline",- checks,- steps: (steps as GenerateStep[]).map((s, i) => ({- key: s.key,- request: {- ...s.request,- batchTitle: o.title.slice(0, 200),- skill: { name: o.skill, run: o.run, step: s.key },- ...(s.label && { step: { label: s.label, index: i, of: n } }),- ...(o.demo && { demo: true, feature: SKILL_CHECK_FEATURE }),- },- ...(s.after !== undefined && { after: s.after }),- ...(s.chain && { chain: s.chain as ChainSlot[] }),- })),- };+ return { kind: "pipeline", checks, steps: (steps as GenerateStep[]).map(generate) };+ }++ /**+ * A part's input with each step reference filled: `pick(key, kind)` gives that step's first output of the kind the+ * field takes (null: any kind); a reference it can't fill throws, naming the step and what was missing.+ */+ export function fillRefs<T>(v: T, pick: (key: string, kind: "image" | "video" | "audio" | null) => string | undefined, tool?: string, path: (string | number)[] = []): T {+ if (typeof v === "string") {+ const key = refKey(v);+ if (!key) return v;+ const kind = fieldKind(path, tool);+ const url = pick(key, kind);+ if (!url) throw new Error(`“${key}” made no ${kind ?? "file"} for the next step`);+ return url as T;+ }+ if (Array.isArray(v)) return v.map((x, i) => fillRefs(x, pick, tool, [...path, i])) as T;+ if (v && typeof v === "object") return Object.fromEntries(Object.entries(v).map(([k, x]) => [k, fillRefs(x, pick, tool, [...path, k])])) as T;+ return v;}// ---------------------------------------------------------------------------diff --cc src/server/generations.tsindex 73f076f4,32af4b87..dd604260--- a/src/server/generations.ts+++ b/src/server/generations.ts@@@ -1005,10 -982,11 +1008,11 @@@ function stampTenant(asked: GenerationR}export function createGenerations(given: GenerationRequest, opts: CreateOptions = {}): Generation[] {- const asked = stampTenant(given, opts);+ // A studio's dry run (src/server/demo-scope.ts): its rows say so, so their waiting steps stay demos too.+ const asked = stampTenant(inDemoScope() && !given.demo ? { ...given, demo: true } : given, opts);// A retired model or operation (a retry, an old script, a saved project) runs on what replaced it, and says so.const moved = currentRequest(asked);- const original = moved.request;+ const original = withFinishOf(moved.request, opts.dependsOn);// Open models make multi-shot films shot by shot, then join the clips. A Fuobe Original is taken on the engine it runs// on (Fuobe DoP's Frames mode is a GPU chain).// A model (or an Original's engine asked for) switched off in Settings → Models & licences is refused here, before adiff --cc src/server/recipes.tsindex 8d0e8826,ca347421..3bb1abbc--- a/src/server/recipes.ts+++ b/src/server/recipes.ts@@@ -24,11 -23,8 +25,12 @@@ importRECIPE_LIMITS,recipeProblems,RecipeSchema,+ isShapeHelper,+ shapeOf,+ shapeOfRecipe,+ OUTPUT_NOT_HANDED_ON,SKILL_CHECK_FEATURE,+ SUGGEST_RULE,today,verifiedLine,type Compiled,@@@ -54,13 -46,14 +58,15 @@@ import { planSteps } from "./assist/stuimport { executeTool, getTool, planFor, validateInput } from "./assist/tools";import { createPipeline } from "./chains";import { llmSeesImages, llmText } from "./enhance";- import { cancelGeneration, createGenerations, currentRequest, getGeneration, previewChained, stampRequests, waitedOnFailure } from "./generations";-import { cancelGeneration, createGenerations, currentRequest, getGeneration, outputKind, previewChained, stampRequests } from "./generations";++import { cancelGeneration, createGenerations, currentRequest, getGeneration, outputKind, previewChained, stampRequests, waitedOnFailure } from "./generations";import { trashGenerations } from "./library";-import { isOffered, modelLicence } from "./model-access";+import { db } from "./db";+import { isOffered, modelLicence, offeredModels } from "./model-access";import { GenerationRequestSchema } from "./request-schema";import { engineMode } from "./settings";-import { createSkill, deleteSkill, getSkill, setSkillFile, skillFile, SkillError } from "./skills";+import { createSkill, deleteSkill, getSkill, listSkills, setSkillFile, skillFile, skillRecipe, SkillError } from "./skills";+ import { runAsDemo } from "./demo-scope";+ import { advanceSkillRun, discardSkillRun, skillRunGenerations, startSkillRun, stopSkillRun } from "./skill-runs";import { absolutePath, readRef, saveFile } from "./storage";/**diff --cc tests/public-signup.test.tsindex bbbe3ee3,c0514278..0796eeaa--- a/tests/public-signup.test.ts+++ b/tests/public-signup.test.ts@@@ -294,15 -289,10 +294,16 @@@ describe("accounts never see or changestoryboards: { lists: [], records: ["/api/storyboards"], changes: [["POST", "/api/storyboards"]] },assist: {lists: ["/api/assist/projects", "/api/assist/memory"],- records: ["/api/assist/t1", "/api/assist/projects/p1"],- changes: [["PATCH", "/api/assist/t1"], ["DELETE", "/api/assist/t1"], ["POST", "/api/assist/projects"], ["POST", "/api/assist/memory"]],+ // A skill's runs that span studios (W7) are the owner's, and so is running a skill.+ records: ["/api/assist/t1", "/api/assist/projects/p1", "/api/assist/skills/s1/runs"],+ changes: [["PATCH", "/api/assist/t1"], ["DELETE", "/api/assist/t1"], ["POST", "/api/assist/projects"], ["POST", "/api/assist/memory"], ["POST", "/api/assist/skills/s1/run"]],},+ // Skills W6: a skill's run history and its fixes are the owner's; so are the suggestions' answers.+ skills: {+ lists: [],+ records: ["/api/assist/skills/s1/history", "/api/assist/skills/s1/fixes"],+ changes: [["POST", "/api/assist/skills/suggestions"], ["POST", "/api/assist/skills/s1/fixes"]],+ },brands: { lists: ["/api/brands", "/api/products"], records: ["/api/brands/b1"], changes: [["POST", "/api/brands"], ["DELETE", "/api/brands/b1"], ["POST", "/api/products"]] },};