feat(sprites): make the Fly.io Sprites provider operate correctly - #312
Open
kylemclaren wants to merge 2 commits into
Open
kylemclaren wants to merge 2 commits into
kylemclaren wants to merge 2 commits into
Conversation
- Install the sandbox-agent static binary via the release install script instead of running npx on every service start, and exec it from the managed service with PATH set. - Run install commands over Sprites' HTTP exec endpoint. The WebSocket exec keeps stdin attached, which made `install-agent` hang forever on the adapter's --help probe. - Bump @fly/sprites to ^0.2.2, prefer SPRITES_TOKEN, add install timeouts. - Add docs/deploy/sprites.mdx, sidebar entries, quickstart tab, SDK overview row, README mentions, and align the example with the other providers. Live lifecycle tests (start, reconnect, destroy) pass against api.sprites.dev; sandbox start with Claude installed takes ~23s instead of timing out. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QRAYNtEgB6tqrVfgyumpf4
kylemclaren
force-pushed
the
feat/sprites-provider
branch
from
September 2, 2026 22:13
1a46dfc to
b1688c1
Compare
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
This PR makes the
sandbox-agent/spritesprovider operate correctly with the live Sprites API. It also adds the documentation for the provider.Before this change, the provider did not operate. The sandbox start stopped after 5 minutes with a timeout.
Causes
install-agentthrough the Sprites WebSocket exec. The WebSocket exec keeps stdin open. The installer runs a--helpprobe on the ACP adapter. The probe did not stop while stdin was open. The Sprites HTTP exec does not keep stdin open. With the HTTP exec, the Claude install completes in approximately 7 seconds.npx -y @sandbox-agent/cli@…at each start. This downloaded the CLI at each boot. The other providers use the static binary.Changes
create()step installs the release binary one time with the install script. This takes approximately 4 seconds.PATHand runssandbox-agent serverdirectly.ensureServerstep installs the binary again only if the binary is not found.execFileHTTP.@fly/spritesdependency is now^0.2.2.SPRITES_TOKENfirst. This agrees with the Sprites documentation. The provider also acceptsSPRITES_API_KEYandSPRITE_TOKEN.installTimeoutMsandagentInstallTimeoutMs.docs/deploy/sprites.mdx. New entries in the sidebar, the quickstart, the SDK overview, the README, and the install-version list.Tests
tests/providers.test.ts -t spritesagainst api.sprites.dev. Start, reconnect, and destroy pass. The start takes approximately 23 seconds with Claude installed. Before this change, the start did not complete in 300 seconds.examples/spriteshealth test passes.tests/provider-lifecycle.test.ts: 19 tests pass.ANTHROPIC_API_KEY. This key is not available in my environment.Notes
install-agent codexdoes not complete with the HTTP exec. Thecodex-acp --helpprobe startscodex app-server, and this process does not stop. This is a problem in the agent-management installer. It is not related to Sprites. This PR does not change it.pnpm-lock.yamldiff is large. The committed lockfile was not current with somelatestspecifications. The only intentional change is@fly/sprites.