config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackendKeyring = "keyring"
	BackendFile    = "file"
)

Credential-store backend names, reported by CredentialStore.Backend and surfaced to the UI so it can warn when secrets are kept unencrypted on disk.

View Source
const (
	AuthDefaultAPIKey = "api_key"
	AuthDefaultOAuth  = "oauth"
)

Auth-default kinds: which credential method a provider prefers when more than one is available. Stored as a small non-secret marker in the OS keychain (see ProviderAuthDefault) so the preference lives alongside the credentials it governs and is honored by credential resolution everywhere.

View Source
const DefaultClosedSessionRetentionMinutes = 7 * 24 * 60

DefaultClosedSessionRetentionMinutes is the default retention for closed session records: one week.

Variables

View Source
var ErrCredNotFound = errors.New("credential not found")

ErrCredNotFound is returned by a CredentialStore.Get/Delete when no secret is stored under the given user. It is the backend-agnostic equivalent of keyring.ErrNotFound.

Functions

func BootstrapHomeVixDir

func BootstrapHomeVixDir(homeVixDir, version string) error

BootstrapHomeVixDir writes default config, agent, and prompt files into homeVixDir. version is the running binary's build version ("dev" for unreleased builds).

Behaviour:

  • First run (no settings.json): seed everything from the embedded defaults and record the version in state.json.
  • Version change (state.json defaults_version differs from version, including a missing one): overwrite the managed files (settings.json, config/*.json, prompts/**, agents/**) with the embedded defaults, preserving each replaced file as <name>.bak, then record the version.
  • Same version: only re-seed managed config files that went missing.

func ClearProviderAuthDefault added in v0.4.0

func ClearProviderAuthDefault(provider string) error

ClearProviderAuthDefault removes a provider's default-method marker. A missing marker is not an error.

func CloseAllSessionsOnQuit added in v0.4.5

func CloseAllSessionsOnQuit() bool

CloseAllSessionsOnQuit reads the close_all_sessions_on_quit feature flag. Defaults to false: quitting vix leaves all session records open so they are restored on next launch. When true, quitting explicitly closes every session.

func ClosedSessionRetentionMinutes added in v0.4.5

func ClosedSessionRetentionMinutes() int

ClosedSessionRetentionMinutes reads sessions.closed_retention_minutes from ~/.vix/settings.json. Closed session records older than this are deleted by the daemon on startup. Defaults to one week when absent. 0 means never trim (settable only by editing settings.json — the TUI does not offer it).

func CompactionAuto added in v0.4.2

func CompactionAuto() bool

CompactionAuto reads compaction.auto from ~/.vix/settings.json. Defaults to true when absent.

func CompactionThreshold added in v0.4.2

func CompactionThreshold() float64

CompactionThreshold reads compaction.threshold from ~/.vix/settings.json. Defaults to 0.8 when absent.

func CredentialBackend added in v0.4.3

func CredentialBackend() string

CredentialBackend reports the active credential backend (BackendKeyring | BackendFile) so callers (the UI) can warn when secrets are kept in cleartext.

func DeleteProviderKey

func DeleteProviderKey(provider string) error

DeleteProviderKey removes the API key for the given provider from the credential store. It also clears any stored default-method marker so credential resolution falls back to whatever credential remains.

func DeleteProviderMethodKey added in v0.4.3

func DeleteProviderMethodKey(provider, methodID string) error

DeleteProviderMethodKey removes the stored key (and endpoint) for a specific method, clearing the provider's default marker when it pointed at this method.

func ElevenLabsAgentID

func ElevenLabsAgentID(paths VixPaths) string

ElevenLabsAgentID reads the elevenlabs.agent_id from the layered settings files (home then project, last non-empty wins). Falls back to the built-in default if no value is configured.

func ElevenLabsAuthMode

func ElevenLabsAuthMode(paths VixPaths) string

ElevenLabsAuthMode reads the elevenlabs.auth_mode from the layered settings files (home then project, last non-empty wins). Returns "public" by default. Set to "signed_url" to require a server-side ELEVENLABS_API_KEY instead.

func HomeVixDir

func HomeVixDir() string

HomeVixDir returns the path to ~/.vix/.

func JobsEnabled added in v0.5.0

func JobsEnabled() bool

JobsEnabled reads the jobs feature flag (the scheduled-jobs engine in vixd). Defaults to true; the VIX_DISABLE_JOBS environment variable overrides everything as an emergency kill switch.

func JobsMaxConcurrentRuns added in v0.5.0

func JobsMaxConcurrentRuns() int

JobsMaxConcurrentRuns reads jobs.max_concurrent_runs from ~/.vix/settings.json. Returns 0 when absent/invalid, letting the scheduler apply its default.

func KnownProviders added in v0.4.0

func KnownProviders() []string

KnownProviders returns the known provider ids in registry (stable) order.

func OAuthLoginID added in v0.4.0

func OAuthLoginID(provider string) string

OAuthLoginID returns the internal/auth login id for a provider's OAuth method, or "" when the provider has no OAuth login. Single source of truth for the provider→loginID mapping, shared by the UI and credential-status helpers.

func PrimaryEnvVar added in v0.4.0

func PrimaryEnvVar(provider string) string

PrimaryEnvVar returns the canonical API-key env var for a provider, used for "no credential, set X" error messages. Returns "" for providers with no API-key env var.

func ProviderAuthDefault added in v0.4.0

func ProviderAuthDefault(provider string) string

ProviderAuthDefault returns the stored default-method preference for a provider — AuthDefaultAPIKey, AuthDefaultOAuth, or "" when unset.

func ReadAgentsMD added in v0.4.2

func ReadAgentsMD() bool

ReadAgentsMD reads the read_agents_md feature flag. Defaults to false.

func ReadClaudeMD added in v0.4.2

func ReadClaudeMD() bool

ReadClaudeMD reads the read_claude_md feature flag. Defaults to false.

func ResolveEnvVar

func ResolveEnvVar(name string) (string, bool)

ResolveEnvVar checks the environment and .env files for a variable. Returns the value and true if found, or empty string and false.

func SetCloseAllSessionsOnQuit added in v0.4.5

func SetCloseAllSessionsOnQuit(v bool) error

SetCloseAllSessionsOnQuit writes the close_all_sessions_on_quit feature flag.

func SetClosedSessionRetentionMinutes added in v0.4.5

func SetClosedSessionRetentionMinutes(v int) error

SetClosedSessionRetentionMinutes writes sessions.closed_retention_minutes to ~/.vix/settings.json, preserving other keys.

func SetCompactionAuto added in v0.4.2

func SetCompactionAuto(v bool) error

SetCompactionAuto writes compaction.auto to ~/.vix/settings.json.

func SetCompactionThreshold added in v0.4.2

func SetCompactionThreshold(v float64) error

SetCompactionThreshold writes compaction.threshold to ~/.vix/settings.json.

func SetProviderAuthDefault added in v0.4.0

func SetProviderAuthDefault(provider, kind string) error

SetProviderAuthDefault stores the default-method preference for a provider.

func SetReadAgentsMD added in v0.4.2

func SetReadAgentsMD(v bool) error

SetReadAgentsMD writes the read_agents_md feature flag.

func SetReadClaudeMD added in v0.4.2

func SetReadClaudeMD(v bool) error

SetReadClaudeMD writes the read_claude_md feature flag.

func SetShowThinking

func SetShowThinking(v bool) error

SetShowThinking writes the show_thinking feature flag to ~/.vix/settings.json.

func SetTelemetryEnabled added in v0.4.2

func SetTelemetryEnabled(v bool) error

SetTelemetryEnabled writes the telemetry feature flag to ~/.vix/settings.json.

func SetToolOrchestrator added in v0.4.2

func SetToolOrchestrator(v bool) error

SetToolOrchestrator writes the tool_orchestrator feature flag.

func SetUpdateCheckEnabled added in v0.4.3

func SetUpdateCheckEnabled(v bool) error

SetUpdateCheckEnabled writes the update_check feature flag to ~/.vix/settings.json.

func ShowThinking

func ShowThinking() bool

ShowThinking reads the show_thinking feature flag from ~/.vix/settings.json. Returns false if the flag is absent (opt-in: thinking is hidden by default).

func StoreProviderKey

func StoreProviderKey(provider, key string) error

StoreProviderKey writes the API key for the given provider to the credential store (OS keychain, or the auth.json fallback when no keyring is available).

func StoreProviderMethodKey added in v0.4.3

func StoreProviderMethodKey(provider, methodID, key, baseURL string) error

StoreProviderMethodKey writes the API key for a specific credential method of a provider, plus the user-supplied base URL when the method requires one.

func TelemetryEnabled

func TelemetryEnabled() bool

TelemetryEnabled reads the telemetry feature flag from ~/.vix/settings.json. Returns true if the flag is absent (opt-out model).

func ToolOrchestrator added in v0.4.2

func ToolOrchestrator() bool

ToolOrchestrator reads the tool_orchestrator feature flag. Defaults to false.

func UpdateCheckEnabled added in v0.4.3

func UpdateCheckEnabled() bool

UpdateCheckEnabled reads the update_check feature flag from ~/.vix/settings.json. Returns true if the flag is absent (opt-out model): the daemon checks GitHub for newer releases at most once per day unless disabled.

func WriteState added in v0.4.3

func WriteState(path string, st State) error

WriteState atomically persists st to path, creating the parent directory if needed. A no-op (nil) when path is empty.

Types

type AuthKind added in v0.4.0

type AuthKind int

AuthKind classifies how a provider credential is obtained.

const (
	// APIKeyAuth is a static API key resolved from env / keychain / .env.
	APIKeyAuth AuthKind = iota
	// OAuthMintKey is an interactive OAuth login that yields a normal API key,
	// stored and resolved exactly like an APIKeyAuth key.
	OAuthMintKey
	// OAuthToken is an interactive OAuth login that yields a refreshable access
	// token, resolved via the auth subsystem.
	OAuthToken
	// NoneAuth marks a method that needs no credential (local servers such as
	// Ollama or llama.cpp). Resolution yields a fixed placeholder value so
	// client construction proceeds without a key.
	NoneAuth
)

type AuthMethod added in v0.4.0

type AuthMethod struct {
	Kind        AuthKind
	EnvVar      string                               // APIKeyAuth: env var name ("" to skip env lookup)
	Keyring     string                               // keychain "user" field for this method
	LoginID     string                               // OAuth*: internal/auth provider id
	BaseURL     string                               // optional endpoint override implied by this method
	HeaderStyle HeaderStyle                          // wire auth header style
	Extra       func(value string) map[string]string // optional extra headers derived from the credential value
	Label       string                               // human-readable name (also the method's identity; see ID)
	// RequiresBaseURL marks a method whose endpoint is supplied by the user and
	// stored alongside the key (e.g. MiMo Token Plan).
	RequiresBaseURL bool
	// BaseURLEnv, when set, names an env var that overrides the stored
	// user-supplied base URL for a RequiresBaseURL method.
	BaseURLEnv string
}

AuthMethod is one way to obtain a credential for a provider. A provider lists its methods in priority order; resolution returns the first that yields a value. The data now lives in the providers registry (providers.json); this struct is the in-memory projection credential resolution consumes.

func AuthMethodsFor added in v0.4.0

func AuthMethodsFor(provider string) []AuthMethod

AuthMethodsFor returns the ordered auth methods for a provider, or nil.

func (AuthMethod) ID added in v0.4.3

func (m AuthMethod) ID() string

ID returns a stable identity for this method within its provider, used as the default-method marker value when a provider exposes more than one method of the same kind. It prefers the explicit Label, falling back to the keyring user, the OAuth login id, and finally the kind name.

type Config

type Config struct {
	Model      string
	CWD        string
	Workdir    string
	ConfigDir  string // absolute path, or "" for default ~/.vix + ./.vix behavior
	Paths      VixPaths
	ForceInit  bool
	SocketPath string
}

Config holds client configuration.

func Load

func Load(forceInit bool, workdir, configDir, socketPath string) (*Config, error)

Load reads configuration from environment variables. The API key is no longer needed on the client side — the daemon handles it. If workdir is non-empty, it is resolved to an absolute path and used as the session working directory instead of os.Getwd(). If configDir is non-empty, it is resolved to an absolute path and used as the sole .vix config root (ignoring ~/.vix and ./.vix). If socketPath is empty, /tmp/vixd.sock is used.

type Credential

type Credential struct {
	Value        string
	Source       KeySource
	HeaderStyle  HeaderStyle       // "" (APIKeyHeader) means SDK-native API key header
	BaseURL      string            // "" means use the adapter's default endpoint
	ExtraHeaders map[string]string // applied verbatim on every request
}

Credential bundles an API key or OAuth token with everything an adapter needs to authenticate: its source (for display), the wire header style, an optional endpoint override, and any extra headers implied by the auth method.

func ResolveProviderCredential

func ResolveProviderCredential(provider string) Credential

ResolveProviderCredential resolves a Credential for the given provider by walking its AuthMethods (see providers.go) in priority order and returning the first that yields a value. API-key methods are resolved env → keychain → .env (env-first); OAuth methods are resolved from the keychain-backed auth subsystem (without refreshing). Returns a KeySourceNone credential when nothing is found.

func ResolveProviderCredentialFresh added in v0.4.0

func ResolveProviderCredentialFresh(ctx context.Context, provider string) Credential

ResolveProviderCredentialFresh behaves like ResolveProviderCredential but refreshes an expired stored OAuth access token first (bounded by ctx).

func (Credential) RequestOptions

func (c Credential) RequestOptions() []option.RequestOption

RequestOptions returns the appropriate Anthropic SDK options for this credential, driven by HeaderStyle and ExtraHeaders. BearerHeader sends an Authorization: Bearer token; otherwise the value is sent as the API key (x-api-key on Anthropic).

type CredentialStore added in v0.4.3

type CredentialStore interface {
	// Get returns the stored secret, or ErrCredNotFound when absent.
	Get(user string) (string, error)
	// Set stores (or overwrites) the secret.
	Set(user, secret string) error
	// Delete removes the secret, returning ErrCredNotFound when absent.
	Delete(user string) error
	// Backend names the active store (BackendKeyring | BackendFile).
	Backend() string
}

CredentialStore persists secrets keyed by a "user" string under the vix keyring service. Two backends implement it: the OS keyring (preferred) and a plaintext auth.json fallback for environments without a keyring (headless Linux, minimal containers). The "user" strings are the same the keyring uses (e.g. "<provider>-api-key", "<provider>-auth-default"), so storage and resolution stay consistent across backends.

type DaemonConfig

type DaemonConfig struct {
	HomeVixDir string
	// AuthToken is the shared-secret string the daemon will require on every
	// incoming socket message. Loaded from the file pointed at by vixd's
	// -auth-token-path flag (cmd/vixd/main.go). Empty means "no auth check"
	// — that mode exists for in-process tests and trusted-host embeddings;
	// production deployments always populate it.
	AuthToken string
}

DaemonConfig holds daemon-side configuration.

func LoadDaemonConfig

func LoadDaemonConfig(version string) (*DaemonConfig, error)

LoadDaemonConfig loads daemon configuration with defaults. version is the running binary's build version, used to refresh managed defaults in ~/.vix when it changes between runs.

type HeaderStyle added in v0.4.0

type HeaderStyle string

HeaderStyle selects how a credential authenticates an HTTP request.

const (
	// APIKeyHeader uses the SDK-native API key header: Anthropic sends
	// x-api-key, OpenAI-family SDKs send Authorization: Bearer <key>. It is the
	// zero value so an unset HeaderStyle behaves like a plain API key.
	APIKeyHeader HeaderStyle = ""
	// BearerHeader sends Authorization: Bearer <token> regardless of provider —
	// used for OAuth access tokens.
	BearerHeader HeaderStyle = "bearer"
)

type KeySource

type KeySource string

KeySource describes where the API key was found.

const (
	KeySourceEnv        KeySource = "env"
	KeySourceOAuthToken KeySource = "oauth-token"
	KeySourceKeychain   KeySource = "keychain"
	KeySourceEnvFile    KeySource = "dotenv"
	// KeySourceLocal marks a keyless local provider (NoneAuth): the credential
	// is a fixed placeholder the server ignores.
	KeySourceLocal KeySource = "local"
	KeySourceNone  KeySource = "none"
)

func ResolveProviderKey

func ResolveProviderKey(provider string) (key string, source KeySource)

ResolveProviderKey returns the resolved credential value and source for a provider. Thin wrapper over ResolveProviderCredential for callers that only need the key string.

type MethodStatus added in v0.4.3

type MethodStatus struct {
	ID              string `json:"id"`                 // AuthMethod.ID() — stable identity for the default marker
	Label           string `json:"label"`              // display label ("API Key", "Token Plan", "OAuth")
	OAuth           bool   `json:"oauth"`              // render as a token method rather than an API key
	Stored          bool   `json:"stored"`             // a credential is available (keychain key or stored OAuth login)
	Prefix          string `json:"prefix,omitempty"`   // first 10 chars of a stored API key, for display
	RequiresBaseURL bool   `json:"requires_base_url"`  // method carries a user-supplied endpoint
	BaseURL         string `json:"base_url,omitempty"` // the stored/env endpoint, for display
	IsDefault       bool   `json:"is_default"`         // this method is the effective default
}

MethodStatus is the stored-credential state of one user-manageable credential method (an API-key method the user enters, or an interactive OAuth login). Bearer-token env fallbacks (e.g. CLAUDE_CODE_OAUTH_TOKEN) are not surfaced as their own method.

type ProviderAuthStatus added in v0.4.0

type ProviderAuthStatus struct {
	Methods []MethodStatus `json:"methods"`
}

ProviderAuthStatus summarizes a provider's user-manageable credential methods and which one is the effective default. It is the single read the UI needs to render the authentication panel without touching the keychain or auth subsystem directly.

func GetProviderAuthStatus added in v0.4.0

func GetProviderAuthStatus(provider string) ProviderAuthStatus

GetProviderAuthStatus reports the per-method stored-credential state and the effective default method for a provider. When no preference is stored, the default is the first method with a stored credential, else the first method.

func (ProviderAuthStatus) Default added in v0.4.0

func (s ProviderAuthStatus) Default() string

Default returns the ID of the effective default method, or "" when none.

func (ProviderAuthStatus) HasCredential added in v0.4.3

func (s ProviderAuthStatus) HasCredential() bool

HasCredential reports whether any method has a stored/available credential.

type ProviderKey

type ProviderKey struct {
	Provider string
	Prefix   string // first 10 chars of the stored key, for display; empty if not stored
}

ProviderKey holds a provider name and a display prefix of its stored key.

func ListStoredProviderKeys

func ListStoredProviderKeys() []ProviderKey

ListStoredProviderKeys returns the stored key info for all known providers. The Prefix field holds the first 10 chars of the stored key (empty if not stored).

type State added in v0.4.3

type State struct {
	// LastUpdateCheck is the date (YYYY-MM-DD) of the most recent GitHub
	// release check. Empty when never checked.
	LastUpdateCheck string `json:"last_update_check,omitempty"`
	// LatestKnown is the newest release tag seen at the last check.
	LatestKnown string `json:"latest_known,omitempty"`
	// LatestURL is the release page for LatestKnown.
	LatestURL string `json:"latest_url,omitempty"`
	// Model is the user's chosen chat model spec (e.g. "openai/gpt-5.1"),
	// persisted when the user picks a model in the UI. Empty means use the
	// built-in default. Agent frontmatter `model:` (custom agents) still
	// overrides this.
	Model string `json:"model,omitempty"`
	// DefaultsVersion is the binary version that last seeded/refreshed the
	// managed default files (settings.json, config/*.json, prompts/**,
	// agents/**). A mismatch with the running version triggers a refresh.
	DefaultsVersion string `json:"defaults_version,omitempty"`
}

State is the global, non-project-scoped session bookkeeping persisted to state.json (see VixPaths.StateFile). Keep fields additive and tolerant of absence.

func ReadState added in v0.4.3

func ReadState(path string) State

ReadState loads state.json at path. A missing or unreadable file yields a zero State and no error — absence is normal.

type ThemeConfig

type ThemeConfig struct {
	Primary   string `json:"primary"`   // hex color like "#BC63FC"
	Secondary string `json:"secondary"` // hex color like "#A3FC63"
}

ThemeConfig holds user-configurable brand colors.

func LoadThemeConfig

func LoadThemeConfig(paths VixPaths) ThemeConfig

LoadThemeConfig reads theme colors from settings.json files in the order returned by paths.Settings() — home then project in normal mode, or just the override in config-dir mode.

type ToolBackendConfig

type ToolBackendConfig struct {
	Backend string `json:"backend"`
}

ToolBackendConfig holds a single tool's backend selection.

type ToolsConfig

type ToolsConfig struct {
	Grep ToolBackendConfig `json:"grep"`
	Glob ToolBackendConfig `json:"glob"`
}

ToolsConfig holds tool backend configuration.

type VixPaths

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

VixPaths resolves all .vix-relative filesystem paths for a session.

When Override is set, every path resolves under the override directory and neither ~/.vix nor cwd/.vix is consulted. This enables fully isolated runs that ignore the user's and project's real configuration.

When Override is empty (normal mode), Layers() returns [home, cwd/.vix] so callers can merge home-level defaults with project-level overrides.

func NewVixPaths

func NewVixPaths(override, home, cwd string) VixPaths

NewVixPaths constructs a resolver. override may be empty (normal mode). home should be the result of HomeVixDir() (may be empty if UserHomeDir fails). cwd is the session working directory.

func (VixPaths) AccessStatsDB

func (p VixPaths) AccessStatsDB() string

AccessStatsDB returns the sqlite path for per-session tool access stats. Override mode: override/access_stats.db. Normal mode: cwd/.vix/access_stats.db.

func (VixPaths) Agents

func (p VixPaths) Agents() []string

Agents returns the agents/ directories to scan, in load order (later wins).

func (VixPaths) AuthFile added in v0.4.3

func (p VixPaths) AuthFile() string

AuthFile returns the path of the plaintext credential fallback (auth.json), used only when no OS keyring is available. Credentials are user-global, so it lives alongside sessions: override mode uses override/auth.json; normal mode uses home/auth.json (empty when home is unavailable). It is deliberately not under cwd/.vix so secrets never land in a project repo.

func (VixPaths) Brain

func (p VixPaths) Brain() string

Brain returns the brain index directory. Override mode: override (brain lives directly in the override root). Normal mode: cwd/.vix.

func (VixPaths) ClaudeMD

func (p VixPaths) ClaudeMD() []string

ClaudeMD returns the CLAUDE.md paths to load, in order. Normal mode also includes the project root CLAUDE.md (outside .vix).

func (VixPaths) ConfigDir added in v0.4.2

func (p VixPaths) ConfigDir() string

ConfigDir returns the directory holding the split config files (workflow.json, languages.json). Override mode: override/config. Normal mode: home/config (home-only by design — these files are not layered with the project directory). Empty when home is unavailable in normal mode.

func (VixPaths) HeartbeatMD added in v0.5.0

func (p VixPaths) HeartbeatMD() string

HeartbeatMD returns the path of the user-global heartbeat whiteboard file read by the default heartbeat job's prompt. Override mode: override/heartbeat.md; normal mode: home/heartbeat.md.

func (VixPaths) History

func (p VixPaths) History() string

History returns the TUI input history file path.

func (VixPaths) Home

func (p VixPaths) Home() string

Home returns the home .vix directory. Empty in override mode or if unavailable.

func (VixPaths) IsOverride

func (p VixPaths) IsOverride() bool

IsOverride reports whether the session is running in config-dir override mode.

func (VixPaths) Jobs added in v0.5.0

func (p VixPaths) Jobs() string

Jobs returns the directory holding scheduled job specs (<id>.json files). Jobs are user-global like sessions — each spec carries its own cwd — so the store lives next to sessions/: override mode uses override/jobs; normal mode uses home/jobs (empty when home is unavailable, which disables the scheduler).

func (VixPaths) JobsState added in v0.5.0

func (p VixPaths) JobsState() string

JobsState returns the path of the machine-written job runtime state file (next/last run times, statuses, error counters), kept separate from the user-authored specs in Jobs() so spec files never churn. Override mode: override/jobs-state.json; normal mode: home/jobs-state.json.

func (VixPaths) LanguagesFile added in v0.4.2

func (p VixPaths) LanguagesFile() string

LanguagesFile returns the path to languages.json, or "" if unavailable.

func (VixPaths) Layers

func (p VixPaths) Layers() []string

Layers returns the ordered list of .vix root directories to read from. Override mode: [override] Normal mode: [home, cwd/.vix] (home first, later entries override earlier) Empty entries (e.g. unavailable home) are filtered out.

func (VixPaths) Logs

func (p VixPaths) Logs() string

Logs returns where LLM logs should be written for this session. Override mode: override/logs. Normal mode: home/logs (or "" if home empty).

func (VixPaths) Override

func (p VixPaths) Override() string

Override returns the override directory, or "" if not set.

func (VixPaths) Plans

func (p VixPaths) Plans() string

Plans returns the plans/ directory path.

func (VixPaths) Plugins

func (p VixPaths) Plugins() []string

Plugins returns the plugins/ directories to scan, in load order.

func (VixPaths) Primary

func (p VixPaths) Primary() string

Primary returns the write target for session-scoped state (history, plans, access stats when override is set, etc.). Override mode: override. Normal mode: cwd/.vix.

func (VixPaths) Project

func (p VixPaths) Project() string

Project returns the project-level .vix directory. Empty in override mode.

func (VixPaths) ProjectSettingsWrite

func (p VixPaths) ProjectSettingsWrite() string

ProjectSettingsWrite returns the settings.json path to use for persisting project-level edits (e.g. appending allowed directories). Override mode writes to the override dir; normal mode writes to cwd/.vix.

func (VixPaths) Providers added in v0.4.0

func (p VixPaths) Providers() []string

Providers returns the providers.json paths to merge, in load order (later overrides earlier). These overlay the binary's embedded providers.json.

func (VixPaths) Sessions added in v0.4.2

func (p VixPaths) Sessions() string

Sessions returns the directory where persisted session records live. Sessions are stored globally (not project-scoped): override mode uses override/sessions; normal mode uses home/sessions (empty if home is unavailable). Each record carries its own cwd so the daemon can filter the open list by the launching project.

func (VixPaths) SessionsClosed added in v0.4.2

func (p VixPaths) SessionsClosed() string

SessionsClosed returns the subdirectory holding closed sessions (retained on disk but not reopened on launch). Empty when Sessions() is empty.

func (VixPaths) SessionsOpen added in v0.4.2

func (p VixPaths) SessionsOpen() string

SessionsOpen returns the subdirectory holding open (TUI-visible) sessions. Empty when Sessions() is empty.

func (VixPaths) Settings

func (p VixPaths) Settings() []string

Settings returns the settings.json paths to merge, in load order.

func (VixPaths) Skills

func (p VixPaths) Skills() []string

Skills returns the skills/ directories to scan, in load order.

func (VixPaths) StateFile added in v0.4.3

func (p VixPaths) StateFile() string

StateFile returns the path to the global session-state file (state.json), used for cross-session bookkeeping that is not project-scoped — e.g. the once-per-day update-check record. Override mode: override/state.json. Normal mode: home/state.json (empty when home is unavailable).

func (VixPaths) WorkflowsFile added in v0.4.2

func (p VixPaths) WorkflowsFile() string

WorkflowsFile returns the path to workflow.json, or "" if unavailable.

Jump to

Keyboard shortcuts

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