(
shell: InteractiveShell | None = None,
runtime_config: RuntimeConfig | None = None,
tools_config: ToolsConfig | None = None,
)
| 28 | |
| 29 | |
| 30 | def build_terminal_tool( |
| 31 | shell: InteractiveShell | None = None, |
| 32 | runtime_config: RuntimeConfig | None = None, |
| 33 | tools_config: ToolsConfig | None = None, |
| 34 | ) -> ToolSpec: |
| 35 | shell = shell or InteractiveShell( |
| 36 | runtime_config or RuntimeConfig(), |
| 37 | scanner_provider=tools_config.scanner.to_command_provider_config() if tools_config else None, |
| 38 | ) |
| 39 | return ToolSpec( |
| 40 | name="EXECMD", |
| 41 | description=( |
| 42 | "Execute a single command in the configured local or remote shell environment. " |
| 43 | "The final implementation should preserve the shared terminal adapter behavior." |
| 44 | ), |
| 45 | handler=shell.execute_command, |
| 46 | ) |
| 47 | |
| 48 | |
| 49 | def build_html_tool() -> ToolSpec: |
no test coverage detected