Documentation
¶
Overview ¶
Package routing defines which environment variables agentmod routes while a project is active (IMPLEMENTATION_PLAN §8) and the names of agentmod's own bookkeeping variables (FABLE_PLAN §14). `agentmod env` emits these on activation; doctor later audits shells against the same single source.
layout defines what init CREATES on disk; this package defines what the shell hook ROUTES to those locations. Paths that exist only as routing targets (node/bin, npm-cache, the XDG roots) are named here.
Index ¶
Constants ¶
const ( // EnvActive is "1" while a project's routing is applied in this shell. EnvActive = "AGENTMOD_ACTIVE" // EnvProjectRoot is the project root the routing was applied for. EnvProjectRoot = "AGENTMOD_PROJECT_ROOT" // EnvRoot is the .agentmod directory of that project. EnvRoot = "AGENTMOD_ROOT" // EnvVarsList records, space-separated, which routed variables were set // at activation. Deactivation restores exactly this list, so it stays // correct even if agentmod.toml changes (or disappears) while inside // the project. EnvVarsList = "AGENTMOD_VARS" // SavedPrefix prefixes the saved pre-activation value of a routed // variable (D006). Absence of AGENTMOD_SAVED_<VAR> means <VAR> was // unset before activation, so deactivation unsets it. SavedPrefix = "AGENTMOD_SAVED_" )
Bookkeeping variables owned by agentmod (uppercase per FABLE_PLAN §14).
Variables ¶
This section is empty.
Functions ¶
func NodeBinDir ¶
NodeBinDir is the single PATH entry agentmod manages: prepended once on activation (when node routing is enabled), stripped on deactivation.
func RoutedNames ¶
func RoutedNames() []string
RoutedNames returns the name of every variable agentmod can ever route, independent of any particular project's config (single source: Vars with every agent and XDG opt-in enabled). Doctor uses it to detect routed values lingering in shells that are outside any project.