mirror of
https://github.com/Comfy-Org/comfy-typescript-sdk.git
synced 2026-11-04 23:47:27 +00:00
[PR #44] [CLOSED] feat: add embedWorkflow to embed the graph in output metadata #54
Labels
No labels
audit:ai-readiness
audit:community
audit:github
audit:health-scoring
audit:policy
audit:release
audit:supply-chain
bug
cursor-review-pin
effort:medium
effort:small
effort:trivial
priority:nice-to-have
priority:recommended
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-typescript-sdk#54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-typescript-sdk/pull/44
Author: @wei-hai
Created: 8/12/2026
Status: ❌ Closed
Base:
main← Head:wei/be-7128-embed-workflow-metadata📝 Commits (1)
998d6eafeat: add embedWorkflow option to embed the API-format graph in output metadata📊 Changes
5 files changed (+169 additions, -8 deletions)
View changed files
📝
README.md(+25 -1)📝
src/sdk/client.test.ts(+64 -0)📝
src/sdk/client.ts(+23 -6)📝
src/sdk/core.test.ts(+27 -0)📝
src/sdk/core.ts(+30 -1)📄 Description
Recovering the workflow from an image it produced isn't possible today, which makes debugging harder. Adds an opt-in flag.
submit()andrun()takeembedWorkflow?: boolean, threaded fromrun()through tosubmit(). When set, the SDK sends the materialized graph asextra_data.extra_pnginfo.workflow, the key local ComfyUI'sSaveImagewrites into output PNG metadata.Behavior
apiKeyand the flag off, the wire format is byte-identical to today: noextra_dataat all, never{}. Existing tests pinning this are untouched.workflow— not the caller's input. A test asserts thecore/ASSETsubstitution actually happened, so it can't pass by embedding the wrong object.Reviewer notes
spec/openapi.yamlis untouched by design (synced one-way). Because of that,core.tscarries a localExtraDatatype extending the generated one. It is temporary — delete it once the spec re-syncs.embed_workflow, producing identical bytes.oxlint,oxfmt,tsc,vitest(161 passed), spec-drift, hygiene, and build all clean.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.