config

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config handles loading, saving, and validating user configuration from JSON files, including project settings, plugin options, keymaps, and UI preferences.

Panel enablement

Every embedded panel is turned on and off with its own config key, "plugins.<id>.enabled". That is what the Configuration surface writes and what the plugin descriptors read:

{
  "plugins": {
    "tasks": { "enabled": true },
    "notes": { "enabled": false }
  }
}

The "tasks_plugin" and "notes_plugin" feature flags are read-only aliases of those keys, kept for one minor release. A flag answers only while its config key is absent, and nothing writes one back: a user who set a flag keeps it, and the first time they use the switch the config key becomes the answer. The release that retires the aliases removes the flags.

The embedded Tasks tab is off until it is asked for. It 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.

External plugins

"plugins.external" configures plugins that speak the Sidecar plugin protocol. "terminalResources.providers" is the frozen resource protocol's own section and is a read-only alias of it: entries there are still loaded and still dispatched on the resource identifier, and Save never writes the section, so it stays exactly as the user wrote it until the release that rewrites those entries into "plugins.external".

Index

Constants

View Source
const (
	OverviewWorktreeScopeProject  = "project"
	OverviewWorktreeScopeWorktree = "worktree"
)
View Source
const (
	// RemoteManifestsOff is the default. The manifests vendored into the binary
	// are the only upstream source and Sidecar never reaches the network for
	// one.
	RemoteManifestsOff = "off"
	// RemoteManifestsHerdrDev is Herdr's own published catalog.
	RemoteManifestsHerdrDev = "herdr.dev"
)

The values detection.remoteManifests takes, besides an arbitrary catalog URL.

View Source
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.

View Source
const (
	ResumeAgentsOff  = "off"
	ResumeAgentsAsk  = "ask"
	ResumeAgentsAuto = "auto"
)

Session restore resumeAgents values.

View Source
const (
	NotesEditorBuiltin = "builtin"
	NotesEditorPane    = "pane"
)
View Source
const (
	// MaxExternalPlugins bounds how many instances may be configured under
	// plugins.external.
	MaxExternalPlugins = MaxTerminalResourceProviders
	// MaxExternalPluginIDChars bounds an instance ID, which is a persisted key.
	MaxExternalPluginIDChars = MaxTerminalResourceProviderIDChars
)

External plugin bounds. They are the terminal resource provider bounds under a second name rather than new numbers: one host runs both kinds of child process, so one set of limits governs them. Restating them here keeps internal/config a leaf package, and TestPluginBoundsMatchTheProtocol in internal/pluginhost fails if they ever drift from internal/resource.

View Source
const (
	// PluginScopeGlobal is the only scope v1 supports: the plugin is built
	// once, survives project switches, and reads project context per call.
	PluginScopeGlobal = "global"
	// PluginScopeProject is accepted by the parser and refused by validation
	// with a clear message. It is named here so the refusal can be specific
	// rather than "unknown scope".
	PluginScopeProject = "project"
)

The values plugins.external[].scope takes.

View Source
const (
	// PluginPlacementTab is a navbar entry.
	PluginPlacementTab = "tab"
	// PluginPlacementPanes means the plugin's content can open as leaves in
	// the pane decks of both workspace projections.
	PluginPlacementPanes = "panes"
)

The values plugins.external[].placements takes. They are the string forms of plugin.Placement; internal/plugin cannot be imported from a leaf package.

View Source
const (
	// PluginSourceExternal is plugins.external[], the section this plan added.
	PluginSourceExternal = "plugins.external"
	// PluginSourceTerminalResources is terminalResources.providers[], the
	// frozen resource protocol's section. Entries there are dispatched with the
	// old protocol identifier and keep working unchanged.
	PluginSourceTerminalResources = "terminalResources.providers"
)

The config sections an external plugin instance can be read from.

View Source
const (
	// MaxTerminalResourceProviders bounds how many instances may be configured.
	MaxTerminalResourceProviders = 16
	// MaxTerminalResourceProviderIDChars bounds an instance ID, which is a
	// persisted key.
	MaxTerminalResourceProviderIDChars = 64
	// MaxTerminalResourceClaimHosts bounds how many hosts one instance may
	// claim, and MaxClaimHostChars bounds one claimed hostname.
	MaxTerminalResourceClaimHosts = 16
	MaxClaimHostChars             = 253
	// 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/pluginhost fails if the two ever drift.

View Source
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.

View Source
const DefaultTombstoneRetention = 14 * 24 * time.Hour

DefaultTombstoneRetention is how long a forgotten shell record is kept when the config says nothing. Two weeks is long enough to cover "I deleted that yesterday and want it back" plus a holiday, and short enough that a long-lived project's shells.json does not grow one record per shell ever forgotten.

View Source
const HerdrCatalogURL = "https://herdr.dev/agent-detection/index.toml"

HerdrCatalogURL is the index RemoteManifestsHerdrDev resolves to. It is Herdr's own DEFAULT_CATALOG_URL (src/detect/manifest_update.rs:17).

View Source
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.

View Source
const KeepTombstonesForever time.Duration = 0

KeepTombstonesForever is the sentinel a zero window carries: forgotten records are never expired. It is named so callers do not have to know that "forever" and 0 are the same statement.

View Source
const StickyExpiry time.Duration = 0

StickyExpiry is the sentinel a zero duration carries: a source whose toasts have no countdown.

Variables

View Source
var ErrHostNotFound = errors.New("host not found")

ErrHostNotFound is what a mutation returns when nothing is registered under the name it was given. It is a sentinel rather than a formatted string so a caller can distinguish "you named a host I do not have" from "the configuration could not be written" without reading the message — a CLI has to answer those two with different exit codes.

Functions

func AgentCatalogDir added in v1.14.0

func AgentCatalogDir() string

AgentCatalogDir returns the directory holding the user's agent catalog overlay: one TOML file per family, beside the config file.

It is derived from ConfigPath rather than from $HOME so that -config moves it with everything else, the way state.json and debug.log already move (td-8d18de). agentcatalog is a leaf package and cannot compute this itself, so this is the one place it is computed and agentcatalog.LoadOverlay takes it as an argument.

func AssertIsolatedPath added in v0.93.0

func AssertIsolatedPath(path string) error

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 ConfigPath

func ConfigPath() string

ConfigPath returns the path to the config file.

func ExpandPath

func ExpandPath(path string) string

ExpandPath expands ~ to home directory.

func HostIDFor added in v1.11.0

func HostIDFor(host HostConfig) string

HostIDFor is the name an entry is known by: its ID, or its target when the ID is empty. It matches the defaulting hosts.FromConfig does, so the name a surface shows is the name the running registry uses.

func IsHostValueRejection added in v1.11.0

func IsHostValueRejection(err error) bool

IsHostValueRejection reports whether an error is a refused value.

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

func MoveProject(projectPath string, delta int) error

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 NormalizeClaimHost added in v1.3.0

func NormalizeClaimHost(entry string) (string, bool)

NormalizeClaimHost lowercases a claimed-hostname entry and reports whether it is a bare hostname. It is the single shape rule for claimHosts end to end: configuration validation refuses invalid entries with this, and the matcher snapshot sanitizes programmatically supplied sets with the same function, so a host that reaches the scanner has exactly the form URL host extraction produces.

The shape check is deliberately conservative: lowercase letters, digits, dots, hyphens, and interior underscores only. That rejects schemes (":"), ports (":"), paths ("/"), userinfo ("@"), wildcards ("*"), percent-escapes, whitespace, and empty strings in one stroke. Labels may not begin or end with a hyphen; underscores are tolerated anywhere for mDNS-style names.

func ParseNotificationExpiry added in v1.11.0

func ParseNotificationExpiry(raw string) (time.Duration, error)

ParseNotificationExpiry validates the persisted duration vocabulary.

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

func RemoveProject(projectPath string) error

RemoveProject drops a project from the configured list.

func ReservedPluginID added in v1.14.0

func ReservedPluginID(id string) (string, bool)

ReservedPluginID reports whether id names a built-in Sidecar surface, and what that surface is called. It is exported so `sidecar plugin add` can refuse a collision before it writes one, with the same message validation would have produced on the next load.

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

func Save(cfg *Config) error

Save writes the config to ~/.config/sidecar/config.json, preserving any keys it doesn't manage (e.g. "prompts").

func SaveCommunityTheme

func SaveCommunityTheme(communityName string, userOverrides map[string]interface{}) error

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

func SaveLastOpenInApp(projectPath, appID string) error

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 SaveNotifications added in v1.11.0

func SaveNotifications(mutate func(*NotificationsConfig)) error

SaveNotifications reloads immediately before applying a targeted mutation, validates the complete section, and writes only after validation succeeds.

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 SaveTheme

func SaveTheme(themeName string) error

SaveTheme updates only the theme name in config and saves.

func SaveThemeWithOverrides

func SaveThemeWithOverrides(themeName string, overrides map[string]interface{}) error

SaveThemeWithOverrides saves a theme name and full overrides map to config.

func SaveUI added in v1.0.0

func SaveUI(mutate func(*UIConfig)) error

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 ValidateHost added in v1.11.0

func ValidateHost(existing []HostConfig, host HostConfig, skipIndex int) string

ValidateHost reports why an entry may not be saved, or "" when it is fine. skipIndex excludes one existing entry from the uniqueness check so editing a host does not collide with itself; pass -1 when adding.

The returned string is what a user reads, so it says what is wrong in plain language rather than naming a field. Reachability is deliberately not questioned: the target is whatever the user's ssh_config resolves, and a host that is merely switched off today is still a host worth keeping registered.

func ValidateHostEnv added in v1.11.0

func ValidateHostEnv(entry string) string

ValidateHostEnv checks one KEY=VALUE entry. Env exists so a proof run can pin a host to an isolated tmux server and state tree, which means a malformed entry is not a cosmetic problem: it is isolation that silently did not apply.

func ValidateNotifications added in v1.11.0

func ValidateNotifications(c NotificationsConfig, configPath string) error

ValidateNotifications validates a prospective targeted save. Custom sound paths are resolved only for validation; the user's inspectable spelling is retained in config.json.

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"`
	// Notifications configures the notification system. It is app-level
	// because the store, the toasts, and the centre are the shell's, not any
	// plugin's.
	Notifications NotificationsConfig `json:"notifications,omitempty"`
	// Shells configures the shell records Sidecar owns in shells.json. It is
	// app-level because every surface writes those records, including
	// `sidecar shell forget` in a process that loads no plugins.
	Shells ShellsConfig `json:"shells,omitempty"`
	// Hosts registers other machines to observe over SSH. App-level because a
	// host contributes rows to the global Sessions browser, which belongs to
	// the shell rather than to any project or plugin.
	Hosts HostsConfig `json:"hosts,omitempty"`
	// Detection configures the agent screen-detection lane. App-level because
	// the detection manifests answer for every surface that shows an agent
	// state, and for `sidecar agent explain` in a process that loads no
	// plugins at all.
	Detection DetectionConfig `json:"detection,omitempty"`
}

Config is the root configuration structure.

func Default

func Default() *Config

Default returns the default configuration.

func Load

func Load() (*Config, error)

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

func LoadFrom(path string) (*Config, error)

LoadFrom loads configuration from a specific path. If path is empty, uses ~/.config/sidecar/config.json

func (*Config) PluginInstance added in v1.14.0

func (c *Config) PluginInstance(id string) (PluginInstance, bool)

PluginInstance returns one configured instance by ID.

func (*Config) PluginInstances added in v1.14.0

func (c *Config) PluginInstances() []PluginInstance

PluginInstances returns every configured external plugin instance in one ordered list: plugins.external entries first, then the terminalResources providers that are not already named there.

Order is precedence — for matchers, and for the order tabs and rows appear in — so the newer section leads. A terminalResources entry is projected onto the same type with the defaults its protocol implies: global scope, panes only, no navbar tab. It is dispatched with the old protocol identifier, which IsLegacyResourceProvider answers.

An ID configured in both sections is one plugin, not two: plugins.external wins and the legacy entry is dropped. That is the migration-safe reading — during the release where both sections are honoured, a user who has copied an entry forward gets the new one rather than two child processes with one identity — and `sidecar plugin list` reports which section answered.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks the configuration for errors.

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 DeliveryMode added in v1.11.0

type DeliveryMode string

DeliveryMode controls when an external notification channel is eligible.

const (
	DeliveryOff        DeliveryMode = "off"
	DeliveryBackground DeliveryMode = "background"
	DeliveryAlways     DeliveryMode = "always"

	NativeProviderAuto = "auto"
)

type DetectionConfig added in v1.12.0

type DetectionConfig struct {
	// RemoteManifests names where, if anywhere, Sidecar may fetch newer
	// agent-detection manifests from while it is running: "off" (the default),
	// "herdr.dev", or the http(s) URL of a catalog index.
	//
	// Anything else is refused rather than guessed at. An unrecognised value
	// could plausibly mean "the user wanted this on and mistyped it" or "the
	// user wanted it off and mistyped it", and only one of those two readings
	// can be wrong quietly: silently reading a typo as "on" would put a network
	// fetch behind a setting nobody successfully turned on. So a value this
	// package cannot resolve turns nothing on and is reported. The loader warns
	// and keeps the value verbatim so `sidecar agent manifests` can show it back
	// with the reason it was refused; RemoteCatalogURL is the gate, and it
	// returns an error for such a value, so no caller can fetch on it.
	RemoteManifests string `json:"remoteManifests,omitempty"`
}

DetectionConfig configures the screen-detection lane.

func (DetectionConfig) RemoteCatalogURL added in v1.12.0

func (c DetectionConfig) RemoteCatalogURL() (string, error)

RemoteCatalogURL resolves the setting to the catalog index URL to fetch, or "" when fetching is off. An unrecognised value is an error, never a URL and never a silent "on".

func (DetectionConfig) RemoteManifestsEnabled added in v1.12.0

func (c DetectionConfig) RemoteManifestsEnabled() bool

RemoteManifestsEnabled reports whether a runtime fetch is configured and resolvable.

type FeaturesConfig

type FeaturesConfig struct {
	Flags map[string]bool `json:"flags"`
}

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 HostConfig added in v1.11.0

type HostConfig struct {
	// ID is the local name shown in the UI and used to scope remote workspace
	// IDs. Defaults to Target when empty.
	ID string `json:"id,omitempty"`
	// Target is the ssh destination.
	Target string `json:"target"`
	// Binary is an explicit path to sidecar on that host. Usually unnecessary:
	// the connection runs through a login shell, which finds a Homebrew or
	// package-managed install. Set it when the host puts sidecar somewhere a
	// login shell does not look.
	Binary string `json:"binary,omitempty"`
	// Config is an optional -config path for the remote sidecar, so a host can
	// be observed against a config other than its user default.
	Config string `json:"config,omitempty"`
	// Env is extra environment for the remote Sidecar, as KEY=VALUE strings.
	//
	// It exists so a proof run can pin a host to an isolated tmux server and
	// state tree (TMUX_TMPDIR, XDG_STATE_HOME, SIDECAR_ISOLATED_STATE) exactly
	// as a local proof run does. Without it the isolation discipline stops at
	// the machine boundary, which is the point at which it matters most — the
	// remote tree belongs to someone else.
	Env []string `json:"env,omitempty"`
	// Disabled keeps a host registered but unconnected, which is what a user
	// wants for a machine that is off this week — deleting the entry to stop
	// the reconnect attempts would lose its settings.
	Disabled bool `json:"disabled,omitempty"`
}

HostConfig is one registered machine.

func AddHost added in v1.11.0

func AddHost(host HostConfig) (HostConfig, error)

AddHost registers a machine and returns the saved entry. It reloads first, so a host added here never clobbers a change made to the file since Sidecar started.

func FindHost added in v1.11.0

func FindHost(existing []HostConfig, id string) (HostConfig, int, bool)

FindHost looks up an entry by the name it is known by, returning its index in the list. It is state-free so a caller can resolve a name against a configuration it already has rather than loading a second copy.

func NormalizeHost added in v1.11.0

func NormalizeHost(host HostConfig) HostConfig

NormalizeHost trims every field and resolves the ID default, so what is written is what a reader would have inferred anyway. Env is copied rather than aliased: an entry saved from a form must not share a slice with the draft that produced it.

func RemoveHost added in v1.11.0

func RemoveHost(id string) (HostConfig, error)

RemoveHost drops a machine from the registry. Nothing on that machine is touched: the entry described how to watch it, not what runs there.

func UpdateHost added in v1.11.0

func UpdateHost(id string, mutate func(*HostConfig)) (HostConfig, error)

UpdateHost applies a change to the host known by id. mutate receives the live entry from a freshly loaded configuration; the result is normalized and validated before it is written, so an edit cannot save something an add would have refused.

type HostsConfig added in v1.11.0

type HostsConfig struct {
	List []HostConfig `json:"list"`
}

HostsConfig registers remote machines running Sidecar.

Reachability is deliberately not configured here. The target is whatever the user's ssh_config already resolves — their keys, their ProxyJump, their agent — so Sidecar adds no second place to describe how to reach a machine, and anything that works in `ssh <target>` works here.

type KeymapConfig

type KeymapConfig struct {
	Overrides map[string]string `json:"overrides"`
}

KeymapConfig holds key binding overrides.

type NativeNotificationsConfig added in v1.11.0

type NativeNotificationsConfig struct {
	Mode     DeliveryMode `json:"mode,omitempty"`
	Provider string       `json:"provider,omitempty"`
}

type NotesPluginConfig

type NotesPluginConfig struct {
	// Enabled is the unified plugins.<id>.enabled switch. It is a pointer
	// because "absent" is a third answer: with no key written, the deprecated
	// notes_plugin feature flag still decides, so a config written before this
	// key existed keeps working. Notes additionally requires the td panel,
	// which owns its persistence.
	Enabled *bool `json:"enabled,omitempty"`
	// DefaultEditor sets the default editor mode when pressing Enter on a note.
	// Values: "builtin" (default) or "pane" ($EDITOR in the Notes pane).
	DefaultEditor string `json:"defaultEditor,omitempty"`
}

NotesPluginConfig configures the notes plugin.

type NotificationSourceConfig added in v1.2.0

type NotificationSourceConfig struct {
	Toast  *bool    `json:"toast,omitempty"`
	Native *bool    `json:"native,omitempty"`
	Sound  SoundCue `json:"sound,omitempty"`
	Expiry string   `json:"expiry,omitempty"`
}

NotificationSourceConfig is the per-source override. Pointer booleans keep an explicit false distinct from an omitted value that inherits the source registry default.

type NotificationsConfig added in v1.2.0

type NotificationsConfig struct {
	Native     NativeNotificationsConfig           `json:"native,omitempty"`
	Sound      SoundNotificationsConfig            `json:"sound,omitempty"`
	QuietHours QuietHoursConfig                    `json:"quietHours,omitempty"`
	SSH        SSHNotificationsConfig              `json:"ssh,omitempty"`
	Sources    map[string]NotificationSourceConfig `json:"sources,omitempty"`
}

NotificationsConfig is the app-level `notifications` section. External delivery remains off unless the user explicitly changes a channel mode.

func DefaultNotificationsConfig added in v1.11.0

func DefaultNotificationsConfig() NotificationsConfig

DefaultNotificationsConfig is intentionally silent. Source defaults only become relevant after a channel is enabled.

func (NotificationsConfig) SourceExpiries added in v1.2.0

func (c NotificationsConfig) SourceExpiries() map[string]time.Duration

SourceExpiries resolves configured expiry overrides. This remains tolerant for direct JSON repair and older files; interactive and CLI writes go through ValidateNotifications and reject invalid values before saving.

type PluginInstance added in v1.14.0

type PluginInstance struct {
	PluginInstanceConfig
	// Source is PluginSourceExternal or PluginSourceTerminalResources.
	Source string
}

PluginInstance is one configured instance together with the section it was read from. The section is not decoration: it decides which protocol identifier the host dispatches with, and `sidecar plugin list` shows it so a user with entries in both places can see which file section answered.

func (PluginInstance) IsLegacyResourceProvider added in v1.14.0

func (p PluginInstance) IsLegacyResourceProvider() bool

IsLegacyResourceProvider reports whether this instance came from the frozen resource protocol's config section, and therefore must be dispatched with the old protocol identifier.

type PluginInstanceConfig added in v1.14.0

type PluginInstanceConfig struct {
	// ID is unique and stable. It is the persisted plugin key, the CLI name,
	// and the authoritative identity of the instance: a plugin 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"`
	// Scope is the plugin's lifecycle. Only PluginScopeGlobal is supported in
	// v1; see validatePluginInstances for why "project" is refused rather than
	// silently coerced.
	Scope string `json:"scope,omitempty"`
	// Placements are the surfaces this plugin's content can occupy, in
	// PluginPlacementTab / PluginPlacementPanes. An absent list means both.
	Placements []string `json:"placements,omitempty"`
	// Timeout is the per-call timeout for list, get, act and resolve, clamped
	// to [1s, 60s]. describe has its own fixed, shorter budget.
	Timeout time.Duration `json:"timeout,omitempty"`
	// ClaimHosts lists hostnames whose built-in URL spans this instance may
	// reclassify into resource spans. It is Sidecar instance configuration,
	// never a protocol field: the plugin does not know it exists. See
	// TerminalResourceProviderConfig.ClaimHosts for the whole-match rule.
	ClaimHosts []string `json:"claimHosts,omitempty"`
}

PluginInstanceConfig is one configured external plugin instance.

It is the terminal resource provider entry plus the two facts a protocol plugin needs and a resource provider never had: what its lifecycle is, and where its content may be shown. Everything else — the argv, the environment allowlist, the timeout, the claimed hosts — means exactly what it means for a resource provider, because the same host runs both.

The discovery policy is unchanged and worth restating, because it is the standing decision a plugin-directory proposal has to argue against: Sidecar never scans a directory, never executes every sidecar-* binary on PATH, never auto-enables anything, and never lets a repository declare a plugin. A process boundary is crash isolation, not a sandbox: configuring a plugin trusts that executable with the user's full OS privileges.

func (PluginInstanceConfig) HasPlacement added in v1.14.0

func (p PluginInstanceConfig) HasPlacement(placement string) bool

HasPlacement reports whether the instance declares p.

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"`
	// External is the ordered list of external plugin instances Sidecar hosts
	// over the plugin protocol. It lives under plugins because the settings
	// page already groups every plugin here and because enablement is
	// plugins.<id>.enabled for every class.
	External []PluginInstanceConfig `json:"external,omitempty"`
}

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
	// AddedAt is when this project was registered with Sidecar, written once by
	// AddProject. It is a registration date and nothing else: Sidecar does not
	// know when the directory or the repository came into being, so the project
	// switcher labels it "Date added" rather than "created".
	//
	// It is a pointer so a project registered before Sidecar recorded this
	// serializes no key at all, and absent stays honestly unknown. Nothing
	// backfills it — not the upgrade time, not the directory's birth time (which
	// changes on a clone or a restore), not the first commit (which is
	// repository history, not local registration).
	AddedAt *time.Time `json:"addedAt,omitempty"`
}

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 QuietHoursConfig added in v1.11.0

type QuietHoursConfig struct {
	Enabled bool   `json:"enabled,omitempty"`
	Start   string `json:"start,omitempty"`
	End     string `json:"end,omitempty"`
}

type SSHNotificationsConfig added in v1.11.0

type SSHNotificationsConfig struct {
	// ManagedHosts lets a local viewer deliver notifications forwarded by a
	// registered remote host. It controls local consumption and delivery, not
	// whether the read-only remote status stream exists.
	ManagedHosts bool `json:"managedHosts,omitempty"`
	// Terminal is the opt-in direct transport used when Sidecar itself runs in
	// an ordinary SSH terminal with no local viewer attached.
	Terminal TerminalNotifier `json:"terminal,omitempty"`
}

SSHNotificationsConfig covers the two independent remote-work paths. Both default off so an upgrade never moves remote notification text onto a local desktop, or starts writing escape sequences into a remote terminal, without the user asking for it.

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 SessionRestoreConfig added in v1.11.0

type SessionRestoreConfig struct {
	// RecreateShells recreates managed shells that were confirmed live in the
	// previous tmux server, under their own names and existing working
	// directories. It never replays an arbitrary --run command. Default: true.
	RecreateShells bool `json:"recreateShells"`
	// ResumeAgents is off | ask | auto. Default: ask, which paints the restored
	// shells and layout and then presents one grouped summary; nothing paid or
	// agent-mutating happens until the user confirms or runs the CLI. auto is
	// explicit standing authorization, and applies only to exact session
	// references an official integration reported.
	ResumeAgents string `json:"resumeAgents,omitempty"`
}

SessionRestoreConfig configures cold restore after a tmux server replacement.

The two settings are independent on purpose. Getting a terminal back in the right directory costs nothing and loses nothing, so it is on by default. Resuming a conversation starts a provider process that can spend money and change a repository, so it is a separate decision that defaults to asking.

type ShellsConfig added in v1.9.0

type ShellsConfig struct {
	// TombstoneRetention is how long a forgotten shell record stays restorable
	// before a later write drops it: a Go duration string ("336h", "90m"), a
	// whole number of days ("14d"), or "forever" / "never" to keep forgotten
	// records indefinitely.
	//
	// Empty or unreadable means DefaultTombstoneRetention. Expiring a tombstone
	// also lets a still-running session of that name be adopted again, which is
	// the point: after the window, Sidecar has no memory of the forget.
	TombstoneRetention string `json:"tombstoneRetention,omitempty"`
}

ShellsConfig is the app-level `shells` section: policy for the shell records Sidecar owns in each project's shells.json.

It is app-level rather than a workspace-plugin setting because the records are written by every surface — the workspace plugin, the global Sessions browser, and `sidecar shell forget|restore` in a process with no plugins at all — and a retention window that only one of them honoured would not be a retention window.

Example:

"shells": {
  "tombstoneRetention": "30d"
}

func (ShellsConfig) TombstoneRetentionWindow added in v1.9.0

func (c ShellsConfig) TombstoneRetentionWindow() time.Duration

TombstoneRetentionWindow resolves the configured retention into a duration. An unreadable value falls back to the default with a warning rather than failing the load — one bad duration must not cost the user their startup, and least of all their shell records.

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 SoundCue added in v1.11.0

type SoundCue string

SoundCue is the configured sound behavior for one notification source.

const (
	SoundNone      SoundCue = "none"
	SoundEvent     SoundCue = "event"
	SoundAttention SoundCue = "attention"
	SoundDone      SoundCue = "done"
	SoundFailure   SoundCue = "failure"
)

type SoundNotificationsConfig added in v1.11.0

type SoundNotificationsConfig struct {
	Mode          DeliveryMode `json:"mode,omitempty"`
	AttentionPath string       `json:"attentionPath,omitempty"`
	DonePath      string       `json:"donePath,omitempty"`
	FailurePath   string       `json:"failurePath,omitempty"`
}

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 {
	// Enabled is the unified plugins.<id>.enabled switch. See
	// NotesPluginConfig.Enabled for why it is a pointer; the deprecated alias
	// here is the tasks_plugin feature flag.
	Enabled *bool `json:"enabled,omitempty"`
	// 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.

There is deliberately no store/JSONL path: the embedded Tasks package uses Tasks' own configuration resolution.

type TerminalNotifier added in v1.11.0

type TerminalNotifier string

TerminalNotifier names the outer terminal Sidecar encodes a notification sequence for when it runs directly inside an SSH terminal. It selects a fixed encoder and nothing else: no command, TTY path, or raw escape is configurable.

const (
	TerminalNotifierOff     TerminalNotifier = "off"
	TerminalNotifierAuto    TerminalNotifier = "auto"
	TerminalNotifierGhostty TerminalNotifier = "ghostty"
	TerminalNotifierITerm2  TerminalNotifier = "iterm2"
	TerminalNotifierWezTerm TerminalNotifier = "wezterm"
	TerminalNotifierKitty   TerminalNotifier = "kitty"
)

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"`
	// ClaimHosts lists hostnames whose built-in URL spans this instance may
	// reclassify into resource spans. It is Sidecar instance configuration,
	// never a provider protocol field: the provider does not know it exists.
	//
	// Matching is case-insensitive; entries are normalized to lowercase here.
	// An entry must be a bare hostname — no scheme, no port, no path, no
	// wildcard. Listing "github.com" claims exactly hosts equal to
	// "github.com", not its subdomains and not every site a greedy pattern can
	// reach: a URL is reclassified only when this instance's own matcher also
	// matches the entire URL string.
	//
	// On a frame Sidecar's own Markdown renderer drew — a rendered preview, a
	// note, a document pane — the whole-match test may instead be satisfied by
	// the rendered link label. That is what lets an issue-key matcher claim
	// `[ZMS-37161](https://<site>.atlassian.net/browse/ZMS-37161)`, whose key
	// never appears in the destination in a shape any matcher recognizes. The
	// host gate is unchanged: the destination still decides who may claim.
	ClaimHosts []string `json:"claimHosts,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

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"`
	// TerminalBackgrounds controls how background colors carried in captured
	// pane output render:
	//
	//   - "auto" (default) keeps canvas detection: when one background covers
	//     nearly every painted row of the live grid, default-background cells
	//     are filled with it so a fullscreen TUI shows no seams.
	//   - "bounded" renders short background spans (diffs, highlights, a
	//     few-line block) but drops the background of any run longer than
	//     TerminalBackgroundSpanMax consecutive rows. An application that
	//     paints most of its output one color degrades to plain text instead of
	//     repainting the whole pane.
	//   - "never" drops every carried background; rows render as plain text.
	//
	// Unknown values fall back to "auto".
	TerminalBackgrounds string `json:"terminalBackgrounds,omitempty"`
	// TerminalBackgroundSpanMax is the row cap for "bounded" mode. Default: 12.
	TerminalBackgroundSpanMax int `json:"terminalBackgroundSpanMax,omitempty"`
	// 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"`
	// SessionRestore controls what happens on the first Sidecar start after the
	// tmux server that was hosting the managed shells has been replaced.
	SessionRestore SessionRestoreConfig `json:"sessionRestore"`
}

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.

Jump to

Keyboard shortcuts

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