agent

package
v0.70.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detected

func Detected() bool

Detected returns true if the process is running inside an AI agent environment. GR_AGENT_MODE=0/false/no always takes priority, even after the first call.

The environment-based detection is computed once, lazily, on the first call and cached — a CLI process's environment does not change at runtime, so this matches the previous package-init behaviour without a package-level init.

func DetectedEnviron added in v0.70.0

func DetectedEnviron(environ []string) bool

DetectedEnviron applies the same canonical agent-mode rules to an explicit environment snapshot. Lifecycle code uses this instead of maintaining a second, inevitably divergent list of agent markers.

func ScrubSecurityBoundaryEnvironment added in v0.70.2

func ScrubSecurityBoundaryEnvironment(environ []string) []string

ScrubSecurityBoundaryEnvironment removes caller-owned agent/session markers before starting a long-lived Graith daemon. The daemon must not inherit a session identity and then classify its own startup housekeeping as an agent lifecycle mutation.

func SecurityBoundaryDetectedEnviron added in v0.70.0

func SecurityBoundaryDetectedEnviron(environ []string) bool

SecurityBoundaryDetectedEnviron detects agent and Graith-session callers for trust-boundary decisions. Unlike DetectedEnviron, a negative GR_AGENT_MODE presentation override cannot hide concrete session or external-agent markers from a security check.

Types

This section is empty.

Directories

Path Synopsis
Package transcript reads an AI coding agent's on-disk conversation transcript and renders it to a neutral, agent-agnostic Markdown document.
Package transcript reads an AI coding agent's on-disk conversation transcript and renders it to a neutral, agent-agnostic Markdown document.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL