Documentation
¶
Overview ¶
Package nest owns ari's data directories: the global nest at ~/.ari and the project nest at .ari/ in the repo. It is the only package that knows the layout; nothing else hardcodes a path, which is what lets a test point the whole nest at a temp dir.
Index ¶
- func Key(root string) string
- type Nest
- func (n Nest) ARIMD() string
- func (n Nest) AuthDir() string
- func (n Nest) ColonyDB() string
- func (n Nest) EnsureGlobal() error
- func (n Nest) GlobalConfig() string
- func (n Nest) JournalDir() string
- func (n Nest) LocalConfig() string
- func (n Nest) ProjectConfig() string
- func (n Nest) ProjectDir() string
- func (n Nest) ProjectStateDir() string
- func (n Nest) SessionsDir() string
- func (n Nest) TrustFile() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Nest ¶
type Nest struct {
// Global is the per-user nest, ~/.ari unless ARI_HOME overrides it.
Global string
// Root is the project root: the git repo root when there is one,
// otherwise the working directory the run started in.
Root string
// Key is the sanitized project key that names this project's state
// under Global/projects.
Key string
}
Nest is the resolved pair of data directories for one run.
func Resolve ¶
Resolve computes the nest for cwd. The project root is the enclosing git repo root, or cwd itself outside a repo; worktrees of one repo share a key because the key derives from the repo root path.
func (Nest) EnsureGlobal ¶
EnsureGlobal creates the global-nest directories with tight modes. The auth directory is 0700 because it holds credential references (D16).
func (Nest) JournalDir ¶
JournalDir holds the append-only event log.
func (Nest) LocalConfig ¶
LocalConfig is <root>/.ari/local.toml, gitignored, per-user overrides.
func (Nest) ProjectConfig ¶
ProjectConfig is <root>/.ari/config.toml, committable.
func (Nest) ProjectStateDir ¶
ProjectStateDir is this project's per-user state under the global nest: sessions, the colony database, the journal. It lives here and not in the repo so nothing tempts anyone to commit it.
func (Nest) SessionsDir ¶
SessionsDir holds the JSONL transcripts for this project.