Documentation
¶
Overview ¶
Package project resolves which directory a coop session is anchored to.
Index ¶
Constants ¶
const VolumeSep = "--"
VolumeSep separates a coop's name from a volume suffix. Container names cannot contain "--" (Name collapses hyphen runs), so <name>-- prefix matching cannot cross into another coop's volumes.
Variables ¶
This section is empty.
Functions ¶
func Name ¶
Name derives the container name for a (canonical) project path.
Anatomy: coop-<slug>-<hash16>. The 64-bit path hash disambiguates same-basename projects (work/api vs personal/api must never share a container or volumes). The slug collapses hyphen runs so "--" can never appear in a name — VolumeSep exploits that as an unambiguous owner/suffix boundary for volume cleanup.
func Resolve ¶
Resolve determines the project root for a coop, walking up from dir.
Resolution order:
- coop.toml marker (nearest ancestor) — explicit pin, e.g. for pseudo-monorepos where the org root is the sandbox unit
- bare+worktree layout — git toplevel whose parent contains .bare/ resolves to that parent (the whole project incl. all worktrees)
- git toplevel
- dir itself
Types ¶
This section is empty.