Documentation
¶
Overview ¶
Package workspace reads what an agent run is told about its working directory: git state, platform and project instruction files.
Index ¶
Constants ¶
const MaxInstructionBytes = 32 << 10
MaxInstructionBytes caps the instruction files of one run together.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Git ¶
type Git struct {
Root string
// Branch describes HEAD, such as "branch main (upstream origin/main, ahead 1)".
Branch string
// Status holds porcelain status lines; MoreStatus counts the ones left out.
Status []string
MoreStatus int
StatusErr string
Commits []string
}
Git is a snapshot of the repository a directory belongs to.
type InstructionFile ¶
InstructionFile is one instruction file as a run gets it. Truncated marks a file cut, or left out entirely, at MaxInstructionBytes.
func Instructions ¶
func Instructions(workingDir, gitRoot, home, global string) []InstructionFile
Instructions reads the instruction files for workingDir, outermost first: global, then each directory from the top down to workingDir. The top is home when workingDir lies under it, else the git root, else workingDir.