Commit graph

201 commits

Author SHA1 Message Date
Sprite
0295df0bf0 fix: Install to ~/.local/bin (in PATH) instead of ~/.bun/bin
~/.bun/bin is often NOT in PATH, causing 'command not found' after
install. Now picks the first dir already in PATH from:
  1. ~/.local/bin (most universal)
  2. $(bun pm bin -g)
  3. ~/.bun/bin
  4. ~/bin

Also consolidated PATH detection and instructions into shared helpers,
with clear shell-specific instructions when the dir isn't in PATH.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 00:45:18 +00:00
Sprite
d92bf66f51 fix: Install spawn binary directly instead of using bun link
bun link only registers packages for project-level linking — it does
not create global CLI binaries. bun install -g has the same issue.

New approach:
- bun: build cli.js, copy directly to $(bun pm bin -g)/spawn (55KB)
- npm: build with esbuild, copy to $(npm bin -g)/spawn
- Both methods put the binary exactly where the runtime expects it

Also replaced brittle hardcoded file downloads with git sparse-checkout
(with GitHub API fallback), so new source files never break the installer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 00:37:55 +00:00
Sprite
c7981d626e fix: Replace hardcoded file list with dynamic clone in installer
The install script had a hardcoded list of source files to download,
which broke whenever a new file was added (e.g., security.ts). Also,
openrouter.ai/lab/spawn served a stale cached version without the fix.

Now uses git sparse-checkout (fast, gets only cli/) with a GitHub API
fallback for environments without git. Adding new source files will
never break the installer again.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 00:12:22 +00:00
Sprite
57cf080c39 chore: Run refactor workflow every 30 minutes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 00:09:04 +00:00
Sprite
863cfbe711 fix: Add missing security.ts to CLI installer downloads
commands.ts imports ./security.js but install.sh never downloaded
security.ts, causing build to fail with "Could not resolve" error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 00:07:58 +00:00
Sprite
7410c8ee4f fix: Build cli.js before linking in install script
package.json bin points to cli.js, but it was never built during
installation. Both bun link and npm install -g failed silently because
the file didn't exist.

- Bun path: run `bun run build` before `bun link`
- npm path: use npx esbuild to bundle cli.js with node shebang

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 23:50:19 +00:00
Sprite
66221dac80 fix: Use duration=0s to fire-and-forget on start service API
The Sprite start service API returns streaming NDJSON, causing curl -f
to fail with exit code 22. Use duration=0s to return immediately and
drop -f flag since the response is streaming.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 23:40:50 +00:00
Sprite
b7b102a352 fix: Remove curl timeout on trigger workflows
Sprite may take time to wake from pause, causing --max-time 30 to fail
with exit code 22.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 21:33:03 +00:00
Sprite
5b71562633 refactor: Remove TRIGGER_SECRET, auth now handled by Sprite API
- Remove TRIGGER_SECRET from trigger-server.ts and start-improve.sh
- Auth is handled at the Sprite API level via SPRITE_TOKEN
- Update SKILL.md: remove secret generation step, fix step numbering,
  update embedded code and verification examples

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 21:08:27 +00:00
Sprite
38ffd7ebd6 feat: Update trigger workflows to use Sprite start service API
- Replace SPRITE_URL/SPRITE_SECRET pattern with SPRITE_NAME/SERVICE_NAME
- Use Sprite start service API endpoint (api.sprites.dev)
- Share SPRITE_TOKEN across all services
- Update skill documentation to reflect new approach
- Delete deprecated URL/SECRET based secrets

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 20:29:19 +00:00
Sprite
3dec61336b docs: Clarify setup-trigger-service runs inside Sprite
- Add note that skill is designed to run inside Sprite VM
- Update secret setup instructions for in-Sprite usage
- Add Prerequisites section
- Add troubleshooting for new concurrency limit error
- Improve guidance for obtaining Sprite URL

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 20:13:24 +00:00
LAB
fe9f6f013a
test: Add command logic tests and refactor for testability (#56)
- Extract pure functions from commands.ts to commands-logic.ts
- Add 34 comprehensive tests for command logic functions
- Enable better test coverage through dependency injection pattern
- All tests passing (74 pass, 11 skip, 0 fail)

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 12:02:43 -08:00
LAB
298065f4ad
UX: Improve error messages, help text, and progress indicators (#55)
Enhance the spawn CLI user experience with actionable error messages,
comprehensive help documentation, and visual progress feedback.

Changes:
- Help text: Add AUTHENTICATION, TROUBLESHOOTING, and MORE INFO sections
- Error messages: Show examples of valid options when validation fails
- Progress indicators: Add spinners for script downloads
- Install flow: Provide clear alternatives when npm install requires sudo
- README: Add environment variable documentation and alternative install URL
- Security errors: Suggest workarounds for false positives

All error messages now follow the pattern:
1. What went wrong
2. Why it matters
3. What to do next

Documentation: .docs/UX_IMPROVEMENTS_20260208.md

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 12:00:59 -08:00
LAB
d76c8dba0f
Security: fix critical command injection vulnerabilities in container providers (#54)
* refactor: Simplify API call retry logic in generic_cloud_api

Extract duplicated retry handling into focused helper functions:
- handle_api_network_error(): Handles curl errors with retry logic
- handle_api_transient_error(): Handles 429/503 HTTP errors
- _call_cloud_api(): Internal curl wrapper separating concerns

Reduces cyclomatic complexity of generic_cloud_api from 9 to 3.
Lines reduced from 89 to 54 (40% reduction).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* Security: fix critical command injection vulnerabilities in container providers

CRITICAL SECURITY FIX - Command injection vulnerabilities

Fixed command injection in bash -c calls across all container/sandbox providers.
These functions were passing commands directly to bash -c without proper escaping,
allowing potential remote code execution via crafted inputs.

Files fixed:
- sprite/lib/common.sh: run_sprite(), upload_file_sprite()
- e2b/lib/common.sh: run_server(), upload_file(), interactive_session()
- daytona/lib/common.sh: run_server(), upload_file(), interactive_session()
- railway/lib/common.sh: run_server(), upload_file(), interactive_session()

Fix: Use printf %q to properly escape all command arguments before passing to bash -c.
This prevents command injection while maintaining functionality.

Severity: CRITICAL (CVSS 9.8)
Impact: Remote code execution, full system compromise
Mitigation: Proper shell escaping using printf %q

All modified files pass bash -n syntax validation.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 12:00:43 -08:00
Sprite
286609c1ed feat: Add concurrency limits to trigger workflows
Add max 3 concurrent run limits:
- GitHub Actions: concurrency groups prevent workflow queue buildup
- trigger-server: tracks concurrent runs, rejects with 429 if at max
- Configurable via MAX_CONCURRENT env var (defaults to 3)
- Returns running count and max in trigger response

This prevents resource exhaustion when workflows trigger frequently.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 19:34:52 +00:00
Sprite
bdf4e08cc7 feat: Increase improve workflow frequency to every 30 minutes
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 19:30:36 +00:00
L
2ad38d6321
Update README with ALPHA software disclaimer
Added a disclaimer about the software being in ALPHA stage.
2026-02-08 11:26:00 -08:00
Sprite
1ea8218e3e refactor: Move trigger service scripts into skill directory
Reorganize setup-trigger-service skill to be self-contained:
- Move trigger-server.ts, improve.sh, refactor.sh into skill directory
- Update SKILL.md to reference skill directory paths
- Update .gitignore to ignore start-*.sh wrapper scripts in skill dir
- Add guidance for creating new service scripts in the skill directory

This makes the skill fully self-contained and establishes a clear
pattern for adding new automation services.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 18:50:27 +00:00
Sprite
4ba682434a fix: Correct PostToolUse hook structure in settings.json
The hook configuration had two issues:
- Invalid "dangerouslySkipPermissions" setting (not supported)
- Wrong PostToolUse hook format (missing "hooks" array with "type" field)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 18:46:49 +00:00
Sprite
ed137190da feat: Add setup-trigger-service skill for Claude Code
Reusable skill (/setup-trigger-service) that guides setting up:
- Bun-based HTTP trigger server on a Sprite
- GitHub Actions workflow for cron/event/manual triggers
- Secret generation and GitHub secrets configuration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 18:32:00 +00:00
L
4a05b32897
Add GitHub Actions triggers for Sprite services (#53)
* refactor: Automated improvements

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* chore: Remove __pycache__ and add to .gitignore

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

---------

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 10:29:18 -08:00
Sprite
3ae83aa867 fix: Fix 4 failing claude.sh tests
Root causes:
- `clear` command fails with exit 1 when TERM is not set (test env has
  no terminal), crashing the script due to set -e. Guard with || true.
- Test patterns for Claude settings/state uploads used old temp file
  naming convention (/tmp/claude_settings, /tmp/claude_global) that no
  longer matches the paths generated by upload_config_file +
  upload_file_sprite (/tmp/*settings.json, /tmp/*.claude.json).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 18:26:53 +00:00
L
b25626850a Improve README with better intro, how-it-works, and dev guide (#51)
- Add compelling tagline with stats (13 agents, 18 clouds, 234 combinations)
- Add "How it works" section explaining the script architecture
- Add project structure overview and contribution quick-start
- Remove internal `spawn improve` from public command table
- Clean up formatting and tighten copy
- Add Apache 2.0 LICENSE file

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 18:16:46 +00:00
L
803f9de9bf
Enforce PR merge-or-close-with-comment policy (#50)
PRs created by autonomous loops must always be either merged or
closed with a comment explaining why. Updates improve.sh, refactor.sh,
and CLAUDE.md to enforce this consistently.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 23:12:51 -08:00
L
46e4c71f5a
docs: Update README.md matrix with all 18 clouds and 13 agents (#49)
Add RunPod, UpCloud, BinaryLane, Genesis Cloud columns and Plandex row.
Matrix is now 13 agents x 18 clouds = 234/234 implemented.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 23:05:32 -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
L
a668f03b70
Add Genesis Cloud scripts for amazonq, cline, gptme, opencode, plandex (#47)
Implement 5 Genesis Cloud agent deployment scripts:
- amazonq.sh: Amazon Q CLI with OpenRouter integration
- cline.sh: Cline with OpenRouter integration
- gptme.sh: gptme with model selection and OpenRouter integration
- opencode.sh: OpenCode with OpenRouter integration
- plandex.sh: Plandex with installation verification and OpenRouter integration

Also adds Genesis Cloud README.md and updates manifest.json
to mark all 5 entries as implemented.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 23:02:04 -08:00
L
7d754ebc02
feat: Add Genesis Cloud agent scripts (batch 1) (#46)
Add 4 Genesis Cloud agent deployment scripts:
- claude.sh: Claude Code with OpenRouter proxy config
- openclaw.sh: OpenClaw with gateway + TUI
- aider.sh: Aider with model selection
- plandex.sh: Plandex CLI

All scripts follow the standard pattern: source lib/common.sh,
authenticate, provision instance, install agent, inject OpenRouter
credentials, and launch interactive session.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 23:01:16 -08:00
L
1538e97465
Add 5 Genesis Cloud agent scripts: nanoclaw, goose, codex, interpreter, gemini (#45)
Implement Genesis Cloud deployment scripts for NanoClaw, Goose, Codex CLI,
Open Interpreter, and Gemini CLI. Each script follows the standard pattern:
authenticate, provision instance, install agent, inject OpenRouter credentials,
and launch interactive session.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 22:58:43 -08:00
L
68483e194b
Fix OpenCode install on Sprite (closes #42) (#44)
The upstream install script (curl|bash) fails inside Sprite sandboxes
because the nested curl|tar pipeline receives non-gzip content. Replace
with direct binary download from GitHub releases which is more reliable
in sandboxed/piped execution contexts.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 22:57:12 -08:00
L
9b1d5ad1a0
Fix BinaryLane manifest: mark 10 existing scripts as implemented (#43)
* Fix BinaryLane manifest: mark 10 existing agent scripts as implemented

The scripts for openclaw, nanoclaw, aider, codex, interpreter, gemini,
amazonq, cline, gptme, and opencode already exist but were marked as
"missing" in manifest.json. Updated to "implemented" and moved them
to the Implemented section in README.

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

* Remove run-improve.sh wrapper script

No longer needed — improve.sh handles pulling latest main itself.

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 22:54:25 -08:00
Sprite
6c751cdd0a refactor: Update refactor.sh with issue fix workflow
- Issue triager now follows strict: branch -> fix -> PR -> merge -> close
- PRs must reference issue with "Fixes #NUMBER"
- Issues are closed with comment linking to merged PR
- No dangling issues or unmerged PRs allowed
- Prompt written to temp file to avoid shell escaping issues

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 06:51:15 +00:00
Sprite
7fa158b33b Pull latest main before running improve loop 2026-02-08 06:07:16 +00:00
Sprite
b2a233ba77 Add Genesis Cloud GPU provider 2026-02-08 06:02:48 +00: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
Sprite
2c7ed48560 feat: Add continuous refactoring service and GitHub issue templates
- Add refactor.sh: Continuous service that spawns Claude Code agent teams
- Team roles: security-auditor, ux-engineer, complexity-hunter, test-engineer, issue-triager
- Focus on security, UX, complexity reduction, testing, and GitHub issue response
- Add GitHub issue template for bug reports (focused on error logs)
- Auto-triages and responds to issues within 1 hour

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 05:53:31 +00:00
L
a760831d8c
Add BinaryLane regional cloud provider (#40)
Implements BinaryLane Australian cloud provider with claude, goose, and plandex agents.

**BinaryLane features:**
- Simple REST API (api.binarylane.com.au/v2/*)
- Hourly billing prorated from monthly rates
- 4 Australian regions (Sydney, Perth, Brisbane, Melbourne)
- Standard VPS sizes starting at std-1vcpu (1vCPU, 2GB RAM)
- SSH key support built-in
- Bearer token authentication

**Implementation:**
- binarylane/lib/common.sh - Provider API functions
- binarylane/claude.sh - Claude Code agent
- binarylane/goose.sh - Goose agent
- binarylane/plandex.sh - Plandex agent
- binarylane/README.md - Usage documentation
- manifest.json - Added cloud entry + 13 matrix entries (3 implemented, 10 missing)

All scripts follow curl|bash compatibility pattern with local-or-remote fallback for sourcing.
Tested with bash -n syntax checker on all .sh files.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 21:51:02 -08:00
Sprite
73e2adfa98 Require README.md matrix update after every change
The team prompt now includes a mandatory step to regenerate the
matrix table in README.md after each PR, with a python3 one-liner
that reads manifest.json and outputs the markdown table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 05:45:54 +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
L
7f956b8d8e
Add Plandex coding agent with 14 cloud implementations (#36)
Plandex is an open source AI coding agent for complex tasks (15k+ GitHub
stars, multiple HN frontpage posts). It natively supports OpenRouter via
OPENROUTER_API_KEY environment variable and installs via a single curl
command. Go-based CLI with sandbox and version control for AI changes.

Implemented on all 14 clouds: sprite, hetzner, digitalocean, vultr,
linode, lambda, aws-lightsail, gcp, e2b, modal, fly, civo, scaleway,
daytona.

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-07 21:35:04 -08:00
Sprite
85c3d92946 docs: Remove TESTING_NON_INTERACTIVE.md and add documentation policy
- Remove testing documentation file per documentation policy
- Add rule to CLAUDE.md: docs must go in .docs/ directory (git-ignored)
- Only README.md, CLAUDE.md, and cloud READMEs allowed in repo

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 05:30:21 +00:00
Sprite
484e15a355 docs: Remove SECURITY_AUDIT.md - documentation should not be in repo
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08 05:28:06 +00:00
Sprite
9b4cde1a7a Enforce PR workflow and branch cleanup in improve.sh
- Team prompt now requires: branch → PR → merge → delete for every change
- cleanup_between_cycles() runs between loops: deletes merged branches, syncs main
- Every cycle starts with git checkout main && git pull to avoid stale data
- Explicit NEVER rules: no direct main pushes, no hanging branches

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 05:26:50 +00:00
L
c09e714cc7
Add non-interactive mode for agent execution (#35)
* refactor: extract shared test helpers and utilities

Created centralized test-helpers.ts module to eliminate duplication across test files:

**Extracted Helpers:**
- createMockManifest() - Reusable mock manifest data
- createEmptyManifest() - Empty manifest for edge cases
- createConsoleMocks() - Console spy setup
- createProcessExitMock() - Process exit mock
- restoreMocks() - Mock cleanup utility
- mockSuccessfulFetch() - Simplified successful fetch mock
- mockFailedFetch() - Simplified failed fetch mock
- mockFetchWithStatus() - Fetch mock with custom status
- setupTestEnvironment() - Test directory and env setup
- teardownTestEnvironment() - Cleanup utility

**Deduplication Impact:**
- commands.test.ts: Removed 50+ lines of duplicate mock setup
- manifest.test.ts: Removed 80+ lines of duplicate manifest data and setup code
- integration.test.ts: Removed 40+ lines of duplicate setup/teardown

**Benefits:**
- Single source of truth for test fixtures
- Consistent mock patterns across all tests
- Easier maintenance - changes to test setup in one place
- Improved test readability

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* refactor: Add non-interactive mode for agent execution

Implements --prompt and --prompt-file flags to enable non-interactive
agent execution. This allows users to:

- Execute agents with a prompt and exit automatically
- Use spawn in CI/CD pipelines and automation scripts
- Pass prompts via command line or file

Changes:
- TypeScript CLI: Parse --prompt/-p and --prompt-file flags
- Security: Add validatePrompt() to prevent command injection
- Commands: Pass prompt via SPAWN_PROMPT env var to bash scripts
- Bash scripts: Detect SPAWN_PROMPT and fork interactive/non-interactive
- Help text: Document new flags with examples

Implementation:
- claude.sh: Use 'claude -p' for non-interactive execution
- aider.sh: Use 'aider -m' for non-interactive execution
- shared/common.sh: Add execute_agent_non_interactive() helper

Security:
- Validates prompts for command injection patterns
- Length limit: 10KB max
- Blocks $(), backticks, piping to bash/sh
- Uses printf %q for proper shell escaping

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* docs: Add testing guide for non-interactive mode

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Sprite <noreply@sprite.dev>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-07 21:20:34 -08:00
Sprite
580424189a Update README matrix: add Civo, Scaleway, Daytona clouds and OpenCode agent
The matrix table was missing 3 clouds (Civo, Scaleway, Daytona) and
1 agent (OpenCode) that are all fully implemented across the board.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 05:19:29 +00:00
Sprite
e3dcad797d Add Daytona cloud provider with all 12 agent scripts
Daytona is a sandbox platform (daytona.io) with sub-90ms creation and
true SSH support. Uses CLI-based approach similar to E2B: daytona create,
daytona exec, daytona ssh for interactive sessions.

- daytona/lib/common.sh: provider library with auth, create, exec, upload
  (base64-over-exec), interactive (daytona ssh), destroy
- 12 agent scripts: claude, openclaw, nanoclaw, aider, goose, codex,
  interpreter, gemini, amazonq, cline, gptme, opencode
- manifest.json: cloud entry + 12 matrix entries
- README: Daytona column added to matrix table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 05:18:38 +00:00
Sprite
392c9b3d66 Add homepage links to agent names in matrix table
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 05:13:37 +00:00
Sprite
8302cafbd7 Remove stale tests and fix echo -e in test harness
Remove tests for deleted nc_listen and create_oauth_response_html
functions. Replace echo -e with printf for macOS bash 3.x compat.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 05:13:37 +00:00
Sprite
bb397d0bc6 Fix config file paths and missing OPENROUTER_API_KEY env check
The refactor in f9dd9a7 hardcoded /root/ as the upload destination for
Claude Code and OpenClaw config files, breaking all non-root providers
(Lambda, AWS Lightsail, GCP, Sprite, E2B, Modal, Fly). Upload to /tmp/
first then mv to ~/ via run_callback so the remote shell expands ~ to
the correct home directory.

Also add OPENROUTER_API_KEY env var check to sprite scripts (claude,
openclaw, nanoclaw) so the OAuth flow is skipped when the key is already
set, and fix echo -e to printf for macOS bash 3.x compat.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-08 05:13:37 +00:00
Sprite
2f78a77c44 Add Civo gptme agent script 2026-02-08 05:13:37 +00:00