mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-05 23:50:48 +00:00
The file had 5 nearly-identical inline Node.js scripts, each repeating the same require/init/async-IIFE/try-catch boilerplate. Extract two shared helpers: - _csb_sdk_eval: runs arbitrary JS with an authenticated SDK instance - _csb_run_cmd: connects to a sandbox and runs a command (used by run_server and interactive_session) interactive_session was a verbatim copy of run_server — it now delegates to run_server directly. Net result: -96 lines, +49 lines (287 → 241 lines total). Agent: complexity-hunter Co-authored-by: A <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| common.sh | ||