mirror of
https://github.com/Comfy-Org/comfy-typescript-sdk.git
synced 2026-11-04 23:47:27 +00:00
[PR #16] [MERGED] feat: output.getDownloadUrl() + SDK User-Agent identification #27
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#27
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/16
Author: @wei-hai
Created: 7/23/2026
Status: ✅ Merged
Merged: 7/23/2026
Merged by: @wei-hai
Base:
main← Head:feat/output-get-download-url📝 Commits (4)
1ae77a9feat: output.getDownloadUrl() + SDK User-Agent identification005b499harden: reject CR/LF in clientInfo to prevent header injectiond4a547cfix: release response body on getAssetContentUrl no-download paths; guard SDK_VERSION driftf8869b4Merge branch 'main' into feat/output-get-download-url📊 Changes
8 files changed (+289 additions, -3 deletions)
View changed files
📝
README.md(+5 -0)📝
src/low/index.ts(+1 -0)📝
src/low/transport.test.ts(+89 -0)📝
src/low/transport.ts(+121 -1)📝
src/sdk/client.ts(+4 -0)📝
src/sdk/outputs.test.ts(+36 -2)📝
src/sdk/outputs.ts(+14 -0)📝
test/support/stub-server.ts(+19 -0)📄 Description
What
Output.getDownloadUrl(): Promise<{ url, expiresAt }>— a directly-fetchable URL for an output, so a caller (e.g. a Cloudflare/serverless worker) can hand the URL to a downstream consumer without streaming the bytes through itself.Location) + its expiry.expiresAt: null.User-Agenton every request:comfy-sdk-typescript/{version} (node {version}), with an optionalclientInfoappendingapp/{name}. Request metadata, not telemetry.How
New
getAssetContentUrl()fetchesGET /assets/{id}/contentwithredirect: "manual"(the existinggetAssetContentstill usesfollow), reads theLocationwithout following it (bearer can't leak cross-origin), and parses GCS V4X-Goog-Date/X-Goog-Expiresfor the expiry.Tests
vitest run --coverage— 128 passed (incl. cloud-redirect, self-hosted-inline, multi-output-distinct-URLs, bearer-not-leaked, User-Agent +clientInfo).tsc+oxlint+oxfmtclean. Not added toOPERATION_IDS(a second low method over the same operation, not a new operationId).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.