Documentation
¶
Overview ¶
Package config handles loading, saving, and validating user configuration from JSON files, including project settings, plugin options, keymaps, and UI preferences.
Tasks plugin ¶
The embedded Tasks tab is off by default. It is turned on with the "tasks_plugin" feature flag, not with a plugin config key:
{
"features": { "flags": { "tasks_plugin": true } }
}
Tasks is a tab of the global space — [Agents] [Workspaces] [Tasks], reached with K or the Sidecar brand — not a project plugin, so it is not part of the project tab order and "plugins.tasks.position" no longer moves it. The field is still accepted and validated so older configs keep loading.
There is deliberately no Tasks store or JSONL path here. The embedded Tasks package performs its own normal configuration resolution.
Index ¶
- Constants
- func AssertIsolatedPath(path string) error
- func CheckStateIsolation() error
- func ConfigPath() string
- func ExpandPath(path string) string
- func IsolationAsserted() bool
- func MoveProject(projectPath string, delta int) error
- func RealUserConfigDir() string
- func RealUserStateDir() string
- func RemoveProject(projectPath string) error
- func ResetTestConfigPath()
- func ResetTestStateDir()
- func Save(cfg *Config) error
- func SaveCommunityTheme(communityName string, userOverrides map[string]interface{}) error
- func SaveGlobalTheme(tc ThemeConfig) error
- func SaveLastOpenInApp(projectPath, appID string) error
- func SavePlugins(mutate func(*PluginsConfig)) error
- func SaveProjectTheme(projectPath string, theme *ThemeConfig) error
- func SaveSelection(mutate func(*SelectionConfig)) error
- func SaveTheme(themeName string) error
- func SaveThemeWithOverrides(themeName string, overrides map[string]interface{}) error
- func SaveUI(mutate func(*UIConfig)) error
- func SaveWorkspace(mutate func(*WorkspacePluginConfig)) error
- func SetConfigPath(path string)
- func SetTestConfigPath(path string)
- func SetTestStateDir(dir string)
- func StateDir() string
- func UpdateProject(projectPath string, mutate func(*ProjectConfig)) error
- func ValidateProject(existing []ProjectConfig, name, path string, skipIndex int) string
- func ValidateProjectName(existing []ProjectConfig, name string, skipIndex int) string
- type Config
- type ConversationsPluginConfig
- type FeaturesConfig
- type FileBrowserPluginConfig
- type GitStatusPluginConfig
- type KeymapConfig
- type NotesPluginConfig
- type PluginsConfig
- type ProjectConfig
- type ProjectsConfig
- type SelectionConfig
- type SidebarDisplayConfig
- type TDMonitorPluginConfig
- type TasksPluginConfig
- type TerminalResourceProviderConfig
- type TerminalResourcesConfig
- type ThemeConfig
- type UIConfig
- type WorkspacePluginConfig
- type WorktreeSetupConfig
Constants ¶
const ( OverviewWorktreeScopeProject = "project" OverviewWorktreeScopeWorktree = "worktree" )
const ( // TasksPositionAfterWorkspaces places the Tasks tab immediately after the // workspaces tab. This is the default. TasksPositionAfterWorkspaces = "after-workspaces" // TasksPositionAfterNotes places the Tasks tab immediately after the notes // tab. TasksPositionAfterNotes = "after-notes" )
Tab positions for the Tasks plugin.
const ( // MaxTerminalResourceProviders bounds how many instances may be configured. MaxTerminalResourceProviders = 16 // MaxTerminalResourceProviderIDChars bounds an instance ID, which is a // persisted key. MaxTerminalResourceProviderIDChars = 64 // DefaultTerminalResourceTimeout, MinTerminalResourceTimeout and // MaxTerminalResourceTimeout clamp a per-instance resolve timeout. DefaultTerminalResourceTimeout = 10 * time.Second MinTerminalResourceTimeout = time.Second MaxTerminalResourceTimeout = 60 * time.Second )
Terminal resource provider bounds.
These mirror the protocol document's Limits table and internal/resource's constants. They are restated here rather than imported because internal/config is deliberately a leaf package: pulling in the resource document types would drag the Markdown renderer into everything that reads configuration. TestTerminalResourceBoundsMatchTheProtocol in internal/resourceprovider fails if the two ever drift.
const AllowRealStateEnv = "SIDECAR_ALLOW_REAL_STATE"
AllowRealStateEnv opts a process out of the automatic isolation that applies to every `go test` binary. Set it to "1" only in a test that deliberately proves the ordinary, unisolated path still works — and only with HOME already pointed at a temp dir.
const IsolationEnv = "SIDECAR_ISOLATED_STATE"
IsolationEnv is the promise a harness makes: this process must never read or write the real user's Sidecar state. Set it to "1".
The promise exists because tmux isolation and state isolation are separate axes (td-8d18de). A proof run can hold a private tmux socket and still share ~/.local/state/sidecar with the developer's live Sidecar, in which case it rewrites a manifest that instance is watching. Asserting isolation turns every path that resolves back into the real tree into a hard error instead of a silent overwrite.
Variables ¶
This section is empty.
Functions ¶
func AssertIsolatedPath ¶ added in v0.93.0
AssertIsolatedPath returns an error when isolation is asserted and path resolves inside the real user state or config tree. It returns nil otherwise: an ordinary run is never blocked from writing its own real files.
func CheckStateIsolation ¶ added in v0.93.0
func CheckStateIsolation() error
CheckStateIsolation validates the paths this process actually resolved.
func IsolationAsserted ¶ added in v0.93.0
func IsolationAsserted() bool
IsolationAsserted reports whether this process claims isolated state.
A test binary asserts it by default. Isolation used to be opt-in, which meant the guard was silently inert in every package that had not thought about it, and `go test ./...` went on creating directories in the developer's real ~/.local/state/sidecar/projects tree — the same tree that holds the shell manifest td-8d18de destroyed. Defaulting to on makes forgetting to isolate a loud failure instead of a silent write.
func MoveProject ¶ added in v1.0.0
MoveProject changes a project's position in the list by delta. The list order is what the switcher and the Projects page show, so it is a real setting.
func RealUserConfigDir ¶ added in v0.93.0
func RealUserConfigDir() string
RealUserConfigDir returns $HOME/.config/sidecar, likewise unoverridable.
func RealUserStateDir ¶ added in v0.93.0
func RealUserStateDir() string
RealUserStateDir returns the state directory an ordinary run would use, ignoring XDG_STATE_HOME and any test override: $HOME/.local/state/sidecar.
It deliberately derives the root from $HOME rather than from the pre-override value of XDG_STATE_HOME. A harness launches Sidecar as a subprocess with the override already in its environment, so the process has no way to observe what XDG_STATE_HOME was before isolation was applied. $HOME is the one anchor that is still visible from inside, and it is what the XDG default expands to.
func RemoveProject ¶ added in v1.0.0
RemoveProject drops a project from the configured list.
func ResetTestConfigPath ¶
func ResetTestConfigPath()
ResetTestConfigPath clears the test config path override.
func ResetTestStateDir ¶ added in v0.75.0
func ResetTestStateDir()
ResetTestStateDir clears the test state directory override.
func Save ¶
Save writes the config to ~/.config/sidecar/config.json, preserving any keys it doesn't manage (e.g. "prompts").
func SaveCommunityTheme ¶
SaveCommunityTheme saves a community theme reference with optional user overrides. Only the scheme name is stored — the full palette is computed at runtime.
func SaveGlobalTheme ¶
func SaveGlobalTheme(tc ThemeConfig) error
SaveGlobalTheme saves a ThemeConfig as the global UI theme.
func SaveLastOpenInApp ¶ added in v0.75.0
SaveLastOpenInApp persists the last-used "open in" app ID. If projectPath matches a configured project, that project's LastOpenInApp is set. The global UI.LastOpenInApp is always set as a fallback.
func SavePlugins ¶ added in v1.0.0
func SavePlugins(mutate func(*PluginsConfig)) error
SavePlugins applies a change to the plugins section and writes it. It is the panel-enablement path: which surfaces Sidecar assembles, and the handful of inputs those surfaces read. Like the other helpers it reloads first, so a setting changed in Configuration never overwrites an edit made to the file since Sidecar started, and it validates before writing so an out-of-range interval cannot reach disk.
func SaveProjectTheme ¶
func SaveProjectTheme(projectPath string, theme *ThemeConfig) error
SaveProjectTheme updates a specific project's theme in config and saves.
func SaveSelection ¶ added in v1.1.0
func SaveSelection(mutate func(*SelectionConfig)) error
SaveSelection applies a change to the selection section — how text selection behaves in every surface that offers it — and writes it. Like the others it reloads first, so a setting changed in Configuration never overwrites an edit made to the file since Sidecar started.
func SaveThemeWithOverrides ¶
SaveThemeWithOverrides saves a theme name and full overrides map to config.
func SaveUI ¶ added in v1.0.0
SaveUI applies a change to the ui section and writes it. It reloads first, so a setting changed in Configuration never overwrites an edit made to the file since Sidecar started.
func SaveWorkspace ¶ added in v1.0.0
func SaveWorkspace(mutate func(*WorkspacePluginConfig)) error
SaveWorkspace applies a change to the plugins.workspace section and writes it. Like SaveUI it reloads first, so a setting changed in Configuration never overwrites an edit made to the file since Sidecar started.
func SetConfigPath ¶ added in v0.93.0
func SetConfigPath(path string)
SetConfigPath records the explicit config path (the -config flag) so that ConfigPath, and everything that derives a directory from it, follow it. Passing "" leaves the default in place.
func SetTestConfigPath ¶
func SetTestConfigPath(path string)
SetTestConfigPath sets a custom config path for testing. Call ResetTestConfigPath() in test cleanup to restore default behavior.
func SetTestStateDir ¶ added in v0.75.0
func SetTestStateDir(dir string)
SetTestStateDir sets a custom state directory for testing.
func StateDir ¶ added in v0.75.0
func StateDir() string
StateDir returns the directory for sidecar state files. Follows XDG Base Directory Specification: $XDG_STATE_HOME/sidecar (defaults to ~/.local/state/sidecar).
func UpdateProject ¶ added in v1.0.0
func UpdateProject(projectPath string, mutate func(*ProjectConfig)) error
UpdateProject applies a change to the project at a path. mutate receives the live entry from a freshly loaded configuration.
Removing or renaming a project deliberately leaves state.json's workdir-keyed entries alone: a stale key is harmless, and rewriting per-surface UI state as a side effect of a settings change is not.
func ValidateProject ¶ added in v1.0.0
func ValidateProject(existing []ProjectConfig, name, path string, skipIndex int) string
ValidateProject reports why a name/path pair may not be added, or "" when it is fine. skipIndex excludes one existing entry from the uniqueness checks, so editing a project does not collide with itself; pass -1 when adding.
The returned string is the message a user reads, so it says what is wrong in plain language rather than naming a field.
func ValidateProjectName ¶ added in v1.0.0
func ValidateProjectName(existing []ProjectConfig, name string, skipIndex int) string
ValidateProjectName is the rename check: the path is already known good, so only the name is questioned.
Types ¶
type Config ¶
type Config struct {
Projects ProjectsConfig `json:"projects"`
Plugins PluginsConfig `json:"plugins"`
Keymap KeymapConfig `json:"keymap"`
UI UIConfig `json:"ui"`
Features FeaturesConfig `json:"features"`
// Selection configures text selection wherever it is offered. It is
// app-level because selection is one behaviour projected onto every
// surface, not a per-plugin setting.
Selection SelectionConfig `json:"selection"`
// TerminalResources configures external terminal resource providers. It is
// app-level rather than per-plugin because providers serve both workspace
// projections and are not project-tab plugins.
TerminalResources TerminalResourcesConfig `json:"terminalResources"`
}
Config is the root configuration structure.
func Load ¶
Load loads configuration from the path Sidecar is actually using — the -config flag's file, a test's fixture, or the default location. Every read-modify-write helper below goes through it, so a save can never merge against a different file than the one it is about to write.
func LoadFrom ¶
LoadFrom loads configuration from a specific path. If path is empty, uses ~/.config/sidecar/config.json
func (*Config) WorktreeSetupForProject ¶ added in v0.94.0
func (c *Config) WorktreeSetupForProject(projectPath string) WorktreeSetupConfig
WorktreeSetupForProject returns the project override when present, otherwise the workspace-wide default.
type ConversationsPluginConfig ¶
type ConversationsPluginConfig struct {
Enabled bool `json:"enabled"`
ClaudeDataDir string `json:"claudeDataDir"`
// DefaultCategoryFilter sets the default session category filter on startup.
// Example: ["interactive"] hides cron/system sessions by default.
// Empty or omitted means show all sessions (no filter).
DefaultCategoryFilter []string `json:"defaultCategoryFilter,omitempty"`
}
ConversationsPluginConfig configures the conversations plugin.
type FeaturesConfig ¶
FeaturesConfig holds feature flag settings.
type FileBrowserPluginConfig ¶ added in v0.81.0
type FileBrowserPluginConfig struct {
// Enabled controls whether the file browser plugin is loaded. Default: true.
Enabled bool `json:"enabled"`
}
FileBrowserPluginConfig configures the file browser plugin.
type GitStatusPluginConfig ¶
type GitStatusPluginConfig struct {
Enabled bool `json:"enabled"`
RefreshInterval time.Duration `json:"refreshInterval"`
}
GitStatusPluginConfig configures the git status plugin.
type KeymapConfig ¶
KeymapConfig holds key binding overrides.
type NotesPluginConfig ¶
type NotesPluginConfig struct {
// DefaultEditor sets the default editor mode when pressing Enter on a note.
// Values: "builtin" (default), "vim", "nvim", or any $EDITOR value.
// When set to "vim"/"nvim", Enter opens the note in inline vim instead of built-in editor.
DefaultEditor string `json:"defaultEditor,omitempty"`
}
NotesPluginConfig configures the notes plugin.
type PluginsConfig ¶
type PluginsConfig struct {
GitStatus GitStatusPluginConfig `json:"git-status"`
TDMonitor TDMonitorPluginConfig `json:"td-monitor"`
FileBrowser FileBrowserPluginConfig `json:"file-browser"`
Conversations ConversationsPluginConfig `json:"conversations"`
Workspace WorkspacePluginConfig `json:"workspace"`
Notes NotesPluginConfig `json:"notes"`
Tasks TasksPluginConfig `json:"tasks"`
}
PluginsConfig holds per-plugin configuration.
type ProjectConfig ¶
type ProjectConfig struct {
Name string `json:"name"` // display name for the project
Path string `json:"path"` // absolute path to project root (supports ~ expansion)
Theme *ThemeConfig `json:"theme,omitempty"` // per-project theme (nil = use global)
LastOpenInApp string `json:"lastOpenInApp,omitempty"` // last app used to open this project (e.g. "vscode", "goland")
OpenIn string `json:"openIn,omitempty"` // preferred "open in" app for this project; last-used is the fallback
WorktreeSetup *WorktreeSetupConfig `json:"worktreeSetup,omitempty"` // optional per-project setup policy
}
ProjectConfig represents a single project in the project switcher.
func AddProject ¶ added in v1.0.0
func AddProject(project ProjectConfig) (ProjectConfig, error)
AddProject appends a project to the configuration on disk and returns the saved entry. It reloads first, so a project added here never clobbers a change made to the file since Sidecar started.
type ProjectsConfig ¶
type ProjectsConfig struct {
Mode string `json:"mode"` // "single" for now
Root string `json:"root"` // "." default
List []ProjectConfig `json:"list"` // list of configured projects for switcher
}
ProjectsConfig configures project detection and layout.
type SelectionConfig ¶ added in v1.1.0
type SelectionConfig struct {
// CopyOnSelect copies a finished selection without a copy chord.
// Default: false — a selection that silently replaces the clipboard is the
// single most complained-about behaviour in the editors that ship it, so
// selecting and copying stay separate acts unless asked otherwise.
CopyOnSelect bool `json:"copyOnSelect,omitempty"`
}
SelectionConfig configures text selection across surfaces.
type SidebarDisplayConfig ¶ added in v0.81.0
type SidebarDisplayConfig struct {
// HideRepoPrefix strips the repo name prefix from worktree names (e.g., "myrepo-feature" → "feature").
// Default: false (show full name).
HideRepoPrefix bool `json:"hideRepoPrefix"`
// HideAgent hides the agent type label (e.g., "claude") on the second line. Default: false.
HideAgent bool `json:"hideAgent"`
// HideTask hides the linked task ID (e.g., "td-abc123") on the second line. Default: false.
HideTask bool `json:"hideTask"`
// HideStats hides the +/- line change stats on the second line. Default: false.
HideStats bool `json:"hideStats"`
}
SidebarDisplayConfig controls visibility of workspace sidebar entry elements.
type TDMonitorPluginConfig ¶
type TDMonitorPluginConfig struct {
Enabled bool `json:"enabled"`
RefreshInterval time.Duration `json:"refreshInterval"`
DBPath string `json:"dbPath"`
}
TDMonitorPluginConfig configures the TD monitor plugin.
type TasksPluginConfig ¶ added in v0.95.0
type TasksPluginConfig struct {
// Position was the anchor the Tasks tab was inserted after while Tasks was
// a project plugin. Tasks is now a tab of the global space (Agents,
// Workspaces, Tasks), whose order is fixed, so the value is accepted,
// validated, and preserved for older configs but no longer moves anything.
// One of TasksPositionAfterWorkspaces (default) or TasksPositionAfterNotes;
// unknown values are coerced back to the default by Validate.
Position string `json:"position,omitempty"`
}
TasksPluginConfig configures the embedded Tasks plugin.
Whether the plugin loads at all is governed by the "tasks_plugin" feature flag (default off), not by a field here — that keeps enablement on the same lever as the other opt-in surfaces (see internal/features).
There is deliberately no store/JSONL path: the embedded Tasks package uses Tasks' own configuration resolution.
type TerminalResourceProviderConfig ¶ added in v1.0.3
type TerminalResourceProviderConfig struct {
// ID is unique and stable. It is the persisted provider key and the
// authoritative identity of the instance: a provider cannot rename itself.
ID string `json:"id"`
// Command is an argv array executed without a shell. The first element may
// be an absolute path or resolve through PATH.
Command []string `json:"command"`
// PassEnv names variables whose current values are inherited on top of the
// documented base environment. Names only — inline secret values are not
// supported, and a passed value is never logged or rendered.
PassEnv []string `json:"passEnv,omitempty"`
// Enabled defaults to true; a configured instance is on unless it says
// otherwise.
Enabled bool `json:"enabled"`
// Timeout is the per-resolve timeout, clamped to [1s, 60s].
Timeout time.Duration `json:"timeout,omitempty"`
}
TerminalResourceProviderConfig is one configured provider instance.
type TerminalResourcesConfig ¶ added in v1.0.3
type TerminalResourcesConfig struct {
// Providers is ordered, and the order is matcher precedence.
Providers []TerminalResourceProviderConfig `json:"providers,omitempty"`
}
TerminalResourcesConfig is the app-level `terminalResources` section.
It is app-level rather than per-plugin because providers serve both the project Workspace and the global Workspaces browser, and neither owns them. It is also deliberately explicit: Sidecar never scans a plugin directory, never executes every sidecar-* binary on PATH, and never lets a repository declare a provider. A repository must not be able to cause Sidecar to run code merely by being opened.
A process boundary is crash isolation, not a sandbox. Enabling a provider trusts that executable with the user's full OS privileges.
func (TerminalResourcesConfig) DisabledProviderIDs ¶ added in v1.0.3
func (c TerminalResourcesConfig) DisabledProviderIDs() []string
DisabledProviderIDs returns the IDs of instances that are configured but off. They keep a diagnostic status and contribute no matchers.
func (TerminalResourcesConfig) EnabledProviders ¶ added in v1.0.3
func (c TerminalResourcesConfig) EnabledProviders() []TerminalResourceProviderConfig
EnabledProviders returns the enabled instances in configuration order.
type ThemeConfig ¶
type ThemeConfig struct {
Name string `json:"name"`
Community string `json:"community,omitempty"` // community scheme name (resolved at runtime)
Overrides map[string]interface{} `json:"overrides,omitempty"` // user customizations on top
}
ThemeConfig configures the color theme.
type UIConfig ¶
type UIConfig struct {
ShowClock bool `json:"showClock"`
Theme ThemeConfig `json:"theme"`
NerdFontsEnabled bool `json:"nerdFontsEnabled"` // enables Nerd Font glyphs (pill tabs, icons, etc.)
LastOpenInApp string `json:"lastOpenInApp,omitempty"` // global fallback for last app used to open projects
// TerminalTitle templates the terminal window/tab title. Supported
// variables: {project} {worktree} {plugin} {dir}. Empty disables retitling.
TerminalTitle string `json:"terminalTitle"`
}
UIConfig configures UI appearance.
type WorkspacePluginConfig ¶
type WorkspacePluginConfig struct {
// DirPrefix prefixes workspace directory names with the repo name (e.g., 'myrepo-feature-auth')
// This helps associate conversations with the repo after workspace deletion. Default: true.
DirPrefix bool `json:"dirPrefix"`
// DefaultAgentType sets the default agent family selected when creating a workspace.
// Uses workspace.AgentType values (e.g. "claude", "codex", "opencode", "grok").
DefaultAgentType string `json:"defaultAgentType,omitempty"`
// Agents is an ordered allowlist of agent type IDs shown in Create Shell, Create Worktree,
// and Start Agent pickers (e.g. ["claude","codex","grok"]). Empty/omitted shows all
// built-in UI agents. Unknown IDs are ignored. "None (attach only)" is always offered
// in pickers regardless of this list. Stored agent types on existing workspaces still
// resolve even if hidden from pickers.
Agents []string `json:"agents,omitempty"`
// AgentStart maps agent family (AgentType string) to default startup command.
// Example: {"claude":"claude", "opencode":"opencode --profile fast", "grok":"grok"}.
// Per-workspace .sidecar-agent-start still takes precedence when present.
AgentStart map[string]string `json:"agentStart,omitempty"`
// TmuxCaptureMaxBytes caps tmux pane capture size for the preview pane. Default: 2MB.
TmuxCaptureMaxBytes int `json:"tmuxCaptureMaxBytes"`
// ResizeDebounceMs is the shared interval for live-pane SIGWINCH during
// layout motion (divider drag, interactive correction). Default: 300.
// 0 restores per-event paint and poll-driven resize. Negative values
// become 300. Unlike TmuxCaptureMaxBytes, 0 is not treated as unset.
ResizeDebounceMs int `json:"resizeDebounceMs"`
// AutoCreateShell creates a shell session the first time the workspaces tab is
// focused in a session, when no shell sessions exist yet. The shell honors
// DefaultAgentType; with none set it is a plain shell. Default: false.
AutoCreateShell bool `json:"autoCreateShell"`
// InteractiveExitKey is the keybinding to exit interactive mode. Default: "ctrl+\".
// Examples: "ctrl+]", "ctrl+\\", "ctrl+x"
InteractiveExitKey string `json:"interactiveExitKey,omitempty"`
// InteractiveAttachKey is the keybinding to attach from interactive mode. Default: "ctrl+]".
// When pressed in interactive mode, exits interactive and attaches to the tmux session.
InteractiveAttachKey string `json:"interactiveAttachKey,omitempty"`
// InteractiveCopyKey is the keybinding to copy selection in interactive mode. Default: "alt+c".
InteractiveCopyKey string `json:"interactiveCopyKey,omitempty"`
// InteractivePasteKey is the keybinding to paste clipboard in interactive mode. Default: "alt+v".
InteractivePasteKey string `json:"interactivePasteKey,omitempty"`
// CopyOnSelect copies terminal selections when a drag completes. Default: false.
CopyOnSelect bool `json:"copyOnSelect,omitempty"`
// OverviewWorktreeScope controls whether activating a worktree on the cross-project
// Overview enters the project root or scopes Sidecar to that worktree. Valid values
// are "project" (the default) and "worktree".
OverviewWorktreeScope string `json:"overviewWorktreeScope,omitempty"`
// SidebarDisplay controls what information is shown in the workspace sidebar entries.
SidebarDisplay SidebarDisplayConfig `json:"sidebarDisplay"`
// WorktreeSetup controls repository artifacts Sidecar may copy or execute when
// creating a worktree. The creation confirmation always names the discovered
// files and hook and requires an explicit per-operation selection.
WorktreeSetup WorktreeSetupConfig `json:"worktreeSetup"`
}
WorkspacePluginConfig configures the workspace plugin.
type WorktreeSetupConfig ¶ added in v0.94.0
type WorktreeSetupConfig struct {
CopyEnvFiles bool `json:"copyEnvFiles"`
EnvFiles []string `json:"envFiles,omitempty"`
RunHook bool `json:"runHook"`
HookPath string `json:"hookPath,omitempty"`
HookRequired bool `json:"hookRequired"`
}
WorktreeSetupConfig configures the optional setup phase after git creates a worktree. Paths are relative to the canonical main worktree.