Documentation
¶
Index ¶
- Constants
- Variables
- func AgyOverlayManifestPath(projectRoot string) (string, error)
- func CacheDBPath() (string, error)
- func CacheDir() (string, error)
- func CursorOverlayManifestPath(projectRoot string) (string, error)
- func EnsureUserAgentpackLayout() (string, error)
- func EnvironmentsRoot() (string, error)
- func FindProjectRoot(start string) (string, error)
- func LaunchSyncStatePath(projectRoot, modeName string) (string, error)
- func LocalMirrorPathFromShorthand(spec string) (string, error)
- func LocalRegistryRoot() (string, error)
- func LockPath(projectRoot string) string
- func ManifestPath(projectRoot string) string
- func MarkProjectDirectory(directory, projectRoot string) error
- func ModePathComponent(modeName string) string
- func OrphanedProjectDirectories(parent string) []string
- func PluginDataDir(projectRoot, module string) (string, error)
- func ProjectDotAgentsDir(projectRoot string) string
- func ProjectDotClaudeDir(projectRoot string) string
- func ProjectPathHash(projectRoot string) (string, error)
- func ProjectStateDir(projectRoot string) (string, error)
- func ProjectStateFile(projectRoot, name string) (string, error)
- func ProxyLogDir(projectRoot string) (string, error)
- func ResolveProjectRoot(explicit string) (string, error)
- func ResolveProjectRootOrCWD(explicit string) (string, error)
- func SessionHistoryRecoveryDirForComponent(projectRoot, harness, modeComponent string) (string, error)
- func SharedCodexAuthPath() (string, error)
- func SharedGrokCredentialsDir() (string, error)
- func StagedManifestPath(projectRoot, modeName string) (string, error)
- func StagingAgyBundleDirForMode(root, mode string) (string, error)
- func StagingAgyDirForMode(root, mode string) (string, error)
- func StagingCodexHomeDirForMode(root, mode string) (string, error)
- func StagingCursorBundleDirForMode(root, mode string) (string, error)
- func StagingCursorHomeDirForMode(root, mode string) (string, error)
- func StagingCursorPackPluginDirForMode(root, mode string) (string, error)
- func StagingGrokBundleDirForMode(root, mode string) (string, error)
- func StagingGrokDirForMode(root, mode string) (string, error)
- func StagingGrokHomeDirForMode(root, mode string) (string, error)
- func StagingOpenCodeDirForMode(root, mode string) (string, error)
- func StagingPluginRootsDirForMode(root, mode string) (string, error)
- func StagingPluginsDirForMode(root, mode string) (string, error)
- func StagingProjectDir(projectRoot string) (string, string, error)
- func StagingRootForMode(projectRoot, modeName string) (string, error)
- func UserAgentpackHome() (string, error)
- type Context
Constants ¶
const ( LockfileName = "pack.lock" ManifestName = "agentpack.toml" StagedAgentpackBundleName = "agentpack-bundle" DotAgentsDir = ".agents" DotClaudeDir = ".claude" )
Variables ¶
var ErrProjectNotFound = errors.New("no agentpack.toml or pack.lock found")
Functions ¶
func AgyOverlayManifestPath ¶
func CacheDBPath ¶
func EnvironmentsRoot ¶
EnvironmentsRoot holds portable external definition directories.
func FindProjectRoot ¶
func LaunchSyncStatePath ¶
func LocalRegistryRoot ¶
func ManifestPath ¶
func MarkProjectDirectory ¶
MarkProjectDirectory records which project a directory belongs to.
func ModePathComponent ¶
func OrphanedProjectDirectories ¶
OrphanedProjectDirectories lists the directories directly under parent that carry a project marker for a project directory that no longer exists. A directory without a marker is never listed.
func PluginDataDir ¶
PluginDataDir is the durable directory a plugin's ${CLAUDE_PLUGIN_DATA} names for a project; it survives staging rebuilds and package updates.
func ProjectDotAgentsDir ¶
func ProjectDotClaudeDir ¶
func ProjectPathHash ¶
func ProjectStateDir ¶
func ProjectStateFile ¶
ProjectStateFile is the public form of the per-project state path helper.
func ProxyLogDir ¶
func ResolveProjectRoot ¶
func ResolveProjectRootOrCWD ¶
func SharedCodexAuthPath ¶
func StagedManifestPath ¶
StagedManifestPath is where a sync records what it staged for a mode, kept outside the staging tree it describes.
func StagingAgyDirForMode ¶
func StagingGrokDirForMode ¶
func StagingPluginRootsDirForMode ¶
StagingPluginRootsDirForMode holds whole copies of the plugins whose MCP servers run from their own directory, one per package, shared by every harness of the mode.
func StagingProjectDir ¶
StagingProjectDir is the directory that holds a project's staging for every mode. The second result is the directory such directories are created in when no AGENTPACK_STAGING_ROOT is set, and empty when one is.
func StagingRootForMode ¶
func UserAgentpackHome ¶
UserAgentpackHome implements the documented AGENTPACK_HOME/XDG/LOCALAPPDATA precedence without depending on a platform directory package.
Types ¶
type Context ¶
type Context struct {
// DefinitionRoot holds agentpack.toml and pack.lock.
DefinitionRoot string
// WorkspaceRoot is the checkout / agent cwd (.agents, overlays).
WorkspaceRoot string
}
Context separates where the portable definition lives from the checkout the agent uses as cwd. When both roots are empty after Resolve, callers still use a single project root (legacy workflow).
func ResolveContext ¶
func ResolveContext(projectRoot, definitionRoot, workspaceRoot string, boundDefinition string) (Context, error)
ResolveContext builds a Context from explicit flags and an optional binding. Legacy --project-root alone keeps today's single-root behavior.