mirror of
https://github.com/Comfy-Org/comfy-typescript-sdk.git
synced 2026-11-04 23:47:27 +00:00
[PR #46] [CLOSED] feat: add getWorkflow() to fetch the graph that produced a job #56
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#56
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/46
Author: @wei-hai
Created: 8/13/2026
Status: ❌ Closed
Base:
main← Head:wei/fetch-job-workflow📝 Commits (2)
66ae9befeat: add job.workflow() to fetch the graph that produced a job6bd601efix: append /workflow when getJobWorkflow is given a job URL📊 Changes
6 files changed (+158 additions, -2 deletions)
View changed files
📝
src/low/index.ts(+2 -0)📝
src/low/transport.test.ts(+36 -0)📝
src/low/transport.ts(+48 -0)📝
src/sdk/jobs.test.ts(+25 -1)📝
src/sdk/jobs.ts(+26 -1)📝
test/support/stub-server.ts(+21 -0)📄 Description
A caller holding a job — including one rehydrated by id — has no way to see the workflow behind it. The SDK holds the graph only when it submitted the job in the same process; otherwise it's gone.
What it returns
Both the graph and the
formatdiscriminator, never just the graph:api— the executed graph. Editor-only constructs (Note nodes, Get/Set) are already resolved away.save— the authoring workflow at the version the job ran, un-mangled. Only for jobs that pin a workflow version; jobs submitted through this SDK today always getapi.Callers must branch on
format— which shape comes back depends on how the job was submitted, not on anything the caller controls.Server side is merged
GET /api/v2/jobs/{id}/workflowlanded in Comfy-Org/cloud#6642, so this now works against a live server.One follow-up, deliberately not done here
The transport call is written by hand, because the vendored spec didn't describe the operation when this was written. The spec-sync PR carrying it is open in this repo — once that merges, this call should move onto the generated client and the hand-written request dropped. A comment in the code marks the spot.
Keeping the two separate so this PR stays reviewable on its own;
spec/openapi.yamlandspec/VERSIONare untouched here and the drift check passes.Naming
Matches the existing
get_download_url/getDownloadUrlprecedent for a network-fetching accessor, and the two SDKs stay in lockstep.🤖 Generated with Claude Code
Summary by CodeRabbit
NotFounderror.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.