Documentation
¶
Overview ¶
Package env provides environment variable helpers for spawning subprocesses.
ForSpawnCC strips Claude Code session markers (CLAUDECODE, CLAUDE_CODE_ENTRYPOINT) from the current process environment so that spawned Claude Code workers do not detect themselves as nested sessions and alter their behaviour accordingly.
Plane: shared
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowedDotEnvParts ¶ added in v1.9.0
func AllowedDotEnvParts() []string
AllowedDotEnvParts loads ~/.config/ttal/.env and returns KEY=VALUE strings for vars that pass IsAllowedForSession. Logs a warning if .env fails to load. Used by both buildManagerAgentEnv and buildBreatheEnv to avoid duplicating the filter loop and the silent-error decision.
func ForSpawnCC ¶
func ForSpawnCC() []string
ForSpawnCC returns the current environment with CC-specific vars removed, so spawned Claude Code subprocesses don't detect themselves as nested sessions.
func IsAllowedForSession ¶ added in v1.6.0
IsAllowedForSession returns true for env vars that workers/agents are permitted to receive. All other .env vars are blocked — their operations are proxied through the daemon for token isolation.
func ManagerTemenosEnv ¶ added in v1.10.0
ManagerTemenosEnv returns TEMENOS_WRITE, TEMENOS_PATHS, and ENABLE_TOOL_SEARCH env parts for manager sessions. Managers get read-only cwd (TEMENOS_WRITE=false) plus all project paths as :ro for code investigation.
func ReviewerTemenosEnv ¶ added in v1.10.0
ReviewerTemenosEnv returns TEMENOS_WRITE, TEMENOS_PATHS, and ENABLE_TOOL_SEARCH env parts for reviewer sessions. Reviewers get read-only access to cwd (worktree) via TEMENOS_WRITE=false.
func WorkerTemenosEnv ¶ added in v1.10.0
WorkerTemenosEnv returns TEMENOS_WRITE, TEMENOS_PATHS, and ENABLE_TOOL_SEARCH env parts for worker sessions. Workers get write access to cwd (worktree) via TEMENOS_WRITE=true.
Types ¶
This section is empty.