ai_env 0.1.0

Detect AI coding agent information from the environment.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::api::{self_id, AiAgent, AiEnvironment};

// Devin (Cognition) — detected via the `/opt/.devin` filesystem marker rather
// than an environment variable
pub fn create_environment() -> AiEnvironment {
    AiEnvironment {
        agent: AiAgent::Devin,
        env_prefix: None,
        id: self_id(),
        sandboxed: false,
        session_id: None,
    }
}