graph LR
BaseEnv["BaseEnv"]
Env["Env"]
SubprocessEnv["SubprocessEnv"]
PyJupyterEnv["PyJupyterEnv"]
AppleScriptEnv["AppleScriptEnv"]
BashEnv["BashEnv"]
Env -- "inherits from" --> BaseEnv
SubprocessEnv -- "inherits from" --> Env
PyJupyterEnv -- "inherits from" --> Env
AppleScriptEnv -- "inherits from" --> Env
BashEnv -- "inherits from" --> Env
Agent -- "interacts with" --> Env
Env -- "implemented by" --> SubprocessEnv
Env -- "implemented by" --> PyJupyterEnv
Env -- "implemented by" --> AppleScriptEnv
Env -- "implemented by" --> BashEnv
The oscopilot.environments subsystem provides a robust and extensible framework for interacting with various execution environments. At its core, BaseEnv establishes the fundamental interface for all environment interactions. Env extends this foundation, defining a higher-level, abstract orchestration layer that agents interact with. Concrete environment implementations such as SubprocessEnv, PyJupyterEnv, AppleScriptEnv, and BashEnv inherit from Env, providing specialized execution capabilities for different operating system contexts and programming environments. This inheritance hierarchy ensures a consistent interface for agents while allowing for diverse underlying execution mechanisms.
Foundational abstract base class establishing the core interface and common properties for all environment interactions. Serves as the root of the environment hierarchy, ensuring a consistent baseline for all environment types.
Related Classes/Methods:
Abstract class extending BaseEnv, defining higher-level orchestration of execution steps within an environment, including methods for stepping through code and handling streaming output. Acts as the primary interface for the agent to interact with any specific environment, with concrete implementations providing the actual execution logic.
Related Classes/Methods:
Concrete implementation for managing generic operating system subprocesses, handling the lifecycle of external processes and output streams. It provides a general-purpose execution environment by implementing the abstract methods defined in Env.
Related Classes/Methods:
Specialized concrete implementation for interacting with Python Jupyter kernels, handling code execution and output capture within that specific environment by implementing the abstract methods defined in Env.
Related Classes/Methods:
Specialized concrete implementation for interacting with AppleScript environments, focusing on code preprocessing for tracking and execution within macOS by implementing the abstract methods defined in Env.
Related Classes/Methods:
Specialized concrete implementation for interacting with Bash shell environments, handling command preprocessing and multiline commands for robust shell interaction by implementing the abstract methods defined in Env.
Related Classes/Methods: