Skip to content

fix(export): support sprite spawns (drop sprite-console exclusion)#3382

Merged
la14-1 merged 1 commit intoOpenRouterTeam:mainfrom
AhmedTMM:fix-export-sprite-runner
May 2, 2026
Merged

fix(export): support sprite spawns (drop sprite-console exclusion)#3382
la14-1 merged 1 commit intoOpenRouterTeam:mainfrom
AhmedTMM:fix-export-sprite-runner

Conversation

@AhmedTMM
Copy link
Copy Markdown
Collaborator

@AhmedTMM AhmedTMM commented May 2, 2026

Summary

`spawn export` was hiding sprite spawns from the picker. Sprite-console connections were filtered out on the assumption they weren't reachable, but sprite has its own exec channel — they are reachable, the export just wasn't wired to use it.

Repro: `spawn export` with multiple claude spawns. Sprite ones missing. Hetzner/DO ones show.

What changed

  • `exportableClaudeRecords` no longer drops `ip === "sprite-console"` records.
  • New `buildRunnerForRecord` branches on `record.cloud`:
    • sprite → uses `sprite.runSprite` / `uploadFileSprite` / `downloadFileSprite`
    • everything else → `makeSshRunner` with the connection's ip/user
  • `sprite/sprite.ts` gains `setSpriteName(name)` so the export flow can point the module at an existing sprite by name. The runner functions key off the module's `_state.name`, which previously only got set inside `createSprite()` — fine for fresh provisioning, useless for reconnect-style flows.

Bumps CLI `1.0.32` → `1.0.33`.

Test plan

  • `bun test` — 2166 pass / 4 pre-existing fails (cmdrun pipeline, hetzner createServer, DO OAuth — same as upstream/main)
  • `bunx @biomejs/biome check src/` — clean
  • 32 export tests pass; the previous "filters out sprite-console" assertion is replaced with one that confirms sprite records pass the filter and reach the runner
  • Manual: from a host with both a hetzner spawn and a sprite spawn, run `spawn export` → confirm both show in the picker
  • Manual: select the sprite spawn → confirm the export script runs via `sprite exec` and produces a github repo

🤖 Generated with Claude Code

The export filter was excluding records with ip === "sprite-console" on
the assumption they weren't reachable. Sprite has its own exec channel
(sprite exec / sprite cp), so they ARE reachable — we just weren't
wiring it up.

- exportableClaudeRecords no longer drops sprite-console records.
- New buildRunnerForRecord() branches on record.cloud:
    sprite -> sprite.runSprite / uploadFileSprite / downloadFileSprite
    else   -> makeSshRunner with the connection's ip/user
- sprite/sprite.ts gains setSpriteName(name) so the export flow can
  point the sprite module at an existing sprite by name (the runner
  functions key off the module's _state.name, which previously was
  only set during the createSprite() flow).

Bumps CLI 1.0.32 -> 1.0.33.
@AhmedTMM AhmedTMM marked this pull request as ready for review May 2, 2026 07:08
Copy link
Copy Markdown
Member

@la14-1 la14-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean follow-up to #3377. Sprite filter removal + dedicated runner branch is the right call, regex-validated setSpriteName is safely injection-proof, tests updated to assert the new behaviour. All CI green. Approving.

@la14-1 la14-1 merged commit 46bbeea into OpenRouterTeam:main May 2, 2026
6 checks passed
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.

2 participants