| 1 | # Code Execution Plugin DOX |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | - Own terminal, Python, and Node.js code execution through persistent local or SSH-backed sessions. |
| 6 | |
| 7 | ## Ownership |
| 8 | |
| 9 | - `tools/` owns the code execution and input tools. |
| 10 | - `helpers/` owns local shell, SSH shell, and TTY session management. |
| 11 | - `prompts/` owns execution prompt and runtime response fragments. |
| 12 | - `default_config.yaml`, `plugin.yaml`, `extensions/`, and `webui/` own settings, metadata, hooks, and UI config. |
| 13 | |
| 14 | ## Local Contracts |
| 15 | |
| 16 | - Keep session concurrency, timeout, streaming, and reset behavior predictable. |
| 17 | - Execute multi-line terminal input as one current-shell compound so intermediate prompts cannot mark queued work complete; preserve `cd`, exports, and other shell state. |
| 18 | - Treat local process exit and SSH channel termination as definitive command completion even when no final prompt is emitted; recreate terminated sessions before their next command. |
| 19 | - Terminal reset/close must not hang on foreground commands or shells that ignore SIGTERM. |
| 20 | - Local and SSH session wrappers must synchronously release their owned process or connection resources when discarded. |
| 21 | - Explicitly target local versus SSH execution runtimes. |
| 22 | - Do not hardcode secrets, SSH credentials, or local user paths. |
| 23 | |
| 24 | ## Work Guidance |
| 25 | |
| 26 | - Preserve long-running command output retrieval and busy-session guards when changing execution flow. |
| 27 | |
| 28 | ## Verification |
| 29 | |
| 30 | - Smoke-test terminal, Python, Node.js, output polling, and reset paths after tool changes. |
| 31 | |
| 32 | ## Child DOX Index |
| 33 | |
| 34 | No child DOX files. |