Documentation
¶
Index ¶
Constants ¶
const ( RuntimeLocalWorktree = "local-worktree" RuntimeLocalCheckout = "local-checkout" RuntimeLocalDocker = "local-docker" RuntimeCloudSandbox = "cloud-sandbox" )
Runtime constants for workspace execution backends
Variables ¶
This section is empty.
Functions ¶
func NormalizeRuntime ¶ added in v0.0.5
NormalizeRuntime returns a normalized runtime string
Types ¶
type LoadResult ¶ added in v0.0.5
type LoadResult struct {
Metadata *Metadata
Warning string // Non-empty if migration action needed
}
LoadResult includes metadata and any migration warnings
type Metadata ¶
type Metadata struct {
Name string `json:"name"`
Branch string `json:"branch"`
Repo string `json:"repo"`
Base string `json:"base"`
Created string `json:"created"`
Assistant string `json:"assistant"` // "claude", "codex", "gemini"
Runtime string `json:"runtime"` // "local-worktree", "local-docker", "cloud-sandbox" (default: "local-worktree")
Scripts ScriptsConfig `json:"scripts"`
ScriptMode string `json:"script_mode"` // "concurrent" or "nonconcurrent"
Env map[string]string `json:"env"`
PortBase *int `json:"port_base"`
LastActiveBufferName string `json:"last_active_buffer_name"`
OpenTabs []TabInfo `json:"open_tabs,omitempty"` // Persisted tabs
ActiveTabIndex int `json:"active_tab_index"`
}
Metadata stores per-workspace configuration
type MetadataStore ¶
type MetadataStore struct {
// contains filtered or unexported fields
}
MetadataStore manages per-workspace metadata persistence
func NewMetadataStore ¶
func NewMetadataStore(metadataRoot string) *MetadataStore
NewMetadataStore creates a new metadata store
func (*MetadataStore) Delete ¶
func (s *MetadataStore) Delete(ws *Workspace) error
Delete removes metadata for a workspace
func (*MetadataStore) Load ¶
func (s *MetadataStore) Load(ws *Workspace) (*LoadResult, error)
Load loads metadata for a workspace
type Project ¶
type Project struct {
Name string `json:"name"`
Path string `json:"path"` // Absolute path to repository
Workspaces []Workspace `json:"-"` // Discovered dynamically via git
}
Project represents a registered git repository with its workspaces
func NewProject ¶
NewProject creates a new Project from a repository path
func (*Project) AddWorkspace ¶ added in v0.0.5
AddWorkspace adds a workspace to the project
func (*Project) FindWorkspace ¶ added in v0.0.5
FindWorkspace finds a workspace by its root path
func (*Project) FindWorkspaceByName ¶ added in v0.0.5
FindWorkspaceByName finds a workspace by its name
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages the projects.json file for persistent project tracking
func NewRegistry ¶
NewRegistry creates a new registry at the specified path
func (*Registry) AddProject ¶
AddProject adds a project path to the registry
func (*Registry) RemoveProject ¶
RemoveProject removes a project path from the registry
type ScriptsConfig ¶
type ScriptsConfig struct {
Setup string `json:"setup"`
Run string `json:"run"`
Archive string `json:"archive"`
}
ScriptsConfig holds the setup/run/archive script commands
type Workspace ¶ added in v0.0.5
type Workspace struct {
Name string `json:"name"`
Branch string `json:"branch"`
Base string `json:"base"` // Base ref (e.g., origin/main)
Repo string `json:"repo"` // Primary checkout path
Root string `json:"root"` // Workspace path
Created time.Time `json:"created"`
}
Workspace represents a git worktree entry with its associated metadata
func NewWorkspace ¶ added in v0.0.5
NewWorkspace creates a new Workspace with the current timestamp
func (Workspace) ID ¶ added in v0.0.5
func (w Workspace) ID() WorkspaceID
ID returns a unique identifier for the workspace based on its repo and root paths
func (Workspace) IsMainBranch ¶ added in v0.0.5
IsMainBranch returns true if this workspace is on main or master branch
func (Workspace) IsPrimaryCheckout ¶ added in v0.0.5
IsPrimaryCheckout returns true if this is the main checkout (not a worktree)
type WorkspaceID ¶ added in v0.0.5
type WorkspaceID string
WorkspaceID is a unique identifier based on repo+root hash