interact_with_process
Send input to an active process and receive its response. Ideal for interactive REPLs such as Python, Node.js, or shell sessions.
Instructions
Envía input a un proceso activo y devuelve su respuesta.
Ideal para REPLs interactivos: Python (-i), Node.js (-i), shells, etc. El input se escribe en el stdin del proceso y se espera output nuevo.
Ejemplo de flujo:
start_process('python -i') → PID 1234
interact_with_process(1234, 'import pandas as pd')
interact_with_process(1234, 'df = pd.read_csv("datos.csv")')
interact_with_process(1234, 'print(df.describe())')
kill_process(1234)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | PID del proceso (obtenido de start_process). | |
| input_text | Yes | Texto a enviar al stdin del proceso. Se añade \n automáticamente si no lo tiene. | |
| timeout_seconds | No | Segundos esperando respuesta tras enviar input. Default 8. | |
| max_lines | No | Máximo de líneas de respuesta a devolver. Default 200. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |