Skip to content

Latest commit

 

History

History
83 lines (47 loc) · 4.5 KB

File metadata and controls

83 lines (47 loc) · 4.5 KB
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
Loading

CodeBoardingDemoContact

Details

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.

BaseEnv

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:

Env

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:

SubprocessEnv

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:

PyJupyterEnv

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:

AppleScriptEnv

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:

BashEnv

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: