Commit graph

9 commits

Author SHA1 Message Date
A
fdc5d5e58b
refactor: extract shared SSH helpers to eliminate ~410 lines of duplication (#429)
Add ssh_run_server, ssh_upload_file, ssh_interactive_session, and
ssh_verify_connectivity to shared/common.sh. These four functions
were copy-pasted identically across 21 cloud provider lib files,
differing only in SSH username (root vs ubuntu).

Providers now set SSH_USER and delegate to the shared helpers via
one-line wrappers, reducing each provider's lib by ~20 lines.

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-11 03:45:18 -08:00
A
de19996360
refactor: extract helpers from create_server() in 4 cloud providers (#423)
Extract wait-for-IP polling loops and JSON body builders from the
largest create_server() functions (ramnode 105->59, netcup 95->50,
cherry 80->57, binarylane 92->70 lines), following the pattern
already established in ionos/lib/common.sh.

Extracted helpers:
- ramnode: _ramnode_build_server_body(), _ramnode_wait_for_ip()
- netcup: _netcup_build_create_body(), _netcup_wait_for_ip()
- cherry: _cherry_wait_for_ip()
- binarylane: _binarylane_wait_for_active()

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-11 02:59:31 -08:00
A
81bab47a74
fix: Escape API keys in continue.sh JSON configs to prevent injection (#374)
Replace vulnerable heredoc patterns across 27 continue.sh scripts with
setup_continue_config() helper that uses json_escape() + upload_config_file()
to safely handle API keys containing special characters like quotes or braces.

Also fix _save_token_to_config() in shared/common.sh which had the same
unescaped heredoc vulnerability for local token storage.

Relates to #104

Agent: security-auditor

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-11 00:13:19 -08:00
A
4c00f3781e
refactor: Reduce complexity in cherry and contabo cloud libraries (#359)
Cherry Servers (cherry/lib/common.sh):
- Replace 59-line ensure_ssh_key with ensure_ssh_key_with_provider (1 line)
- Replace 22-line verify_server_connectivity with generic_ssh_wait (1 line)
- Replace 18-line ensure_cherry_token with ensure_api_token_with_provider (5 lines)
- Replace raw curl calls with cherry_api wrapper using generic_cloud_api
- Use $SSH_OPTS instead of hardcoded SSH options in run_server/upload_file/interactive_session
- Change exit 1 to return 1 for testability and consistency
- Remove unused _cherry_find_key_by_fingerprint helper

Contabo (contabo/lib/common.sh):
- Replace 47-line contabo_api (separate GET/POST/DELETE branches) with
  generic_cloud_api (5-line wrapper, gains automatic retry with backoff)
- Extract 54-line ensure_contabo_credentials into helpers:
  _load_contabo_config, _prompt_contabo_cred, _save_contabo_config
- Fix config save to use json_escape instead of raw variable interpolation
- Add check_python_available and environment variable fast-path

Net: -73 lines, 2 files changed

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 22:49:41 -08:00
A
56778b89e0
feat: Add Continue agent for 7 clouds (Kamatera, Cherry, Oracle, Koyeb, Northflank, Railway, Render) (#314)
Implemented Continue CLI TUI mode on:
- kamatera/continue.sh
- cherry/continue.sh
- oracle/continue.sh
- koyeb/continue.sh
- northflank/continue.sh
- railway/continue.sh
- render/continue.sh

All scripts follow the standard pattern:
1. Source cloud-specific lib/common.sh
2. Authenticate with cloud provider
3. Provision server/container
4. Install Continue CLI via npm
5. Inject OpenRouter API key
6. Create ~/.continue/config.json with OpenRouter provider
7. Launch interactive TUI session with 'cn' command

Agent: gap-filler-3

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 18:00:42 -08:00
A
5ff178fb12
fix: Prevent Python/JSON injection in Cherry Servers lib (#312)
- create_server(): Validate hostname, plan, region env vars with
  validate_resource_name(); pass all values via sys.argv instead of
  string interpolation in Python code
- ensure_ssh_key(): Build SSH key JSON payload with json.dumps via
  sys.argv instead of raw string interpolation (prevents SSH key
  content from breaking JSON)
- _cherry_json_field(), _cherry_find_key_by_fingerprint(): Use
  sys.argv instead of bash variable interpolation in Python strings

Agent: security-auditor

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 18:00:10 -08:00
A
99971bf84c
feat: Add missing Cherry Servers agent scripts for 12 agents (#309)
Creates agent deployment scripts for Cherry Servers that were marked
as "implemented" in manifest.json but were missing the actual script
files, causing 12 test failures in script-syntax.test.ts.

Added scripts: claude, nanoclaw, aider, codex, interpreter, gemini,
amazonq, cline, gptme, opencode, plandex, kilocode

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 17:38:22 -08:00
A
1be86da79f
refactor: extract duplicated JSON parsing helpers in kamatera and cherry providers (#299)
Kamatera: Extract _kamatera_queue_field and _extract_kamatera_wan_ip helpers
to deduplicate inline Python blocks in wait_for_command (49->33 lines) and
get_kamatera_server_ip (49->26 lines).

Cherry: Extract _cherry_json_field, _cherry_find_key_by_fingerprint, and
_cherry_extract_primary_ip helpers to deduplicate inline Python blocks in
ensure_ssh_key (71->53 lines) and create_server.

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 16:14:30 -08:00
A
004aafaca0
feat: Add Cherry Servers cloud provider with openclaw and goose (#286)
Add Cherry Servers as a new cloud provider with:
- REST API-based server provisioning
- SSH key management via API
- Full root access to cloud VPS instances
- Hourly billing with no commitments

Implementation includes:
- cherry/lib/common.sh with Cherry Servers API primitives
- cherry/openclaw.sh for OpenClaw deployment
- cherry/goose.sh for Goose deployment
- cherry/README.md with authentication and usage docs
- manifest.json updates (cloud entry + 14 matrix entries)

Agent: cloud-scout

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
2026-02-10 15:27:23 -08:00