spawn/modal/lib
A d9da7eac1e
refactor: Reduce complexity in kamatera and modal cloud libraries (#362)
Extract helper functions from the two longest create_server() functions:

kamatera/lib/common.sh (73 -> 21 lines):
- _read_ssh_public_key: reads SSH public key file
- _build_kamatera_init_script: builds cloud-init heredoc
- _submit_and_wait_kamatera_server: API call, command parsing, wait loop

modal/lib/common.sh (67 -> 23 lines):
- _validate_modal_params: validates image name and sandbox name
- _invoke_modal_create: runs Python SDK sandbox creation
- _report_modal_create_error: troubleshooting guidance output

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 23:19:42 -08:00
..
common.sh refactor: Reduce complexity in kamatera and modal cloud libraries (#362) 2026-02-10 23:19:42 -08:00