Skip to content

*: add testbox remote execution support#1

Open
aayushshah15 wants to merge 1 commit intodevfrom
aayush/testbox-remote-execution
Open

*: add testbox remote execution support#1
aayushshah15 wants to merge 1 commit intodevfrom
aayush/testbox-remote-execution

Conversation

@aayushshah15
Copy link

Summary

  • Adds a testbox parameter to all file/shell tools (read, write, edit, bash, glob, grep, list) that routes execution to remote SSH-accessible CI runners
  • Enforces a two-phase workflow: plan agent runs locally (read-only), build agent requires testbox on every tool call when testbox config is present
  • New testbox/ module handles API-based name resolution (with TTL cache) and SSH transport via ControlMaster multiplexing

Test plan

  • Configure testbox.api in opencode config pointing to a test API
  • Verify plan agent works locally without needing testbox param
  • Verify build agent rejects tool calls missing testbox param when config is present
  • Verify read/write/edit/bash/glob/grep/list all execute remotely via SSH when testbox is specified
  • Verify no behavior change when testbox config is absent

Made with Cursor

When testbox config is present, tool execution follows a two-phase
model tied to the existing plan/build agent architecture. The plan
agent continues to run locally for read-only exploration, while the
build agent requires a `testbox` parameter on every tool call
(read, write, edit, bash, glob, grep, list), routing execution to
an SSH-accessible CI runner with the repo's full environment.

A new `testbox/` module handles resolution and transport. The
`Testbox.resolve()` function calls an external API to map a testbox
name to SSH connection details, caching results with a TTL. The
`SSH` transport layer uses ControlMaster multiplexing and provides
primitives (exec, readFile, writeFile, glob, grep, list) that each
tool delegates to when a connection is present.

                  +------------------+
                  |    LLM Agent     |
                  +--------+---------+
                           |
              +------------+------------+
              |                         |
     +--------v--------+     +---------v---------+
     |   Plan Agent    |     |   Build Agent     |
     |  (read-only)    |     | (testbox required)|
     +--------+--------+     +---------+---------+
              |                         |
     +--------v--------+     +---------v---------+
     | Local Filesystem|     | requireTestbox()  |
     +-----------------+     +---------+---------+
                                       |
                              +--------v--------+
                              | Testbox.resolve  |
                              |  (External API)  |
                              +--------+--------+
                                       |
                              +--------v--------+
                              |  SSH Transport   |
                              | (ControlMaster)  |
                              +--------+--------+
                                       |
                              +--------v--------+
                              |  Testbox (CI)    |
                              |  rg, cat, bash   |
                              +-----------------+

Co-authored-by: Cursor <cursoragent@cursor.com>
@aayushshah15
Copy link
Author

bugbot run

@cursor
Copy link

cursor bot commented Feb 10, 2026

Skipping Bugbot: Bugbot is disabled for this repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments