Skip to content

feat(sprites): make the Fly.io Sprites provider operate correctly - #312

Open
kylemclaren wants to merge 2 commits into
rivet-dev:mainfrom
kylemclaren:feat/sprites-provider
Open

kylemclaren wants to merge 2 commits into
rivet-dev:mainfrom
kylemclaren:feat/sprites-provider

Conversation

@kylemclaren

@kylemclaren kylemclaren commented Sep 2, 2026

Copy link
Copy Markdown

Summary

This PR makes the sandbox-agent/sprites provider 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

  • The provider ran install-agent through the Sprites WebSocket exec. The WebSocket exec keeps stdin open. The installer runs a --help probe 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.
  • The managed service ran npx -y @sandbox-agent/cli@… at each start. This downloaded the CLI at each boot. The other providers use the static binary.

Changes

  • The create() step installs the release binary one time with the install script. This takes approximately 4 seconds.
  • The managed service sets PATH and runs sandbox-agent server directly.
  • The ensureServer step installs the binary again only if the binary is not found.
  • All setup commands use execFileHTTP.
  • The @fly/sprites dependency is now ^0.2.2.
  • The provider reads SPRITES_TOKEN first. This agrees with the Sprites documentation. The provider also accepts SPRITES_API_KEY and SPRITE_TOKEN.
  • New options: installTimeoutMs and agentInstallTimeoutMs.
  • New file: docs/deploy/sprites.mdx. New entries in the sidebar, the quickstart, the SDK overview, the README, and the install-version list.
  • The example now creates a session and sends a prompt. This agrees with the E2B and Daytona examples.
  • The mocked provider tests agree with the new exec path.

Tests

  • tests/providers.test.ts -t sprites against 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.
  • The examples/sprites health test passes.
  • tests/provider-lifecycle.test.ts: 19 tests pass.
  • The SDK typecheck, the example typecheck, and Biome show no errors.
  • The session and prompt tests need ANTHROPIC_API_KEY. This key is not available in my environment.

Notes

  • install-agent codex does not complete with the HTTP exec. The codex-acp --help probe starts codex 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.
  • The pnpm-lock.yaml diff is large. The committed lockfile was not current with some latest specifications. The only intentional change is @fly/sprites.

@kylemclaren kylemclaren changed the title feat(sprites): make Fly.io Sprites provider work end to end feat(sprites): make the Fly.io Sprites provider operate correctly Sep 2, 2026
- 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
kylemclaren force-pushed the feat/sprites-provider branch from 1a46dfc to b1688c1 Compare September 2, 2026 22:13
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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