paths

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package paths resolves the on-disk locations Shepherd uses for a repository: the runtime state directory (.shepherd), native session logs, the session registry file, and the worktrees root (which may live outside the repo).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paths

type Paths struct {
	RepoRoot      string // absolute repo root (main work tree)
	StateDir      string // <repo>/.shepherd
	LogDir        string // native session logs
	SessionsFile  string // <repo>/.shepherd/sessions.json
	WorktreesRoot string // resolved worktrees root (may be outside the repo)
}

Paths holds resolved absolute locations for a repo.

func Resolve

func Resolve(repoRoot, worktreesRoot, nativeLogDir string) Paths

Resolve computes Paths. worktreesRoot and nativeLogDir may be relative, in which case they resolve against repoRoot.

func (Paths) EnsureDirs

func (p Paths) EnsureDirs() error

EnsureDirs creates the state, log, and worktrees-root directories.

Jump to

Keyboard shortcuts

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