feat: core.Env() + core.Path() — system info and OS-aware paths #21
No reviewers
Labels
No labels
needs-review
needs-review
needs-review
needs-review
needs-review
needs-review
needs-review
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: core/go#21
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds core.Env() for system/environment lookups with os.Getenv fallthrough, and core.Path() for OS-aware filesystem paths with CleanPath, PathBase, PathDir, PathExt, PathIsAbs, PathGlob. CORE_HOME env var override for workspace sandboxing. 30 tests.
Path() builds OS-aware absolute paths using Env("DS") — single point of responsibility for filesystem paths. Relative paths anchor to DIR_HOME. cleanPath resolves .. and double separators. Env() now falls through to os.Getenv for unknown keys — universal replacement for os.Getenv. Core keys (OS, DIR_HOME, etc.) take precedence, arbitrary env vars pass through. New exports: Path, PathBase, PathDir, PathExt, PathIsAbs, PathGlob, CleanPath. Info init moved to init() so Path() can be used during population without init cycle. DIR_HOME respects CORE_HOME env var override for agent workspace sandboxing. 13 path tests, 17 env tests — all passing. Co-Authored-By: Virgil <virgil@lethean.io>