Commit graph

4 commits

Author SHA1 Message Date
A
bbbe815035
refactor: Security fixes, complexity reduction, and UX improvements (#58)
Security:
- Fix command injection in modal/lib/common.sh (run_server, upload_file, interactive_session)
- Fix command injection in fly/lib/common.sh (run_server, upload_file, interactive_session)
- All container providers now use printf '%q' for proper shell escaping

Complexity:
- Extract _api_should_retry_on_error() helper in shared/common.sh (-19 lines)
- Refactor scaleway_api and upcloud_api to use shared retry helper (-24 lines)
- Extract _save_fly_token() helper in fly/lib/common.sh (-11 lines)
- Extract validateAndGetAgent() in commands.ts, reducing cmdRun/cmdAgentInfo duplication
- Refactor cmdList column width calculation to use calculateColumnWidth()

UX:
- Add actionable next steps to error messages in shared/common.sh
- Improve CLI bash fallback error messages with guidance (spawn.sh)
- Add OAuth progress indicator during browser authentication wait
- Show invalid model ID value and link to openrouter.ai/models
- Add troubleshooting steps for agent installation failures

Tests:
- Update test assertions in test/run.sh to match refactored patterns
- All tests passing: 74 TypeScript + 75 bash = 149 total, 0 failures

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 17:09:27 -08:00
L
0708ff1700
fix: Use robust OpenCode install method across all clouds (#48)
The upstream OpenCode installer pipes `curl -# -L | tar xz` which fails
in container exec environments (Sprite, E2B, Modal, Daytona) where the
binary stream gets corrupted through the exec layer, producing
"gzip: stdin: not in gzip format" errors.

Added opencode_install_cmd() to shared/common.sh that downloads the
binary to a file first, then extracts it. Updated all 17 opencode.sh
scripts to use this robust method instead of the upstream installer.

The previous fix (#44) only addressed Sprite with a hardcoded
linux-x86_64 architecture. This fix detects OS/arch dynamically and
applies to all cloud providers.

Fixes #42

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 23:02:18 -08:00
Sprite
8f37ce3649 refactor: Automated improvements from cycle 1
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 06:02:07 +00:00
L
2364458f36
Add RunPod GPU cloud provider (#39)
* Add RunPod GPU cloud provider with all 13 agent scripts

- runpod/lib/common.sh: GraphQL API wrapper, pod creation/termination,
  SSH connectivity (direct TCP or proxy via ssh.runpod.io)
- 13 agent scripts: claude, openclaw, nanoclaw, aider, goose, codex,
  interpreter, gemini, amazonq, cline, gptme, opencode, plandex
- runpod/README.md with usage docs and environment variable reference
- manifest.json: RunPod cloud entry + all matrix entries as implemented

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add UpCloud cloud provider with all 13 agent scripts

- upcloud/lib/common.sh: UpCloud API wrapper with Basic Auth, server
  provisioning, SSH connectivity, base tool installation
- 13 agent scripts: claude, openclaw, nanoclaw, aider, goose, codex,
  interpreter, gemini, amazonq, cline, gptme, opencode, plandex
- upcloud/README.md with usage docs and env var reference
- manifest.json updated with UpCloud cloud entry and 13 matrix entries

UpCloud uses HTTP Basic Auth (username:password) instead of Bearer tokens.
Servers are provisioned via POST /1.3/server with SSH keys injected via
login_user. Ubuntu template UUID is dynamically resolved from the API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 21:43:10 -08:00