paths

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package paths defines the user-owned filesystem layout of the coding application without creating any files or directories.

Index

Constants

View Source
const (
	// HomeEnv overrides the default ~/.pips product root.
	HomeEnv = "PIPS_HOME"
)

Variables

View Source
var ErrInvalid = errors.New("coding paths: invalid user configuration directory")

ErrInvalid means the user configuration root cannot define a safe layout.

Functions

func ProjectAgentSkillsDir

func ProjectAgentSkillsDir() string

ProjectAgentSkillsDir returns the workspace-relative shared Agent Skills directory.

func ProjectAgentsDir

func ProjectAgentsDir() string

ProjectAgentsDir returns the workspace-relative private Pips Agent root.

func ProjectBundlesDir

func ProjectBundlesDir() string

ProjectBundlesDir returns the workspace-relative project bundle directory.

func ProjectHooksFile

func ProjectHooksFile() string

ProjectHooksFile returns the workspace-relative lifecycle hook configuration path.

func ProjectMCPFile

func ProjectMCPFile() string

ProjectMCPFile returns the workspace-relative MCP configuration path.

func ProjectPermissionsFile

func ProjectPermissionsFile() string

ProjectPermissionsFile returns the workspace-relative local permission path.

func ProjectPluginsDir

func ProjectPluginsDir() string

ProjectPluginsDir returns the trusted workspace-relative Agent Plugins root.

func ProjectRoot

func ProjectRoot() string

ProjectRoot returns the workspace-relative product directory.

func ProjectSharedAgentsDir

func ProjectSharedAgentsDir() string

ProjectSharedAgentsDir returns the workspace-relative shared Agent root.

func ProjectSkillsDir

func ProjectSkillsDir() string

ProjectSkillsDir returns the workspace-relative project skills directory.

func ProjectSkillsFile

func ProjectSkillsFile() string

ProjectSkillsFile returns the workspace-relative local Skill settings path.

Types

type Layout

type Layout struct {
	// contains filtered or unexported fields
}

Layout contains all user-owned P0 persistence paths. Project-scoped product resources remain workspace-relative and are not part of this layout.

func Default

func Default() (Layout, error)

Default returns the user layout selected by PIPS_HOME or ~/.pips.

func New

func New(root string) (Layout, error)

New returns an application layout rooted exactly at root.

func (Layout) AgentSkillsDir

func (l Layout) AgentSkillsDir() string

AgentSkillsDir returns the shared user Agent Skills directory. It is empty for layouts built with New unless explicitly configured.

func (Layout) AgentsDir

func (l Layout) AgentsDir() string

AgentsDir returns the user Pips Agent definition directory.

func (Layout) BundlesDir

func (l Layout) BundlesDir() string

BundlesDir returns the user bundle directory.

func (Layout) ConfigFile

func (l Layout) ConfigFile() string

ConfigFile returns the user TOML configuration path.

func (Layout) HookTrustFile

func (l Layout) HookTrustFile() string

HookTrustFile returns the Pips-owned lifecycle hook trust store path.

func (Layout) HooksFile

func (l Layout) HooksFile() string

HooksFile returns the user lifecycle hook configuration path.

func (Layout) MCPFile

func (l Layout) MCPFile() string

MCPFile returns the user MCP configuration path.

func (Layout) PluginDataDir

func (l Layout) PluginDataDir() string

PluginDataDir returns the client-owned persistent PLUGIN_DATA base.

func (Layout) PluginsDir

func (l Layout) PluginsDir() string

PluginsDir returns the user Agent Plugins discovery root. Each immediate child is one portable package rooted by plugin.json.

func (Layout) Root

func (l Layout) Root() string

Root returns the application's user configuration directory.

func (Layout) SessionsDir

func (l Layout) SessionsDir() string

SessionsDir returns the Harness session repository path.

func (Layout) SharedAgentsDir

func (l Layout) SharedAgentsDir() string

SharedAgentsDir returns the shared user Agent definition directory. It is empty for layouts built with New unless explicitly configured.

func (Layout) SkillsDir

func (l Layout) SkillsDir() string

SkillsDir returns the user skill directory.

func (Layout) TUIThemesDir

func (l Layout) TUIThemesDir() string

TUIThemesDir returns the optional user theme directory. Theme discovery never creates this directory; users may add independent *.toml definitions beneath the private product root.

func (Layout) TeamAggregatesDir

func (l Layout) TeamAggregatesDir() string

TeamAggregatesDir returns the Team aggregate journal directory.

func (Layout) TeamContinuationsDir

func (l Layout) TeamContinuationsDir() string

TeamContinuationsDir returns the Team continuation journal directory.

func (Layout) TeamControlDir

func (l Layout) TeamControlDir() string

TeamControlDir returns the operator Team control journal directory.

func (Layout) TeamIntegrationsDir

func (l Layout) TeamIntegrationsDir() string

TeamIntegrationsDir returns the private Integration journal directory.

func (Layout) TeamLeasesDir

func (l Layout) TeamLeasesDir() string

TeamLeasesDir returns the retained Team lease directory.

func (Layout) TeamResourcesDir

func (l Layout) TeamResourcesDir() string

TeamResourcesDir returns the Team application resource journal directory.

func (Layout) TeamsDir

func (l Layout) TeamsDir() string

TeamsDir returns the private Team application data directory.

func (Layout) TempDir

func (l Layout) TempDir() string

TempDir returns the legacy product-local temporary path. Production Coding Runtime execution uses an owner-managed external scratch root instead; this method remains for explicit test/embedder layouts and compatibility callers.

func (Layout) WithAgentSkillsDir

func (l Layout) WithAgentSkillsDir(directory string) (Layout, error)

WithAgentSkillsDir returns a copy that discovers shared Agent Skills from directory. An empty directory disables the shared user root. This is mainly useful for embedders and hermetic tests; Default configures ~/.agents/skills.

func (Layout) WithSharedAgentsDir

func (l Layout) WithSharedAgentsDir(directory string) (Layout, error)

WithSharedAgentsDir returns a copy that discovers shared Agent definitions from directory. An empty directory disables the shared user root. This is mainly useful for embedders and hermetic tests; Default configures ~/.agents/agents.

func (Layout) WorkspacesFile

func (l Layout) WorkspacesFile() string

WorkspacesFile returns the workspace state store path.

func (Layout) WorktreesRoot

func (l Layout) WorktreesRoot() string

WorktreesRoot returns the sibling root reserved for Team Worktrees.

Jump to

Keyboard shortcuts

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