| 1 | <html> |
| 2 | <head> |
| 3 | <title>Code Execution</title> |
| 4 | </head> |
| 5 | |
| 6 | <body> |
| 7 | <div x-data> |
| 8 | <template x-if="config"> |
| 9 | <div> |
| 10 | <div class="section-title">Code Execution</div> |
| 11 | <div class="section-description"> |
| 12 | Configuration for the code execution tool. Controls the shell interface, SSH credentials, execution timeouts, and prompt/dialog detection patterns. |
| 13 | </div> |
| 14 | |
| 15 | <!-- Shell Interface --> |
| 16 | <div class="field"> |
| 17 | <div class="field-label"> |
| 18 | <div class="field-title">Shell Interface</div> |
| 19 | <div class="field-description"> |
| 20 | <b>Auto</b>: SSH when running outside Docker, local TTY when dockerized. |
| 21 | <b>SSH</b>: always connect via SSH. <b>Local</b>: always use local PTY. |
| 22 | </div> |
| 23 | </div> |
| 24 | <div class="field-control"> |
| 25 | <select x-model="config.ssh_enabled"> |
| 26 | <option value="auto">Auto</option> |
| 27 | <option value="true">SSH</option> |
| 28 | <option value="false">Local TTY</option> |
| 29 | </select> |
| 30 | </div> |
| 31 | </div> |
| 32 | |
| 33 | <!-- SSH credentials (shown when SSH or Auto) --> |
| 34 | <template x-if="config.ssh_enabled !== 'false'"> |
| 35 | <div> |
| 36 | <div class="field"> |
| 37 | <div class="field-label"> |
| 38 | <div class="field-title">SSH Address</div> |
| 39 | <div class="field-description">Hostname or IP of the SSH target. Leave empty to use the RFC URL from settings.</div> |
| 40 | </div> |
| 41 | <div class="field-control"> |
| 42 | <input type="text" x-model="config.ssh_addr" placeholder="(from RFC URL)" /> |
| 43 | </div> |
| 44 | </div> |
| 45 | |
| 46 | <div class="field"> |
| 47 | <div class="field-label"> |
| 48 | <div class="field-title">SSH Port</div> |
| 49 | <div class="field-description">SSH port on the target host (default: 55022 for Docker RFC).</div> |
| 50 | </div> |
| 51 | <div class="field-control"> |
| 52 | <input type="number" min="1" max="65535" x-model.number="config.ssh_port" /> |
| 53 | </div> |
| 54 | </div> |
| 55 | |
| 56 | <div class="field"> |
| 57 | <div class="field-label"> |
| 58 | <div class="field-title">SSH User</div> |
| 59 | <div class="field-description">Username for SSH login.</div> |
| 60 | </div> |
| 61 | <div class="field-control"> |
| 62 | <input type="text" x-model="config.ssh_user" placeholder="root" /> |
| 63 | </div> |
| 64 | </div> |
| 65 | |
| 66 | <div class="field"> |
| 67 | <div class="field-label"> |
| 68 | <div class="field-title">SSH Password</div> |
| 69 | <div class="field-description">Password for SSH login. Leave empty to use the dev root password (via RFC).</div> |
| 70 | </div> |
| 71 | <div class="field-control"> |
| 72 | <input type="password" autocomplete="off" x-model="config.ssh_pass" placeholder="(from RFC)" /> |
| 73 | </div> |
| 74 | </div> |
| 75 | </div> |
| 76 | </template> |
| 77 | |
| 78 | <!-- Execution timeouts --> |
| 79 | <div class="section-title">Execution Timeouts</div> |
| 80 | <div class="section-description"> |
| 81 | Timeouts (in seconds) for python, nodejs, and terminal runtimes. |
| 82 | </div> |
| 83 | |
| 84 | <div class="field"> |
| 85 | <div class="field-label"> |
| 86 | <div class="field-title">First output timeout</div> |
| 87 | <div class="field-description">Seconds to wait for the first output before returning control to the agent.</div> |
| 88 | </div> |
| 89 | <div class="field-control"> |
| 90 | <input type="number" min="1" x-model.number="config.code_exec_first_output_timeout" /> |
| 91 | </div> |
| 92 | </div> |
| 93 | |
| 94 | <div class="field"> |
| 95 | <div class="field-label"> |
| 96 | <div class="field-title">Between output timeout</div> |
| 97 | <div class="field-description">Seconds to wait between output chunks before returning control.</div> |
| 98 | </div> |
| 99 | <div class="field-control"> |
| 100 | <input type="number" min="1" x-model.number="config.code_exec_between_output_timeout" /> |
| 101 | </div> |
| 102 | </div> |
| 103 | |
| 104 | <div class="field"> |
| 105 | <div class="field-label"> |
| 106 | <div class="field-title">Max execution timeout</div> |
| 107 | <div class="field-description">Hard cap on total execution time in seconds.</div> |
| 108 | </div> |
| 109 | <div class="field-control"> |
| 110 | <input type="number" min="1" x-model.number="config.code_exec_max_exec_timeout" /> |
| 111 | </div> |
| 112 | </div> |
| 113 | |
| 114 | <div class="field"> |
| 115 | <div class="field-label"> |
| 116 | <div class="field-title">Dialog detection timeout</div> |
| 117 | <div class="field-description">Seconds of idle output before checking for dialog prompts.</div> |
| 118 | </div> |
| 119 | <div class="field-control"> |
| 120 | <input type="number" min="1" x-model.number="config.code_exec_dialog_timeout" /> |
| 121 | </div> |
| 122 | </div> |
| 123 | |
| 124 | <!-- Output runtime timeouts --> |
| 125 | <div class="section-title">Output Runtime Timeouts</div> |
| 126 | <div class="section-description"> |
| 127 | Timeouts (in seconds) for the "output" runtime (waiting for long-running processes). |
| 128 | </div> |
| 129 | |
| 130 | <div class="field"> |
| 131 | <div class="field-label"> |
| 132 | <div class="field-title">First output timeout</div> |
| 133 | <div class="field-description">Seconds to wait for the first output.</div> |
| 134 | </div> |
| 135 | <div class="field-control"> |
| 136 | <input type="number" min="1" x-model.number="config.output_first_output_timeout" /> |
| 137 | </div> |
| 138 | </div> |
| 139 | |
| 140 | <div class="field"> |
| 141 | <div class="field-label"> |
| 142 | <div class="field-title">Between output timeout</div> |
| 143 | <div class="field-description">Seconds to wait between output chunks.</div> |
| 144 | </div> |
| 145 | <div class="field-control"> |
| 146 | <input type="number" min="1" x-model.number="config.output_between_output_timeout" /> |
| 147 | </div> |
| 148 | </div> |
| 149 | |
| 150 | <div class="field"> |
| 151 | <div class="field-label"> |
| 152 | <div class="field-title">Max execution timeout</div> |
| 153 | <div class="field-description">Hard cap on total wait time in seconds.</div> |
| 154 | </div> |
| 155 | <div class="field-control"> |
| 156 | <input type="number" min="1" x-model.number="config.output_max_exec_timeout" /> |
| 157 | </div> |
| 158 | </div> |
| 159 | |
| 160 | <div class="field"> |
| 161 | <div class="field-label"> |
| 162 | <div class="field-title">Dialog detection timeout</div> |
| 163 | <div class="field-description">Seconds of idle output before checking for dialog prompts.</div> |
| 164 | </div> |
| 165 | <div class="field-control"> |
| 166 | <input type="number" min="1" x-model.number="config.output_dialog_timeout" /> |
| 167 | </div> |
| 168 | </div> |
| 169 | |
| 170 | <!-- Patterns --> |
| 171 | <div class="section-title">Detection Patterns</div> |
| 172 | <div class="section-description"> |
| 173 | Regular expressions used to detect shell prompts and interactive dialogs. One pattern per line. |
| 174 | </div> |
| 175 | |
| 176 | <div class="field"> |
| 177 | <div class="field-label"> |
| 178 | <div class="field-title">Prompt patterns</div> |
| 179 | <div class="field-description"> |
| 180 | When any pattern matches the last output lines, execution is considered complete and output is returned immediately. |
| 181 | </div> |
| 182 | </div> |
| 183 | <div class="field-control"> |
| 184 | <textarea rows="5" x-model="config.prompt_patterns"></textarea> |
| 185 | </div> |
| 186 | </div> |
| 187 | |
| 188 | <div class="field"> |
| 189 | <div class="field-label"> |
| 190 | <div class="field-title">Dialog patterns</div> |
| 191 | <div class="field-description"> |
| 192 | When any pattern matches after the dialog timeout, control is returned to the agent to handle the interactive prompt. |
| 193 | </div> |
| 194 | </div> |
| 195 | <div class="field-control"> |
| 196 | <textarea rows="4" x-model="config.dialog_patterns"></textarea> |
| 197 | </div> |
| 198 | </div> |
| 199 | </div> |
| 200 | </template> |
| 201 | </div> |
| 202 | </body> |
| 203 | |
| 204 | </html> |