Repository navigation
images generate: -o downloads the picture, and --aspect names the shape - #78
Merged
Merged
Conversation
A call whose answer links to a file (a `download_url` at its top or in its one item, read from the call's own answer schema) now takes -o: the CLI fetches that link with no key (the link is the credential), writes the bytes, and shows "N bytes → <file>" in the link's place. Only an https link, or http on this machine; a failed download is the call's error, never a file. `images generate --aspect 16:9` is the same as `--aspect-ratio`, as the server's table names it. --help lists both. Co-authored-by: Pointman <noreply@pointman.ai> Co-authored-by: Claude <noreply@anthropic.com>
… or broken answer exits 1 -o with --json used to print the answer and skip the download, and an empty or non-JSON answer exited 0 with nothing written. Now -o and --json together are refused before the call is sent (a draw may cost the person), and an answer with nothing to download fails. Co-authored-by: Pointman <noreply@pointman.ai> Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Pointman <noreply@pointman.ai> Co-authored-by: Claude <noreply@anthropic.com>
jamescalam
marked this pull request as ready for review
November 30, 2026 01:33
PR SecurityPR Security did not run: your free credit is used. A workspace owner or admin can add a card in Usage & billing, then push again. |
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.
spacesheep images generateis the new GenerateImage call (spacesheep-dev/spacesheep#2189). Its answer stages the picture and links to it (image.download_url) rather than carrying the bytes. Until now, the generic door wrote-oonly foranswer_bytesandanswer_folder, so-o hero.jpgwas refused.-ofor a linked file: any call whose answer schema has adownload_url(at the top, or in its one item) takes-o <file>. The CLI fetches the link without the key, since the link is the credential, writes the bytes, and showsN bytes → <file>in the link's place. It fetches only https links, or http on localhost, and doesn't follow redirects. A failed download exits 1 and writes nothing. This also gives-oto the calls that already answer adownload_url(sessions export, session files).--aspect:images generate --aspect 16:9works the same as--aspect-ratio, the name the server's table gives the flag.--helplists both.Tested:
test/doors.test.jscovers the request with--aspect,-owriting the downloaded bytes with no Authorization sent, an http link refused without a fetch, and the help lines. Full suite: 393 pass. The 2 that fail (talk start nudge, launchd unit) fail the same way onmainon this machine.Not checked: a live server. That needs spacesheep-dev/spacesheep#2189 deployed.