Skip to content

images generate: -o downloads the picture, and --aspect names the shape - #78

Merged
jamescalam merged 3 commits into
mainfrom
skill-401/images-out
Nov 30, 2026
Merged

jamescalam merged 3 commits into
mainfrom
skill-401/images-out

Conversation

@jamescalam

Copy link
Copy Markdown
Contributor

spacesheep images generate is 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 -o only for answer_bytes and answer_folder, so -o hero.jpg was refused.

  • -o for a linked file: any call whose answer schema has a download_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 shows N 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 -o to the calls that already answer a download_url (sessions export, session files).
  • --aspect: images generate --aspect 16:9 works the same as --aspect-ratio, the name the server's table gives the flag. --help lists both.

Tested: test/doors.test.js covers the request with --aspect, -o writing 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 on main on this machine.

Not checked: a live server. That needs spacesheep-dev/spacesheep#2189 deployed.

jamescalam and others added 3 commits November 29, 2026 22:06
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
jamescalam marked this pull request as ready for review November 30, 2026 01:33
@jamescalam
jamescalam merged commit c59e104 into main Nov 30, 2026
5 checks passed
@0-security

0-security Bot commented Nov 30, 2026

Copy link
Copy Markdown

PR Security

PR Security did not run: your free credit is used. A workspace owner or admin can add a card in Usage & billing, then push again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant