feat: add Sprites integration with exec API improvements#287
Open
feat: add Sprites integration with exec API improvements#287
Conversation
Implement PR #103 feedback to use the Sprites exec API directly instead of tmux-based execution. Key improvements: 1. **Native exec sessions instead of tmux** - Sessions persist after client disconnect - cmd.Wait() blocks until completion (no polling) - No tmux dependency needed on sprite 2. **Direct stdout streaming** - Stream Claude's output to task logs in real-time - Parse output for status changes - No file-tailing hooks needed 3. **Filesystem API for setup** - Use sprite.Filesystem().WriteFile() and MkdirAll() - No shell escaping or heredocs required 4. **Port notifications** - Handle PortNotificationMessage for dev servers - Automatically log proxy URLs when Claude starts servers 5. **Crash recovery foundation** - Track active tasks for graceful shutdown - Idle watcher for automatic checkpointing New files: - cmd/task/sprite.go - CLI commands for sprite management - internal/sprites/sprites.go - Shared token/client logic - internal/executor/executor_sprite.go - SpriteRunner with exec API - docs/sprites-design.md - Architecture documentation - docs/sprites-discussion.md - Design discussion Usage: export SPRITES_TOKEN=<token> # or: task sprite token <token> task # Claude now runs on sprite Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Combines sprite support (cloud execution via Fly.io) with recent main changes: - Settings command - Project colors and claude_config_dir - New task fields (port, scheduled_at, etc.) - Executor improvements (codex, gemini support) - Task distillation - Autocomplete - Command palette Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove unused mu and client fields that were causing golangci-lint failures. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
Replace sprites-go SDK with direct sprite CLI calls to leverage existing fly.io authentication. This simplifies setup since users only need to run 'sprite login' instead of managing separate tokens. Changes: - sprites.go: CLI-based functions for sprite operations - executor_sprite.go: Use CLI for execution with streaming output - sprite.go: Updated commands to use CLI approach - .gitignore: Ignore .sprite local config file Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The sprite needs the API key to run Claude. Pass it through the environment when executing commands on the sprite. Co-Authored-By: Claude Opus 4.5 <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
Implement PR #103 feedback to use the Sprites exec API directly instead of tmux-based execution. This supersedes PR #103 with the improvements suggested in the review comments.
Key Improvements from PR #103 Review
Native exec sessions instead of tmux (PR comment #1)
cmd.Wait()blocks until completion (no 2-second polling)apt-get install tmuxfrom setupDirect stdout streaming (PR comment #3)
Filesystem API for setup (PR comment #4)
sprite.Filesystem().WriteFile()andMkdirAll()Port notifications (PR comment #6)
PortNotificationMessagefor dev serversCrash recovery foundation (PR comment #2)
Network policy documentation (PR comment #5)
New Files
cmd/task/sprite.go- CLI commands for sprite managementinternal/sprites/sprites.go- Shared token/client logicinternal/executor/executor_sprite.go- SpriteRunner with exec APIdocs/sprites-design.md- Architecture documentationdocs/sprites-discussion.md- Design discussionUsage
Test plan
task spritesubcommandsRelated
Supersedes #103 - Implements the exec API improvements suggested in the PR review comments.
🤖 Generated with Claude Code