paths

package
v1.55.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupHomeEnv

func LookupHomeEnv() (string, error)

Types

type Paths

type Paths struct {
	// contains filtered or unexported fields
}

Paths provides access to all no-slop filesystem locations. The root defaults to ~/.no-mistakes but can be overridden via NS_HOME or its NM_HOME compatibility alias or by using WithRoot (for testing).

func New

func New() (*Paths, error)

New returns Paths rooted at NS_HOME, NM_HOME, or ~/.no-mistakes.

func WithRoot

func WithRoot(root string) *Paths

WithRoot returns Paths rooted at a custom directory (for testing).

func (*Paths) CLILog

func (p *Paths) CLILog() string

func (*Paths) ConfigFile

func (p *Paths) ConfigFile() string

func (*Paths) DB

func (p *Paths) DB() string

func (*Paths) DaemonBootstrapLog

func (p *Paths) DaemonBootstrapLog() string

DaemonBootstrapLog captures service-manager output before the daemon logger is ready, plus crash diagnostics written directly to stdout or stderr.

func (*Paths) DaemonLog

func (p *Paths) DaemonLog() string

func (*Paths) EnsureDirs

func (p *Paths) EnsureDirs() error

EnsureDirs creates all required directories under root.

func (*Paths) EvalDir

func (p *Paths) EvalDir() string

EvalDir holds automatically collected local evaluation cases, shared object pools, and their separate registry. EnsureDirs leaves creation to collection and eval commands so disabling provenance and auto-capture creates no state.

func (*Paths) EvidenceDir

func (p *Paths) EvidenceDir() string

EvidenceDir is the default root for test-evidence artifacts, keyed by run ID.

func (*Paths) EvidenceRoot

func (p *Paths) EvidenceRoot(configured string) string

EvidenceRoot resolves where run evidence is written, honoring an absolute test.evidence.local_root override.

func (*Paths) LaneHealthFile

func (p *Paths) LaneHealthFile() string

LaneHealthFile persists which configured agent lanes are quota-exhausted and when each recovers, so concurrent runs and later runs skip a dead lane instead of each paying an agent spawn to rediscover it.

func (*Paths) LockFile

func (p *Paths) LockFile() string

LockFile is the OS-level advisory lock used to enforce a single live daemon per NS_HOME (see the singleton lock in internal/daemon). Distinct from PIDFile, which is an informational record a live daemon writes for CLI/status consumers: LockFile is what actually prevents two daemons from ever running startup recovery or binding the socket concurrently for the same root.

func (*Paths) LogsDir

func (p *Paths) LogsDir() string

func (*Paths) ManagedServerLog

func (p *Paths) ManagedServerLog() string

ManagedServerLog holds raw output from daemon-managed agent servers.

func (*Paths) PIDFile

func (p *Paths) PIDFile() string

func (*Paths) ProcTreesDir

func (p *Paths) ProcTreesDir() string

ProcTreesDir holds one record per live command leader so a freshly started daemon can reap process trees a crashed predecessor left running.

This is the step/agent-subprocess counterpart to ServerPIDsDir, which only covers long-lived managed servers that write a PID file of their own.

func (*Paths) RepoDir

func (p *Paths) RepoDir(repoID string) string

func (*Paths) ReposDir

func (p *Paths) ReposDir() string

func (*Paths) Root

func (p *Paths) Root() string

func (*Paths) RunEvidenceDir

func (p *Paths) RunEvidenceDir(configured, runID string) string

RunEvidenceDir is the evidence directory for a single run.

func (*Paths) RunLogDir

func (p *Paths) RunLogDir(runID string) string

func (*Paths) ServerPIDsDir

func (p *Paths) ServerPIDsDir() string

ServerPIDsDir holds PID-tracking files for managed agent servers (opencode, rovodev) so a freshly started daemon can reap orphans left behind by a crashed predecessor.

func (*Paths) Socket

func (p *Paths) Socket() string

func (*Paths) TelemetryGateFile

func (p *Paths) TelemetryGateFile() string

TelemetryGateFile persists the read-surface telemetry dedupe state so high-frequency status polling stays rate-limited across CLI processes.

func (*Paths) UpdateCheckFile

func (p *Paths) UpdateCheckFile() string

func (*Paths) ValidateEvidenceRoot

func (p *Paths) ValidateEvidenceRoot(configured string) error

ValidateEvidenceRoot rejects configured evidence roots inside managed worktrees.

func (*Paths) WorktreeDir

func (p *Paths) WorktreeDir(repoID, runID string) string

func (*Paths) WorktreesDir

func (p *Paths) WorktreesDir() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL