mirror of
https://github.com/Comfy-Org/comfy-typescript-sdk.git
synced 2026-11-04 23:47:27 +00:00
[PR #49] [MERGED] chore: sync the v2 spec and wire every operation it declares #59
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#59
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/49
Author: @wei-hai
Created: 8/13/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @wei-hai
Base:
main← Head:wei/sync-v2-spec-complete📝 Commits (7)
66ae9befeat: add job.workflow() to fetch the graph that produced a jobcee17dechore: sync vendored Comfy API v2 spec from cloud@7c65b1a6bd601efix: append /workflow when getJobWorkflow is given a job URL01552f0feat: add asset deletion2ac8008chore: regenerate the low layer for the synced spec09cc227Merge remote-tracking branch 'origin/wei/fetch-job-workflow' into wei/sync-v2-spec-completef3479ddMerge remote-tracking branch 'origin/wei/asset-delete' into wei/sync-v2-spec-complete📊 Changes
12 files changed (+586 additions, -31 deletions)
View changed files
📝
spec/openapi.yaml(+136 -18)📝
src/low/generated/index.ts(+1 -1)📝
src/low/generated/types.gen.ts(+131 -3)📝
src/low/generated/zod.gen.ts(+42 -5)📝
src/low/index.ts(+2 -0)📝
src/low/transport.test.ts(+59 -0)📝
src/low/transport.ts(+55 -1)📝
src/sdk/assets.test.ts(+29 -1)📝
src/sdk/assets.ts(+19 -0)📝
src/sdk/jobs.test.ts(+25 -1)📝
src/sdk/jobs.ts(+26 -1)📝
test/support/stub-server.ts(+61 -0)📄 Description
Brings the vendored Comfy API v2 spec up to date and leaves CI green, which the automated sync PR can't do alone:
spec-coverage.test.tsassertsOPERATION_IDSmatches the spec exactly, so a sync that introduces operations without wrappers always fails.The synced spec introduces two:
getJobWorkflowanddeleteAsset. Both are implemented here.What's in it
cloud@7c65b1a), plus the regenerated low layergetJobWorkflow—Job.getWorkflow()returns the graph and aformatdiscriminator (save= the authoring workflow at the version the job ran;api= the executed graph). Callers must branch on it — which shape comes back depends on how the job was submitteddeleteAsset—Asset.delete()andassets.delete(id), mirroring the Python SDKOPERATION_IDS/OPERATION_METHODSand moved onto the generated types, so no hand-rolled request survivesOne fix worth a look
getJobWorkfloworiginally reused the "id or URL" pattern fromgetJob/cancelJob/getJobEvents, treating a URL input as the final target. That's right for those three — each receives a pre-built link. ButJobUrlsdeclares onlyself,eventsandcancel; there's noworkflowlink, so a URL passed here is the job's own address and still needs/workflowappended. Previously, passingjob.urls.selfsilently fetched the job and mistyped it as a workflow result withworkflow/formatundefined.jobBasePath()now normalizes both input forms, with tests for the relative and absolute cases — which had no coverage.Verification
lint, format, typecheck, spec-drift, hygiene and build all clean; 167/167 tests pass, including all four
spec-coverageassertions — honestly, not by exclusion. All 11 spec operations have real methods onComfyLow.prototype.Supersedes the automated sync PR and the two feature branches it folds in.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.