From 9ae9e7b0b64f3ce0dae83f10fbc3a5a06bc0c37e Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Tue, 10 Mar 2026 09:18:01 -0400 Subject: [PATCH] Simplify imagegen workflow --- arc/workflows/imagegen/imagegen.dot | 11 ----------- arc/workflows/imagegen/imagegen.toml | 9 --------- .../imagegen/{imagegen-api.dot => workflow.dot} | 2 +- .../imagegen/{imagegen-api.toml => workflow.toml} | 8 +++++--- 4 files changed, 6 insertions(+), 24 deletions(-) delete mode 100644 arc/workflows/imagegen/imagegen.dot delete mode 100644 arc/workflows/imagegen/imagegen.toml rename arc/workflows/imagegen/{imagegen-api.dot => workflow.dot} (65%) rename arc/workflows/imagegen/{imagegen-api.toml => workflow.toml} (67%) diff --git a/arc/workflows/imagegen/imagegen.dot b/arc/workflows/imagegen/imagegen.dot deleted file mode 100644 index 19e85f85b..000000000 --- a/arc/workflows/imagegen/imagegen.dot +++ /dev/null @@ -1,11 +0,0 @@ -digraph ImageGen { - graph [goal="A cute robot painting a landscape"] - rankdir=LR - - start [shape=Mdiamond, label="Start"] - exit [shape=Msquare, label="Exit"] - - generate [label="Generate Image", backend="cli", prompt="Generate an image of: $goal\n\nCraft a detailed, vivid prompt and then call the Gemini image generation API using curl.\nThe GEMINI_API_KEY env var is already set in your environment.\nUse model gemini-2.5-flash-image at endpoint generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent\nPass the key as query param key=... from the env var.\nPOST JSON with contents/parts/text for your prompt and generationConfig responseModalities TEXT and IMAGE.\nExtract the base64 image data from the response using jq, decode with base64 -d, save to generated.png"] - - start -> generate -> exit -} diff --git a/arc/workflows/imagegen/imagegen.toml b/arc/workflows/imagegen/imagegen.toml deleted file mode 100644 index 2d41fd105..000000000 --- a/arc/workflows/imagegen/imagegen.toml +++ /dev/null @@ -1,9 +0,0 @@ -version = 1 -goal = "A cute robot painting a landscape" -graph = "imagegen.dot" - -[sandbox] -provider = "daytona" - -[sandbox.env] -GEMINI_API_KEY = "${env.GEMINI_API_KEY}" diff --git a/arc/workflows/imagegen/imagegen-api.dot b/arc/workflows/imagegen/workflow.dot similarity index 65% rename from arc/workflows/imagegen/imagegen-api.dot rename to arc/workflows/imagegen/workflow.dot index b026c06ef..12f9a2cd2 100644 --- a/arc/workflows/imagegen/imagegen-api.dot +++ b/arc/workflows/imagegen/workflow.dot @@ -5,7 +5,7 @@ digraph ImageGen { start [shape=Mdiamond, label="Start"] exit [shape=Msquare, label="Exit"] - generate [label="Generate Image", prompt="Generate an image of: $goal\n\nRun: imagegen \"$goal\" generated.png\n\nThen verify the file exists with: ls -la generated.png"] + generate [label="Generate Image", prompt="Generate an image of: $goal\n\nRun: mkdir -p output && imagegen \"$goal\" output/generated.png\n\nThen verify the file exists with: ls -la output/generated.png"] start -> generate -> exit } diff --git a/arc/workflows/imagegen/imagegen-api.toml b/arc/workflows/imagegen/workflow.toml similarity index 67% rename from arc/workflows/imagegen/imagegen-api.toml rename to arc/workflows/imagegen/workflow.toml index d8da4fbfb..1ec8b65be 100644 --- a/arc/workflows/imagegen/imagegen-api.toml +++ b/arc/workflows/imagegen/workflow.toml @@ -1,6 +1,5 @@ version = 1 -goal = "A cute robot painting a landscape" -graph = "imagegen-api.dot" +graph = "workflow.dot" [sandbox] provider = "daytona" @@ -8,8 +7,11 @@ provider = "daytona" [sandbox.env] GEMINI_API_KEY = "${env.GEMINI_API_KEY}" +[assets] +include = ["output/**"] + [sandbox.daytona.snapshot] -name = "imagegen-tools-v3" +name = "imagegen-tools-v4" cpu = 4 memory = 8 disk = 10