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 EnsurePrivateDirectory(path string) error
- func EnsureUserAgentpackLayout() (string, error)
- func EnvironmentsRoot() (string, error)
- func FindProjectRoot(start string) (string, error)
- func LaunchSyncStatePath(projectRoot, modeName, key string) (string, error)
- func LocalMirrorPathFromShorthand(spec string) (string, error)
- func LocalRegistryRoot() (string, error)
- func LockPath(projectRoot string) string
- func MCPCredentialIndexPath() (string, error)
- 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 RenameDurable(source, target string, replace bool) error
- func ResolveProjectRoot(explicit string) (string, error)
- func ResolveProjectRootOrCWD(explicit string) (string, error)
- func RestoreUserEnvironment()
- func SelectStagingGeneration(projectRoot, modeName, root 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 TreeMetadata(root string) (string, time.Time, error)
- func UserAgentpackHome() (string, error)
- type Context
- type StagingGeneration
Constants ¶
const ( LockfileName = "pack.lock" ManifestName = "agentpack.toml" StagedAgentpackBundleName = "agentpack-bundle" DotAgentsDir = ".agents" DotClaudeDir = ".claude" )
const MCPCredentialIndexName = "mcp-credentials.json"
MCPCredentialIndexName lists the gateway's stored MCP credentials (no secrets) for staging.
const RacyTreeMetadataWindow = 3 * time.Second
RacyTreeMetadataWindow keeps a recent edit from becoming a reusable verification stamp.
Variables ¶
var ErrProjectNotFound = errors.New("no agentpack.toml or pack.lock found")
Functions ¶
func AgyOverlayManifestPath ¶
func CacheDBPath ¶
func EnsurePrivateDirectory ¶ added in v0.14.0
EnsurePrivateDirectory protects both newly created and existing directories.
func EnvironmentsRoot ¶
EnvironmentsRoot holds portable external definition directories.
func FindProjectRoot ¶
func LaunchSyncStatePath ¶
func LocalRegistryRoot ¶
func MCPCredentialIndexPath ¶ added in v0.14.1
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 RenameDurable ¶ added in v0.14.0
func ResolveProjectRoot ¶
func ResolveProjectRootOrCWD ¶
func RestoreUserEnvironment ¶ added in v0.12.10
func RestoreUserEnvironment()
RestoreUserEnvironment is only needed on Windows.
func SelectStagingGeneration ¶ added in v0.12.11
SelectStagingGeneration makes this command use an existing generation of the mode. A generation that is gone or not of this mode is ignored: the caller rebuilds as it would for any stale staging.
func SharedCodexAuthPath ¶
func StagedManifestPath ¶
StagedManifestPath records staged content per generation, with the legacy project-state location used only for staging built by older releases.
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 TreeMetadata ¶
TreeMetadata digests the path, type, permission bits, size and modification time of every file below root, and reports the newest modification time. It reads no contents, so it detects visible changes without proving any bytes.
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.
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.
type StagingGeneration ¶ added in v0.7.3
type StagingGeneration struct {
Root string
// contains filtered or unexported fields
}
StagingGeneration builds privately and publishes only after verification. Old generations are retained so running sessions and their support files survive. shortcut: generations accumulate, add lease-aware reclamation when disk use requires it.
func BeginStagingGeneration ¶ added in v0.7.3
func BeginStagingGeneration(projectRoot, modeName string) (*StagingGeneration, error)
func (*StagingGeneration) Abort ¶ added in v0.7.3
func (generation *StagingGeneration) Abort()
func (*StagingGeneration) Publish ¶ added in v0.7.3
func (generation *StagingGeneration) Publish() error