Repository navigation
feat: draw bare workflow files with agents workflow diagram - #186
Merged
Merged
Conversation
`agents workflow diagram` only read a workflow from an agent config's `workflow` key, so the bare workflow files that the SDKs' Workflow builders export were rejected with "no workflow to draw". A file with top-level `nodes` is now drawn as a workflow by itself; a `workflow` key, when present, still wins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PaulAsjes
marked this pull request as ready for review
November 4, 2026 14:18
PaulAsjes
enabled auto-merge (squash)
November 4, 2026 16:14
kraenhansen
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agents workflow diagramonly found a workflow under an agent config'sworkflowkey. That meant it rejected the bare workflow files the new SDKWorkflowbuilder exports for storing in git, with "no workflow to draw". It now draws those files too, in the terminal or as Mermaid, so a workflow written in code can be checked without wrapping it in an agent config first.Details
workflow_oftreats a file with top-levelnodesas a workflow by itself. If aworkflowkey is present it still wins, even when empty, so agent configs and--allbehave exactly as before.toJSONString()output this reads. The two PRs can merge in either order.Testing
cargo test workflow::diagram: 25 passed, including a new test. It checks that a bare workflow draws the same as the same workflow inside an agent config, that a bare file with no nodes is rejected, and that aworkflowkey is never bypassed.--format asciiand--format mermaid.cargo fmt --checkfails repo-wide only on the generatedcli/elevenlabs/main.rs, which is already unformatted onmain.🤖 Generated with Claude Code