Documentation
¶
Overview ¶
Package workspace locates and describes an amoxtli workspace: a project directory holding a .amoxtli/ configuration directory, discovered by walking up the filesystem from a starting point (like git does).
Index ¶
Constants ¶
const DirName = ".amoxtli"
DirName is the name of the workspace configuration directory.
const EnvDir = "AMOXTLI_DIR"
EnvDir is the environment variable pointing directly to a workspace configuration directory, bypassing discovery. Useful for processes whose working directory is unpredictable (e.g. MCP servers spawned by a client).
Variables ¶
var ErrNotFound = errors.Errorf("no %s directory found; run \"amoxtli init\" first", DirName)
ErrNotFound is returned by Discover when no .amoxtli directory exists between the starting directory and the filesystem root.
Functions ¶
This section is empty.
Types ¶
type Workspace ¶
Workspace describes a located workspace. Dir is the .amoxtli directory itself; Root is its parent (the project root).
func Discover ¶
Discover walks up from startDir and returns the first directory containing a .amoxtli subdirectory. If the AMOXTLI_DIR environment variable is set, it is used directly as the configuration directory instead.
func (*Workspace) ConfigPath ¶
ConfigPath returns the path of the workspace configuration file.
func (*Workspace) Resolve ¶
Resolve resolves a possibly-relative path from the configuration file against the .amoxtli directory.
func (*Workspace) StagingDir ¶
StagingDir returns the stable staging directory used by persistent tasks.