Commit graph

5 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
ba5cdd8c3c
refactor: extract helpers from create_server() in hetzner and hostinger (#425)
Extract JSON body builders and error handlers from the two largest
remaining create_server() functions (hetzner 84->43, hostinger 76->44
lines), following the pattern established in PR #423.

Extracted helpers:
- hetzner: _hetzner_build_create_body(), _hetzner_check_create_error()
- hostinger: _hostinger_build_create_body(), _hostinger_handle_create_error()

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:19:54 -08:00
A
ccd7ff013a
refactor: reduce complexity by extracting shared interactive_pick() and using ensure_api_token_with_provider() (#411)
- Extract interactive_pick() to shared/common.sh: generic numbered-menu
  picker that replaces 4 duplicate _pick_location/_pick_server_type/_pick_plan
  functions across hetzner and hostinger (156 lines -> 71 lines)
- Replace ensure_fly_token() (53 lines) with ensure_api_token_with_provider()
  plus a flyctl CLI auth pre-check (17 lines)
- Replace ensure_render_api_key() (38 lines + _save_render_api_key 8 lines)
  with ensure_api_token_with_provider() (6 lines)

Net reduction: 156 lines removed across 5 files. No functionality changes.

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-11 01:42:22 -08:00
A
75e3703c55
fix: Validate env var inputs in Hostinger and Contabo create_server (#361)
Hostinger: HOSTINGER_OS_TEMPLATE was interpolated into Python code
without validation, allowing Python code injection via env var.
Added validate_resource_name check.

Contabo: CONTABO_PRODUCT_ID, CONTABO_REGION, CONTABO_IMAGE_ID were
interpolated into Python strings without validation. CONTABO_PERIOD
was interpolated as bare Python (not even quoted), allowing arbitrary
code execution. Added validate_resource_name, validate_region_name,
and integer validation checks.

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 23:18:35 -08:00
A
7b3ad8fa75
feat: Add Hostinger cloud provider with 3 agent implementations (#354)
Add Hostinger VPS hosting as a new cloud provider with REST API
provisioning and cloud-init support. Budget VPS starting at $4.95/mo
with hourly billing.

Implementation:
- hostinger/lib/common.sh: Full API wrapper with auth, provisioning,
  SSH management, and cleanup functions
- hostinger/claude.sh: Claude Code on Hostinger VPS
- hostinger/aider.sh: Aider on Hostinger VPS
- hostinger/openclaw.sh: OpenClaw on Hostinger VPS
- hostinger/README.md: Complete usage documentation

Added to manifest.json:
- New cloud entry with API details and defaults
- 15 matrix entries (hostinger/claude through hostinger/continue)
- 3 implemented, 12 marked as "missing"

Agent: cloud-scout-2

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
2026-02-10 20:42:54 -08:00