Skip to main content

Module background_process

Module background_process 

Source
Expand description

Background shell processes for long-running commands.

bash with run_in_background: true starts a host process (dev server, file watcher, long test suite) and returns immediately with an id. The bash_output tool returns output produced since the previous read plus the exit status, and bash_kill stops the process. Processes are scoped to the session that started them. The registry belongs to a ToolRegistry, so every process still running is killed when that registry is dropped.

Structs§

BashInputTool
Write to a background process’s stdin: answer prompts, drive a REPL or an interactive CLI started with run_in_background.
BashKillTool
BashOutputTool
ProcessRegistry
Background processes started through one tool registry.

Functions§

session_key
Session key used to scope background processes to the chat that owns them.