workspace

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsManagedRunDir

func IsManagedRunDir(path string) bool

IsManagedRunDir reports whether path resolves to a run directory (or one of its descendants) under the configured workspace roots.

func PrepareDefaultRoots

func PrepareDefaultRoots() error

PrepareDefaultRoots eagerly creates the process workspace root.

Types

type Manager

type Manager struct {
	PathExists func(string) bool
	MkdirAll   func(string, os.FileMode) error
	NewGUID    func() string
	ReadFile   func(string) ([]byte, error)
	WriteFile  func(string, []byte, os.FileMode) error
	CanExec    func(string) bool
}

Manager creates isolated run directories.

func NewManager

func NewManager() Manager

NewManager returns a manager backed by os functions.

func (Manager) CreateRunDir

func (m Manager) CreateRunDir() (string, string, error)

CreateRunDir creates a GUID-named run directory under the configured workspace root.

func (Manager) IsManagedRunDir

func (m Manager) IsManagedRunDir(path string) bool

IsManagedRunDir reports whether path resolves to a run directory (or one of its descendants) under this manager's workspace roots.

func (Manager) PrepareRoots

func (m Manager) PrepareRoots() error

PrepareRoots ensures the workspace root exists on the preferred base.

func (Manager) SeedAgentsFile

func (m Manager) SeedAgentsFile(runDir string) (string, error)

SeedAgentsFile copies the local library AGENTS seed into a run directory.

func (Manager) SelectBase

func (m Manager) SelectBase() string

SelectBase chooses /dev/shm when available and executable, else /tmp.

Jump to

Keyboard shortcuts

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