Documentation
¶
Index ¶
- Constants
- Variables
- func AgentCapabilityCatalogDependencyPaths(agentDir string) (paths []string, err error)
- func AgentDefinitionDigest(agent AgentDef) (string, error)
- func AgentFallbackChainPath(agentName string) string
- func AgentLayerName(source WorkspaceDiscoverySource) string
- func ApplyConfigOverlayFile(path string, dst *Config) error
- func ApplyMarketplaceCatalogEnvironment(cfg *Config, getenv func(string) string)
- func BuiltinAgentNames() []string
- func BuiltinProviders() map[string]ProviderConfig
- func CanonicalCapabilityDigest(capability CapabilityDef) (string, error)
- func CanonicalProviderName(name string) string
- func CanonicalSkillSourcePath(path string) string
- func CloneProviderConfigs(providers map[string]ProviderConfig) map[string]ProviderConfig
- func CommandFingerprint(command string) string
- func CountProfileSecretRefRewrites(root, oldName, newName string) (int, error)
- func CustomSourceSlugs(paths []string) map[string]string
- func DeleteAgentDefinition(agentsRoot string, sourcePath string) (retErr error)
- func EnsureBootstrapAgent(homePaths HomePaths) (string, bool, error)
- func EnsureHomeLayout(paths HomePaths) error
- func HookDeclarationOverlayValues(decl hookspkg.HookDecl) map[string]any
- func HookDeclarations(hooksCfg HooksConfig, agents []AgentDef) ([]hookspkg.HookDecl, error)
- func IsReservedAgentName(name string) bool
- func IsUnrestrictedACPMode(mode string) bool
- func LoadHookDeclarationsFile(path string) ([]hookspkg.HookDecl, error)
- func NewAgentResourceCodec() (resources.KindCodec[AgentDef], error)
- func NewMCPServerResourceCodec() (resources.KindCodec[MCPServer], error)
- func NewVaultKeyProvider(home string, lookupEnv func(string) (string, bool)) vault.KeyProvider
- func NormalizeAgentName(name string) string
- func NormalizeToolConfigValue(kind ValueKind, value any) (any, error)
- func OverlayHookDeclarations(target WriteTarget) ([]hookspkg.HookDecl, error)
- func ParseDottedConfigPath(raw string) ([]string, error)
- func RedactStringMap(values map[string]string) map[string]string
- func RedactedConfigMap(cfg *Config) map[string]any
- func RedactedValue() string
- func ResolveAgentName(name string, defaults DefaultsConfig) (string, error)
- func ResolveHomeDir() (string, error)
- func ResolveOperatorHomeDir(homePaths HomePaths) (string, error)
- func ResolveOperatorHomeDirWithLookup(homePaths HomePaths, lookup func(string) (string, bool)) (string, error)
- func ResolvePath(path string) (string, error)
- func RewriteProfileSecretRefs(root, oldName, newName string) error
- func RoleMutableConfigKinds() map[string]ValueKind
- func RouteRetiredProviderWarnings(logger *slog.Logger)
- func SteerCapabilityValues() []string
- func ValidGatewayConnectionName(name string) bool
- func ValidateACPMethod(method string, path string) error
- func ValidateAgentName(name string) error
- func ValidateAuthoredAgentName(name string) error
- func ValidateCmdPaletteAlias(alias string) error
- func ValidateConfigWriteScope(scope WriteScope, path []string) error
- func ValidateFallbackRouteCommand(fallbackPath, command string) error
- func ValidateMCPClientMetadataURL(path string, raw string) error
- func ValidateMCPOAuthURL(path string, raw string) error
- func ValidateMCPServerName(name string) error
- func ValidateMCPStdioEnvName(path string, name string, secret bool) error
- func ValidateMarketplacePluginSources(sources []MarketplacePluginSourceConfig) error
- func ValidateResourceProfileName(name string) error
- func ValidateSkillSources(slugs []string) error
- func WorkspaceDotEnvFile(workspaceRoot string) string
- func WriteOverride(homePaths HomePaths, workspaceRoot string, target WriteTarget, path []string) (string, bool, error)
- type ACPOptionSelection
- type AgentDef
- func BuiltinAgentDef(name string) (AgentDef, bool)
- func CloneAgentDef(agent AgentDef) AgentDef
- func CreateAgentDefFile(path string, draft AgentDefinitionDraft, overwrite bool) (AgentDef, error)
- func DuplicateAgentDefinition(source AgentDef, targetDir string, draft AgentDefinitionDraft) (agent AgentDef, err error)
- func EditAgentDefFile(path string, mutate func(*AgentDef) error) (agent AgentDef, err error)
- func LoadAgentDef(name string, homePaths HomePaths) (AgentDef, error)
- func LoadAgentDefFile(path string) (agent AgentDef, err error)
- func LoadWorkspaceAgentDefs(rootDir string, additionalDirs []string, homePaths HomePaths, ...) ([]AgentDef, error)
- func ParseAgentDef(content []byte) (AgentDef, error)
- func RenderAgentDefinition(draft AgentDefinitionDraft) ([]byte, AgentDef, error)
- type AgentDefinitionDraft
- type AgentDefinitionRef
- type AgentOrigin
- type AgentRuntimeDefaults
- type AgentSkillsConfig
- type AgentsConfig
- type AppConfig
- type AttentionConfig
- type AutomationConfig
- type AutomationJob
- type AutomationSuggestionsConfig
- type AutomationTrigger
- type AutonomyConfig
- type CapabilityBrief
- type CapabilityCatalog
- type CapabilityDef
- type CmdPaletteConfig
- type Config
- func CloneConfig(source *Config) Config
- func DefaultWithHome(homePaths HomePaths) Config
- func DeleteMCPSidecarServer(homePaths HomePaths, workspaceRoot string, target WriteTarget, name string) (cfg Config, deleted bool, err error)
- func EditConfigOverlay(homePaths HomePaths, workspaceRoot string, target WriteTarget, ...) (Config, error)
- func EditConfigOverlayAndApply(homePaths HomePaths, workspaceRoot string, target WriteTarget, ...) (cfg Config, err error)
- func Load(opts ...LoadOption) (Config, error)
- func LoadForHome(homePaths HomePaths, opts ...LoadOption) (Config, error)
- func LoadGlobalConfig(homePaths HomePaths) (Config, error)
- func PutMCPSidecarServer(homePaths HomePaths, workspaceRoot string, target WriteTarget, ...) (cfg Config, err error)
- func SaveBootstrapConfig(homePaths HomePaths, provider string, model string) (Config, error)
- func (c *Config) ResolveAgent(agent AgentDef) (ResolvedAgent, error)
- func (c *Config) ResolveProvider(name string) (ProviderConfig, error)
- func (c *Config) ResolveSessionAgent(agent AgentDef, providerOverride string) (ResolvedAgent, error)
- func (c *Config) ResolveSessionAgentWithRuntime(agent AgentDef, overrides RuntimeOverrides) (ResolvedAgent, error)
- func (c *Config) RoleFieldSource(role RoleName, field string) string
- func (c *Config) SubagentResultMaxChars() int
- func (c *Config) Validate() error
- func (c *Config) ValidateAgentFallbackChain(agent AgentDef) error
- func (c *Config) WarnRetiredProviderReferences()
- type CoordinatorRoleConfig
- type DaemonConfig
- type DaemonLoadConfig
- type DaemonReloadTimeoutsConfig
- type DefaultsConfig
- type DiffEntry
- type DotEnvDiagnostic
- type DotEnvRepairError
- type DotEnvRepairReport
- type Entry
- type ExtensionsConfig
- type ExtensionsDevConfig
- type ExtensionsGitHubSourceConfig
- type ExtensionsGitSourceConfig
- type ExtensionsResourceRateLimitConfig
- type ExtensionsResourcesConfig
- type ExtensionsSourcesConfig
- type ExtensionsTrustConfig
- type FileError
- type GatewayAuthConfig
- type GatewayAuthRateLimitConfig
- type GatewayConfig
- type GatewayConnectionConfig
- type GatewayPairingConfig
- type GatewayStreamTicketConfig
- type GatewayVerifyConfig
- type GoalsConfig
- type HTTPConfig
- type HeartbeatConfig
- type HomePaths
- type HooksConfig
- type LaunchCommand
- type LimitsConfig
- type LoadOption
- type LogConfig
- type LoopAdmissionDefaultConfig
- type LoopAutopauseRule
- type LoopBreakerConfig
- type LoopBudgetDefaultConfig
- type LoopDefaultConfig
- type LoopGatesDefaultConfig
- type LoopInputDefaultSources
- type LoopInputDefaults
- type LoopLivenessDefaultConfig
- type LoopNoProgressDefaultConfig
- type LoopPredicateDefaultConfig
- type LoopRequestsDefaultConfig
- type LoopResumeDefaultConfig
- type LoopRetryDefaultConfig
- type LoopWaitDefaultConfig
- type LoopsConfig
- type LoopsDefaultsConfig
- type MCPAuthConfig
- type MCPAuthRegistration
- type MCPConfig
- type MCPOAuthConfig
- type MCPServer
- func LoadMCPServersJSONFile(path string) ([]MCPServer, error)
- func MergeMCPServers(base []MCPServer, overlay []MCPServer) []MCPServer
- func OverrideMCPServers(base []MCPServer, overlay []MCPServer) []MCPServer
- func ParseMCPServersJSON(content []byte, source string) ([]MCPServer, error)
- func RedactedMCPServer(server MCPServer) MCPServer
- type MCPServerTransport
- type MarketplaceCatalogConfig
- type MarketplacePluginSourceConfig
- type MarketplaceRuntimeConfig
- type ModelCatalogConfig
- type ModelCatalogSourcesConfig
- type ModelsDevSourceConfig
- type ObservabilityConfig
- type ObservabilityTranscriptConfig
- type OverlayEditor
- func (e *OverlayEditor) Bytes() ([]byte, error)
- func (e *OverlayEditor) Delete(path []string) error
- func (e *OverlayEditor) DeleteArrayTableItem(path []string, nameField string, name string) (bool, error)
- func (e *OverlayEditor) HasPath(path []string) bool
- func (e *OverlayEditor) SetTable(path []string, values map[string]any) error
- func (e *OverlayEditor) SetValue(path []string, value any) error
- func (e *OverlayEditor) UpsertArrayTableItem(path []string, nameField string, name string, values map[string]any) error
- type PathDenial
- type PathPolicy
- type PermissionMode
- type PermissionsConfig
- type ProfileLayerDiagnostic
- type ProviderAuthMode
- type ProviderConfig
- func (p ProviderConfig) EffectiveACPMethod() string
- func (p ProviderConfig) EffectiveAuthMode() ProviderAuthMode
- func (p ProviderConfig) EffectiveCredentialSlots() []ProviderCredentialSlot
- func (p ProviderConfig) EffectiveEnvPolicy() ProviderEnvPolicy
- func (p ProviderConfig) EffectiveHarness() ProviderHarness
- func (p ProviderConfig) EffectiveHomePolicy() ProviderHomePolicy
- func (p ProviderConfig) EffectiveNoneSecurity() ProviderNoneSecurity
- func (p ProviderConfig) RequiresRuntimeModel() bool
- func (p ProviderConfig) RuntimeProviderName(providerName string) string
- func (p ProviderConfig) SessionMCPEnabled() bool
- type ProviderCredentialSlot
- type ProviderEnvPolicy
- type ProviderHarness
- type ProviderHomePolicy
- type ProviderModelConfig
- type ProviderModelsConfig
- type ProviderModelsDiscoveryConfig
- type ProviderNoneSecurity
- type ProviderReasoningConfig
- type QuietPolicy
- type ReasoningApplyStrategy
- type RedactConfig
- type ResolvedAgent
- type ResolvedCoordinatorRole
- type ResolvedRuntimeSources
- type RoleConfig
- type RoleFallback
- type RoleFieldSources
- type RoleName
- type RolesConfig
- type RootKind
- type RuntimeOverrides
- type RuntimeValueSource
- type SchedulerConfig
- type SessionAttachmentsConfig
- type SessionAttachmentsRetentionConfig
- type SessionBusyInputConfig
- type SessionConfig
- type SessionDeriveConfig
- type SessionEnv
- type SessionEnvBinding
- type SessionLimitsConfig
- type SessionMessagingConfig
- type SessionStopConfig
- type SessionSupervisionConfig
- type ShellConfig
- type ShellSessionScope
- type ShellSessionSort
- type ShellSessionsConfig
- type SkillRootSpec
- type SkillSourceOverridePresence
- type SkillSourcePreset
- type SkillSourceValidationError
- type SkillsConfig
- type SoulConfig
- type SteerCapability
- type SubagentsConfig
- type TaskConfig
- type TaskOrchestrationConfig
- type TaskOrchestrationProfileConfig
- type TaskOrchestrationReviewConfig
- type TaskRecoveryConfig
- type TerminalConfig
- type ToolsArtifactsConfig
- type ToolsClarifyConfig
- type ToolsConfig
- type ToolsExternalDefault
- type ToolsHostedMCPConfig
- type ToolsPolicyConfig
- type UnknownKeysError
- type ValidationError
- type ValueKind
- type VaultConfig
- type WindowManagerBindingConfig
- type WindowManagerConfig
- type WindowManagerGapsConfig
- type WindowManagerSnapConfig
- type WorkspaceDiscoveryRoot
- type WorkspaceDiscoverySource
- type WorktreesConfig
- type WriteScope
- type WriteTarget
- type WriteTargetKind
Constants ¶
const ( // AgentNameMaxLength bounds authored agent identities. AgentNameMaxLength = 106 // AgentNamePattern is the canonical grammar for authored agent identities // and references to them. AgentNamePattern = `^` + agentNamePatternBody + `$` // OptionalAgentNamePattern accepts an empty canonical reference for fields // whose empty value means clear or inherit. OptionalAgentNamePattern = `^(?:|` + agentNamePatternBody + `)$` )
const ( // DefaultSchedulerFanOutAfter is the wake count before the convergence ladder fans out. DefaultSchedulerFanOutAfter = 2 // DefaultSchedulerSpawnAfter is the wake count before a capability-matched worker is spawned. DefaultSchedulerSpawnAfter = 4 // DefaultSchedulerEventAfter is the wake count before the canonical starved event is emitted. DefaultSchedulerEventAfter = 6 // DefaultSchedulerNeedsAttentionAfter is the wake count before a run is parked needs_attention. DefaultSchedulerNeedsAttentionAfter = 10 // DefaultSchedulerMinQueuedAge is the queued age before a claimable run starts escalating. DefaultSchedulerMinQueuedAge = 2 * time.Minute // DefaultBlockRecurrenceLimit is the default same-kind re-block count before escalation. DefaultBlockRecurrenceLimit = configdefaults.BlockRecurrenceLimit )
const ( // DirName is the CompozyOS directory name used for both the global home and workspace overlays. DirName = ".compozy" // ConfigName is the standard TOML configuration filename. ConfigName = "config.toml" )
const ( // DefaultDaemonLoadAgentNiceness is the background CPU niceness applied to // agent process groups. Ten matches nice(1)'s default: under contention a // niced tree gets roughly a tenth of a normal-priority tree's CPU on Linux // CFS (weight 110 vs 1024), so tests, linters, and builds an agent launches // stop starving the desktop UI, while an idle host still runs them at full speed. DefaultDaemonLoadAgentNiceness = 10 // DefaultDaemonLoadAdmissionThreshold is the normalized 1-minute load // (load average / logical CPUs) above which background work waits. DefaultDaemonLoadAdmissionThreshold = 1.5 // DefaultDaemonLoadAdmissionMaxWait bounds one background admission wait. DefaultDaemonLoadAdmissionMaxWait = 2 * time.Minute )
const ( // DotEnvStatusMissing reports that no .env file exists at the requested path. DotEnvStatusMissing = "missing" // DotEnvStatusValid reports that the .env file is structured and needs no repair. DotEnvStatusValid = "valid" // DotEnvStatusRepairable reports that the .env file can be repaired explicitly. DotEnvStatusRepairable = "repairable" // DotEnvStatusRepaired reports that the .env file was safely rewritten. DotEnvStatusRepaired = "repaired" // DotEnvStatusUnsupported reports that Compozy found content it will not rewrite. DotEnvStatusUnsupported = "unsupported" )
const ( // AgentsDirName is the directory used for persisted agent definitions. AgentsDirName = "agents" // SkillsDirName is the directory used for persisted user skills. SkillsDirName = "skills" // LoopsDirName is the directory used for persisted user loop definitions. LoopsDirName = LoopsConfigKey // ProfilesDirName is the directory used for profile-owned state. ProfilesDirName = "profiles" // DefaultProfileDirName is the permanent default profile directory. DefaultProfileDirName = "default" // SessionsDirName is the directory used for persisted session state. SessionsDirName = "sessions" // ToolArtifactsDirName is the directory used for retained oversized tool results. ToolArtifactsDirName = "tool-artifacts" // SessionAttachmentsDirName is the directory used for persisted session attachments. SessionAttachmentsDirName = "session-attachments" // RestartsDirName is the directory used for persisted daemon restart operations. RestartsDirName = "restarts" // LogsDirName is the directory used for structured logs. LogsDirName = "logs" // GatewayDirName is the directory used for client-local gateway state. GatewayDirName = "gateway" // GatewayCredentialsDirName is the private gateway credential directory. GatewayCredentialsDirName = "credentials" // BinDirName is the directory for runtime binaries managed by CompozyOS. BinDirName = "bin" // DatabaseName is the global database filename. DatabaseName = "compozy.db" // DaemonSocketName is the daemon UDS filename. DaemonSocketName = "daemon.sock" // DaemonLockName is the daemon file-lock name. DaemonLockName = "daemon.lock" // UpdateLockName is the cross-process runtime mutation lock name. UpdateLockName = "update.lock" // DaemonInfoName is the daemon metadata filename. DaemonInfoName = "daemon.json" // LogFileName is the structured daemon log filename. LogFileName = "compozy.log" // AppStateFileName is the desktop shell state filename. AppStateFileName = "app.json" // UpdateOperationFileName is the live host update journal filename. UpdateOperationFileName = "update-operation.json" // UpdateOperationLockName is the stable lock guarding the update journal. UpdateOperationLockName = "update-operation.lock" // UpdateHistoryFileName is the terminal update audit filename. UpdateHistoryFileName = "update-history.jsonl" // DesktopProvenanceFileName records ownership of the bundled runtime. DesktopProvenanceFileName = ".desktop-provenance.json" // AgentDefinitionFileName is the canonical file name for persisted agent definitions. AgentDefinitionFileName = "AGENT.md" )
const ( // LoopsConfigKey is the top-level Loop configuration section. LoopsConfigKey = "loops" // LoopInputsConfigKey is the dynamic per-Loop input-default section. LoopInputsConfigKey = "inputs" )
const ( DefaultMarketplaceCatalogBaseURL = "https://raw.githubusercontent.com/compozy/compozy/main/catalog" DefaultMarketplaceCatalogTTL = "1h" DefaultMarketplaceCatalogTimeout = "10s" // MarketplaceCatalogBaseURLEnv selects a runtime-only catalog source without persisting it. MarketplaceCatalogBaseURLEnv = "COMPOZY_MARKETPLACE_CATALOG_BASE_URL" )
const ( RoleFieldSourceDefault = "default" RoleFieldSourceGlobal = "global" RoleFieldSourceProfile = "profile" RoleFieldSourceWorkspace = "workspace" RoleFieldSourceWorkspaceProfile = "workspace_profile" RoleFieldEnabled = "enabled" RoleFieldAgent = "agent" RoleFieldProvider = "provider" RoleFieldModel = "model" RoleFieldReasoning = "reasoning_effort" RoleFieldSpeed = "speed" RoleFieldACPOptions = "acp_options" RoleFieldFallbacks = "fallback_chain" )
const ( // DefaultCoordinatorTTL is the default TTL for [roles.coordinator]. DefaultCoordinatorTTL = 2 * time.Hour // MinCoordinatorTTL is the shortest coordinator TTL accepted by config validation. MinCoordinatorTTL = time.Minute // MaxCoordinatorTTL is the longest coordinator TTL accepted by config validation. MaxCoordinatorTTL = 24 * time.Hour // DefaultCoordinatorMaxChildren is the safe per-coordinator child-session cap. DefaultCoordinatorMaxChildren = 5 // MaxCoordinatorChildren is the hard MVP cap for coordinator child sessions. MaxCoordinatorChildren = 5 // DefaultCoordinatorMaxActiveSessionsPerWorkspace caps managed coordinator and worker sessions. DefaultCoordinatorMaxActiveSessionsPerWorkspace = 5 )
const ( // DefaultSessionAttachmentMaxFileBytes is the per-file admission ceiling. DefaultSessionAttachmentMaxFileBytes int64 = 10 << 20 // DefaultSessionAttachmentMaxFilesPerPrompt is the per-prompt attachment count ceiling. DefaultSessionAttachmentMaxFilesPerPrompt = 10 // DefaultSessionAttachmentRetentionMaxCount is the retained attachment count ceiling. DefaultSessionAttachmentRetentionMaxCount = 200 // DefaultSessionAttachmentRetentionMaxBytes is the retained attachment byte ceiling. DefaultSessionAttachmentRetentionMaxBytes int64 = 1 << 30 // DefaultSessionAttachmentRetentionMaxAge is the retained attachment age ceiling. DefaultSessionAttachmentRetentionMaxAge = 720 * time.Hour )
const ( // DefaultSessionDeriveMaxReplayBytes bounds the carried context of a continued or forked session. DefaultSessionDeriveMaxReplayBytes = 131072 // DefaultSessionDeriveMaxMessageBytes caps one carried message body. DefaultSessionDeriveMaxMessageBytes = 16384 )
const ( SkillSourceCompozy = "compozy" SkillSourceAgents = "agents" SkillSourceClaude = "claude" )
const ( // MaxTaskOrchestrationRuntime is the largest accepted runtime watchdog budget. MaxTaskOrchestrationRuntime = 24 * time.Hour // DefaultTaskDesignatedRunMax is the default bounded sibling-run fan-out size. DefaultTaskDesignatedRunMax = 5 // MaxTaskDesignatedRunMax is the largest accepted sibling-run fan-out size. MaxTaskDesignatedRunMax = 5 // DefaultTaskMaxActiveRunsPerWorkspace bounds simultaneous task execution per workspace. DefaultTaskMaxActiveRunsPerWorkspace = 16 DefaultTaskStatusProjectionQueueSize = 64 DefaultTaskStatusProjectionTimeout = 5 * time.Second TaskCoordinatorModeInherit = "inherit" TaskCoordinatorModeGuided = "guided" TaskWorkerModeInherit = "inherit" TaskWorktreeModeInherit = "inherit" TaskWorktreeModeNone = "none" TaskWorktreeModeRef = "ref" TaskWorktreeModePerRun = "per_run" TaskReviewPolicyNone = "none" TaskReviewPolicyOnSuccess = "on_success" TaskReviewPolicyOnFailure = "on_failure" TaskReviewPolicyAlways = "always" TaskReviewFailureBlockTask = "block_task" TaskReviewFailureFailTask = "fail_task" )
const ( DefaultTerminalScrollbackBytes = 1 << 20 DefaultTerminalDetachedTTL = 24 * time.Hour DefaultTerminalExitRetention = 15 * time.Minute DefaultTerminalRecordingRetentionDays = 30 DefaultTerminalMaxPerWorkspace = 8 DefaultTerminalMaxPerDaemon = 32 DefaultTerminalMaxSubscribers = 16 )
const ( // DefaultToolsMaxResultBytes is the TechSpec default result budget for descriptors without one. DefaultToolsMaxResultBytes int64 = 256 << 10 // MaxToolsMaxResultBytes bounds config-level default result budgets. MaxToolsMaxResultBytes int64 = 16 << 20 // DefaultToolsApprovalTimeoutSeconds is the TechSpec default approval wait. DefaultToolsApprovalTimeoutSeconds = 120 // MinToolsApprovalTimeoutSeconds is the smallest supported approval wait. MinToolsApprovalTimeoutSeconds = 1 // MaxToolsApprovalTimeoutSeconds is the largest supported approval wait. MaxToolsApprovalTimeoutSeconds = 600 // DefaultHostedMCPBindNonceTTLSeconds is the TechSpec default hosted MCP bind window. DefaultHostedMCPBindNonceTTLSeconds = 30 // MinHostedMCPBindNonceTTLSeconds is the smallest supported hosted MCP bind window. MinHostedMCPBindNonceTTLSeconds = 1 // MaxHostedMCPBindNonceTTLSeconds is the largest supported hosted MCP bind window. MaxHostedMCPBindNonceTTLSeconds = 300 // DefaultToolsClarifyTimeout is the boot-snapshotted clarification wait (zero means unbounded). DefaultToolsClarifyTimeout time.Duration = 0 // MinToolsClarifyTimeout is the smallest supported clarification wait. MinToolsClarifyTimeout = time.Second // MaxToolsClarifyTimeout is the largest supported clarification wait. MaxToolsClarifyTimeout = 24 * time.Hour // DefaultToolsArtifactMaxCount is the retained artifact count ceiling. DefaultToolsArtifactMaxCount = 200 // DefaultToolsArtifactMaxBytes is the retained artifact byte ceiling. DefaultToolsArtifactMaxBytes int64 = 1 << 30 // DefaultToolsArtifactMaxAge is the retained artifact age ceiling. DefaultToolsArtifactMaxAge = 720 * time.Hour )
const ( VaultKeyProviderFile = "file" VaultKeyProviderOSKeyring = "os-keyring" )
const ( WindowNewPolicyFloating = "floating" WindowNewPolicyBesideFocus = "beside_focus" WindowNewPolicyTab = "tab" WindowSmallViewportStack = "stack" WindowSmallViewportReject = "reject" WindowFocusClickDirectional = "click_directional" WindowFocusDirectional = "directional" WindowDragAwayWindow = "window" WindowDragAwayGroup = "group" WindowDesktopTransitionSlide = "slide" WindowDesktopTransitionCrossfade = "crossfade" WindowDesktopTransitionInstant = "instant" WindowBindingNone = "none" WindowBindingReserved = "reserved" WindowBindingZoom = "zoom" WindowDragModifierAlt = "alt" WindowDragModifierControl = "control" WindowDragModifierMeta = "meta" WindowDragModifierShift = "shift" WindowDragModifierNone = "none" )
const ( // AgentResourceKind is the canonical desired-state resource kind for agent definitions. AgentResourceKind resources.ResourceKind = "agent" )
const (
BuiltinCoordinatorAgentName = "coordinator"
)
const (
CmdPaletteFallbackAgent = "agent"
)
const DefaultDaemonMemoryReportInterval = 5 * time.Minute
DefaultDaemonMemoryReportInterval is the built-in process memory sampling cadence.
const DefaultDaemonSubprocessHealthEscalationThreshold = 3
DefaultDaemonSubprocessHealthEscalationThreshold is the number of consecutive failed health checks that escalates a task-bound session.
const DefaultMCPClientMetadataURL = "https://compozy.com/.well-known/mcp-client.json"
DefaultMCPClientMetadataURL is the public OAuth client identity used by MCP authorization.
const DefaultSubagentResultMaxChars = 60000
const ExtensionDataDirName = "extension-data"
ExtensionDataDirName is the dedicated root for extension-owned runtime data.
const (
// MCPJSONName is the supported JSON sidecar filename for MCP server declarations.
MCPJSONName = "mcp.json"
)
const ( // MCPServerResourceKind is the canonical desired-state resource kind for MCP server records. MCPServerResourceKind resources.ResourceKind = "mcp_server" )
const ProfileLayerOrphanedCode = "config_profile_layer_orphaned"
const (
// SessionMessagingRateLimitDisabled turns the per sender→target message budget off.
SessionMessagingRateLimitDisabled = -1
)
Variables ¶
var ( // ErrMissingAgentFrontmatter reports a missing YAML frontmatter block in AGENT.md content. ErrMissingAgentFrontmatter = errors.New("config: missing YAML frontmatter") // ErrUnterminatedAgentFrontmatter reports an unterminated YAML frontmatter block in AGENT.md content. ErrUnterminatedAgentFrontmatter = errors.New("config: unterminated YAML frontmatter") // ErrBOMAgentFrontmatter reports a UTF-8 BOM before the YAML frontmatter block. ErrBOMAgentFrontmatter = errors.New("config: UTF-8 BOM before YAML frontmatter") // ErrInvalidAgentFrontmatterKey reports an unsupported frontmatter key shape. ErrInvalidAgentFrontmatterKey = errors.New("config: invalid YAML frontmatter key") )
var ( // ErrInvalidAgentDefinition marks validation failures while authoring an AGENT.md file. ErrInvalidAgentDefinition = errors.New("config: invalid agent definition") // ErrAgentDefinitionExists marks a create request that would overwrite an existing AGENT.md file. ErrAgentDefinitionExists = errors.New("config: agent definition already exists") )
var ( // ErrAgentDefinitionNotFound marks an authored definition that no longer exists. ErrAgentDefinitionNotFound = errors.New("config: agent definition not found") )
var ErrAgentNameReserved = errors.New("config: agent name is reserved")
ErrAgentNameReserved marks attempts to author a catalog agent with a builtin identity.
var ErrCommandMissingExecutable = errors.New("command is missing an executable")
ErrCommandMissingExecutable reports a command made only of environment assignments.
var ( // ErrDotEnvUnsupported reports that .env content could not be safely parsed // or repaired without risking user-owned intent. ErrDotEnvUnsupported = errors.New("config: unsupported .env content") )
ErrProviderUnavailable reports that a requested provider cannot be resolved from the effective workspace/global config.
var ErrRuntimeModelRequired = errors.New("runtime model required")
ErrRuntimeModelRequired identifies providers that cannot resolve a model.
var ( // ErrUnsupportedTOMLMutation reports a mutation that would require rewriting // unrelated TOML structure instead of editing the targeted document fragment. ErrUnsupportedTOMLMutation = errors.New("config: unsupported TOML mutation") )
var ErrWorkspaceConfigInvalid = errors.New("workspace config invalid")
Functions ¶
func AgentCapabilityCatalogDependencyPaths ¶
AgentCapabilityCatalogDependencyPaths returns the filesystem inputs that can affect LoadAgentCapabilities for one agent directory.
func AgentDefinitionDigest ¶
AgentDefinitionDigest returns the canonical semantic digest used for update CAS.
func AgentFallbackChainPath ¶
AgentFallbackChainPath is the validation path prefix for one agent's fallback chain.
func AgentLayerName ¶
func AgentLayerName(source WorkspaceDiscoverySource) string
AgentLayerName returns the public layer label for a discovery source.
func ApplyConfigOverlayFile ¶
ApplyConfigOverlayFile deep-merges an optional TOML config file into dst.
func ApplyMarketplaceCatalogEnvironment ¶
ApplyMarketplaceCatalogEnvironment overlays the runtime catalog source without persisting it.
func BuiltinAgentNames ¶
func BuiltinAgentNames() []string
BuiltinAgentNames returns the runtime-owned identity names.
func BuiltinProviders ¶
func BuiltinProviders() map[string]ProviderConfig
BuiltinProviders returns a deep copy of the built-in provider registry.
func CanonicalCapabilityDigest ¶
func CanonicalCapabilityDigest(capability CapabilityDef) (string, error)
CanonicalCapabilityDigest computes the runtime-owned digest for one capability document after normalization.
func CanonicalProviderName ¶
CanonicalProviderName resolves known builtin aliases to the stable provider id.
func CanonicalSkillSourcePath ¶
CanonicalSkillSourcePath returns the normalized identity used by custom-source allocations.
func CloneProviderConfigs ¶
func CloneProviderConfigs(providers map[string]ProviderConfig) map[string]ProviderConfig
CloneProviderConfigs returns a deep copy of a provider registry.
func CommandFingerprint ¶
CommandFingerprint correlates launch routes without exposing secret-bearing command text. Events, logs, transcript markers, and projections all use this one function.
func CountProfileSecretRefRewrites ¶
CountProfileSecretRefRewrites includes configured references in the rename preview.
func CustomSourceSlugs ¶
CustomSourceSlugs allocates deterministic display slugs for a set of paths.
func DeleteAgentDefinition ¶
DeleteAgentDefinition removes one authored directory beneath an authorized agents root.
func EnsureBootstrapAgent ¶
EnsureBootstrapAgent creates the managed default agent definition if it does not already exist.
func EnsureHomeLayout ¶
EnsureHomeLayout creates the directories required by the Compozy home layout.
func HookDeclarationOverlayValues ¶
HookDeclarationOverlayValues converts a hook declaration to TOML overlay values.
func HookDeclarations ¶
func HookDeclarations(hooksCfg HooksConfig, agents []AgentDef) ([]hookspkg.HookDecl, error)
HookDeclarations returns normalized config and agent-definition hook declarations for registry consumption.
func IsReservedAgentName ¶
IsReservedAgentName reports whether a catalog name collides with a builtin identity.
func IsUnrestrictedACPMode ¶
IsUnrestrictedACPMode reports provider mode IDs that bypass the provider's normal sandbox or approvals.
func LoadHookDeclarationsFile ¶
LoadHookDeclarationsFile reads config-backed hooks from one concrete overlay without merging declarations from any other config layer.
func NewAgentResourceCodec ¶
NewAgentResourceCodec builds the canonical agent resource codec.
func NewMCPServerResourceCodec ¶
NewMCPServerResourceCodec builds the canonical MCP server resource codec.
func NewVaultKeyProvider ¶
NewVaultKeyProvider follows only the home config, never profile/workspace overlays. Selection is read per operation so an explicit migration does not leave live consumers bound to a removed key file. Both providers use the same migrated key.
func NormalizeAgentName ¶
NormalizeAgentName returns the canonical in-memory agent identity.
func NormalizeToolConfigValue ¶
NormalizeToolConfigValue coerces a JSON-decoded tool value into a supported TOML value.
func OverlayHookDeclarations ¶
func OverlayHookDeclarations(target WriteTarget) ([]hookspkg.HookDecl, error)
OverlayHookDeclarations returns config-backed hook declarations from one overlay target.
func ParseDottedConfigPath ¶
ParseDottedConfigPath parses a user-facing dotted config path.
func RedactStringMap ¶
RedactStringMap returns the same keys with all values replaced by the shared redaction placeholder.
func RedactedConfigMap ¶
RedactedConfigMap converts config to the same redacted map shape used by operator-facing CLI output.
func RedactedValue ¶
func RedactedValue() string
RedactedValue is the placeholder used when a public surface needs to reveal that a secret-bearing value exists without exposing the value itself.
func ResolveAgentName ¶
func ResolveAgentName(name string, defaults DefaultsConfig) (string, error)
ResolveAgentName resolves an explicit session agent name or falls back to config defaults.
func ResolveHomeDir ¶
ResolveHomeDir resolves the global Compozy home directory, honoring COMPOZY_HOME when present.
func ResolveOperatorHomeDir ¶
ResolveOperatorHomeDir resolves the canonical operator user home directory for workspace defaults.
func ResolveOperatorHomeDirWithLookup ¶
func ResolveOperatorHomeDirWithLookup( homePaths HomePaths, lookup func(string) (string, bool), ) (string, error)
ResolveOperatorHomeDirWithLookup resolves the canonical operator user home directory with injectable env lookup.
func ResolvePath ¶
ResolvePath expands `~`-prefixed paths and returns an absolute path.
func RewriteProfileSecretRefs ¶
RewriteProfileSecretRefs preserves surrounding bytes and can resume after a partial rename.
func RoleMutableConfigKinds ¶
RoleMutableConfigKinds returns the config-owned role mutation registry.
func RouteRetiredProviderWarnings ¶
RouteRetiredProviderWarnings sends later retired-provider warnings to logger and re-arms the once-per-ID dedup, so the daemon log records the retired references it resolves after boot.
func SteerCapabilityValues ¶
func SteerCapabilityValues() []string
func ValidGatewayConnectionName ¶
ValidGatewayConnectionName reports whether name is safe for config, paths, and keyring identities.
func ValidateACPMethod ¶
Validate reports whether the protocol-owned authentication method is usable. Empty selects no protocol login; a non-empty value is an opaque method ID compared byte-for-byte to the advertised ACP method.
func ValidateAgentName ¶
ValidateAgentName rejects names outside the canonical authored identity grammar.
func ValidateAuthoredAgentName ¶
ValidateAuthoredAgentName rejects names that cannot be materialized in an agent catalog.
func ValidateCmdPaletteAlias ¶
ValidateCmdPaletteAlias enforces the public alias grammar.
func ValidateConfigWriteScope ¶
func ValidateConfigWriteScope(scope WriteScope, path []string) error
ValidateConfigWriteScope rejects paths that the selected runtime scope cannot consume.
func ValidateFallbackRouteCommand ¶
ValidateFallbackRouteCommand validates one route command with the provider-auth parser. Whitespace-only commands mean "inherit" and are accepted.
func ValidateMCPClientMetadataURL ¶
ValidateMCPClientMetadataURL enforces the public CIMD URL contract used by MCP OAuth.
func ValidateMCPOAuthURL ¶
ValidateMCPOAuthURL enforces HTTPS for OAuth endpoints except on loopback hosts.
func ValidateMCPServerName ¶
ValidateMCPServerName enforces the identity grammar shared by settings and auth targets.
func ValidateMCPStdioEnvName ¶
ValidateMCPStdioEnvName enforces the runtime policy for one catalog or config env declaration.
func ValidateMarketplacePluginSources ¶
func ValidateMarketplacePluginSources(sources []MarketplacePluginSourceConfig) error
func ValidateResourceProfileName ¶
ValidateResourceProfileName validates a profile name used in discovery paths.
func ValidateSkillSources ¶
ValidateSkillSources rejects duplicates and slugs outside the curated table.
func WorkspaceDotEnvFile ¶
WorkspaceDotEnvFile returns the .env file path for a resolved workspace root.
func WriteOverride ¶
func WriteOverride( homePaths HomePaths, workspaceRoot string, target WriteTarget, path []string, ) (string, bool, error)
WriteOverride reports the highest-precedence file that still wins over a saved value.
Types ¶
type ACPOptionSelection ¶
type ACPOptionSelection = runtimeoption.Selection
ACPOptionSelection identifies one provider-advertised ACP option default. Exactly one of ValueID or BoolValue must be set.
func CloneACPOptionSelections ¶
func CloneACPOptionSelections(selections []ACPOptionSelection) []ACPOptionSelection
CloneACPOptionSelections returns an independent copy of ACP option defaults.
func NormalizeACPOptionSelections ¶
func NormalizeACPOptionSelections(selections []ACPOptionSelection) ([]ACPOptionSelection, error)
NormalizeACPOptionSelections validates, copies, and sorts ACP option defaults by ID.
type AgentDef ¶
type AgentDef struct {
SessionEnv SessionEnv `json:"session_env,omitempty" yaml:"session_env,omitempty" toml:"session_env,omitempty"`
Name string `json:"name" yaml:"name" toml:"name"`
Provider string `json:"provider,omitempty" yaml:"provider" toml:"provider"`
Command string `json:"command,omitempty" yaml:"command,omitempty" toml:"command,omitempty"`
Model string `json:"model,omitempty" yaml:"model,omitempty" toml:"model,omitempty"`
ReasoningEffort string `json:"reasoning_effort,omitempty" yaml:"reasoning_effort,omitempty" toml:"reasoning_effort,omitempty"`
*AgentRuntimeDefaults ` yaml:",inline" toml:",inline"`
Tools []string `json:"tools,omitempty" yaml:"tools,omitempty" toml:"tools,omitempty"`
Toolsets []string `json:"toolsets,omitempty" yaml:"toolsets,omitempty" toml:"toolsets,omitempty"`
DenyTools []string `json:"deny_tools,omitempty" yaml:"deny_tools,omitempty" toml:"deny_tools,omitempty"`
Permissions string `json:"permissions,omitempty" yaml:"permissions,omitempty" toml:"permissions,omitempty"`
Skills AgentSkillsConfig `json:"skills,omitzero" yaml:"skills,omitempty" toml:"skills,omitempty"`
CategoryPath []string `json:"category_path,omitempty" yaml:"category_path,omitempty" toml:"category_path,omitempty"`
MCPServers []MCPServer `json:"mcp_servers,omitempty" yaml:"mcp_servers,omitempty" toml:"mcp_servers,omitempty"`
Hooks []hookspkg.HookDecl `json:"hooks,omitempty" yaml:"hooks,omitempty" toml:"hooks,omitempty"`
FallbackChain []RoleFallback `json:"fallback_chain,omitempty" yaml:"fallback_chain,omitempty" toml:"fallback_chain,omitempty"`
Capabilities *CapabilityCatalog `json:"capabilities,omitzero" yaml:"-" toml:"-"`
Prompt string `json:"prompt,omitempty" yaml:"-"`
SourcePath string `json:"-" yaml:"-" toml:"-"`
SourceLayer string `json:"-" yaml:"-" toml:"-"`
ShadowedDefinitions []AgentDefinitionRef `json:"-" yaml:"-" toml:"-"`
}
AgentDef is the parsed representation of an AGENT.md file.
func BuiltinAgentDef ¶
BuiltinAgentDef returns a detached copy of a runtime-owned agent definition.
func CloneAgentDef ¶
CloneAgentDef returns a normalized deep copy of an agent definition.
func CreateAgentDefFile ¶
func CreateAgentDefFile(path string, draft AgentDefinitionDraft, overwrite bool) (AgentDef, error)
CreateAgentDefFile renders, validates, and persists one AGENT.md definition.
func DuplicateAgentDefinition ¶
func DuplicateAgentDefinition( source AgentDef, targetDir string, draft AgentDefinitionDraft, ) (agent AgentDef, err error)
DuplicateAgentDefinition clones one complete authored directory into a new target directory.
func EditAgentDefFile ¶
EditAgentDefFile rewrites one AGENT.md frontmatter block while preserving the prompt body.
func LoadAgentDef ¶
LoadAgentDef loads an AGENT.md file from the configured Compozy home directory.
func LoadAgentDefFile ¶
LoadAgentDefFile loads and parses an AGENT.md file from an explicit path.
func LoadWorkspaceAgentDefs ¶
func LoadWorkspaceAgentDefs( rootDir string, additionalDirs []string, homePaths HomePaths, profileName string, ) ([]AgentDef, error)
LoadWorkspaceAgentDefs loads workspace-visible agents using project-profile, project, additional, profile, then global precedence.
func ParseAgentDef ¶
ParseAgentDef parses a Markdown file with YAML frontmatter into an AgentDef.
func RenderAgentDefinition ¶
func RenderAgentDefinition(draft AgentDefinitionDraft) ([]byte, AgentDef, error)
RenderAgentDefinition renders a draft to AGENT.md bytes and validates by parsing the result.
func (AgentDef) ACPOptionsValue ¶
func (a AgentDef) ACPOptionsValue() []ACPOptionSelection
ACPOptionsValue returns the authored typed ACP selections.
func (*AgentDef) SetACPOptions ¶
func (a *AgentDef) SetACPOptions(selections []ACPOptionSelection)
SetACPOptions stores an ownership-safe authored selection set.
func (AgentDef) SpeedValue ¶
SpeedValue returns the authored speed without exposing compact pointer storage.
type AgentDefinitionDraft ¶
type AgentDefinitionDraft struct {
Name string
Provider string
Command string
SessionEnv SessionEnv
Model string
ReasoningEffort string
Speed speedpkg.Speed
ACPOptions []ACPOptionSelection
Tools []string
Toolsets []string
DenyTools []string
Permissions string
Skills AgentSkillsConfig
CategoryPath []string
MCPServers []MCPServer
Hooks []hookspkg.HookDecl
FallbackChain []RoleFallback
Prompt string
}
AgentDefinitionDraft captures the simple AGENT.md fields supported by authoring surfaces.
func AgentDefinitionDraftFromDef ¶
func AgentDefinitionDraftFromDef(agent AgentDef) AgentDefinitionDraft
AgentDefinitionDraftFromDef preserves every AGENT.md-authored field in a mutable draft.
type AgentDefinitionRef ¶
AgentDefinitionRef identifies one lower-precedence definition hidden by a winner.
type AgentOrigin ¶
type AgentOrigin string
AgentOrigin identifies the authored root that owns an agent definition.
const ( // AgentOriginGlobal identifies a definition stored under COMPOZY_HOME. AgentOriginGlobal AgentOrigin = "global" // AgentOriginWorkspace identifies a definition stored under a workspace or additional root. AgentOriginWorkspace AgentOrigin = "workspace" )
func AgentOriginFor ¶
func AgentOriginFor(home HomePaths, sourcePath string) (AgentOrigin, string)
AgentOriginFor classifies an AGENT.md source path and returns its workspace root when applicable.
type AgentRuntimeDefaults ¶
type AgentRuntimeDefaults struct {
Speed speedpkg.Speed `json:"speed,omitempty" yaml:"speed,omitempty" toml:"speed,omitempty"`
ACPOptions []ACPOptionSelection `json:"acp_options,omitempty" yaml:"acp_options,omitempty" toml:"acp_options,omitempty"`
}
AgentRuntimeDefaults keeps optional speed and ACP selections compact while its embedded fields preserve the flat agent wire format.
type AgentSkillsConfig ¶
type AgentSkillsConfig struct {
Disabled []string `json:"disabled,omitempty" yaml:"disabled,omitempty" toml:"disabled,omitempty"`
}
AgentSkillsConfig captures agent-local skill policy stored in AGENT.md.
type AgentsConfig ¶
type AgentsConfig struct {
Soul SoulConfig `toml:"soul"`
Heartbeat HeartbeatConfig `toml:"heartbeat"`
}
AgentsConfig holds authored agent context settings.
func (AgentsConfig) Validate ¶
func (c AgentsConfig) Validate() error
Validate ensures authored agent context settings are internally consistent.
type AppConfig ¶
type AppConfig struct {
UpdateCheck bool `toml:"update_check"`
UpdateCheckInterval time.Duration `toml:"update_check_interval"`
}
AppConfig controls desktop-app update checks.
type AttentionConfig ¶
type AttentionConfig struct {
Toasts bool `toml:"toasts"`
Sound bool `toml:"sound"`
System bool `toml:"system"`
}
AttentionConfig controls operator-facing attention delivery.
func DefaultAttentionConfig ¶
func DefaultAttentionConfig() AttentionConfig
DefaultAttentionConfig returns the built-in operator attention policy.
type AutomationConfig ¶
type AutomationConfig struct {
Enabled bool `toml:"enabled"`
Timezone string `toml:"timezone,omitempty"`
MaxConcurrentJobs int `toml:"max_concurrent_jobs"`
DefaultFireLimit automationpkg.FireLimitConfig `toml:"default_fire_limit"`
Suggestions AutomationSuggestionsConfig `toml:"suggestions"`
Jobs []AutomationJob `toml:"jobs,omitempty"`
Triggers []AutomationTrigger `toml:"triggers,omitempty"`
}
AutomationConfig holds TOML-defined automation defaults, jobs, and triggers.
func (AutomationConfig) Validate ¶
func (c AutomationConfig) Validate() error
Validate ensures the automation config is internally consistent.
type AutomationJob ¶
type AutomationJob struct {
Scope automationpkg.Scope `toml:"scope"`
Name string `toml:"name"`
AgentName string `toml:"agent"`
Workspace string `toml:"workspace,omitempty"`
Prompt string `toml:"prompt"`
Schedule automationpkg.ScheduleSpec `toml:"schedule"`
Task *automationpkg.JobTaskConfig `toml:"task,omitempty"`
TargetKind automationpkg.TargetKind `toml:"target_kind,omitempty"`
LoopTarget *automationpkg.LoopTarget `toml:"loop_target,omitempty"`
Enabled bool `toml:"enabled"`
Retry automationpkg.RetryConfig `toml:"retry,omitempty"`
FireLimit automationpkg.FireLimitConfig `toml:"fire_limit,omitempty"`
Source automationpkg.JobSource `toml:"-"`
}
AutomationJob holds a config-defined scheduled job before workspace resolution.
func (AutomationJob) Validate ¶
func (j AutomationJob) Validate(path string) error
Validate ensures the config-defined job is internally consistent before runtime resolution.
type AutomationSuggestionsConfig ¶
type AutomationSuggestionsConfig struct {
PendingCap int `toml:"pending_cap"`
}
AutomationSuggestionsConfig controls consent-first suggestion emission.
type AutomationTrigger ¶
type AutomationTrigger struct {
Scope automationpkg.Scope `toml:"scope"`
Name string `toml:"name"`
AgentName string `toml:"agent"`
Workspace string `toml:"workspace,omitempty"`
Prompt string `toml:"prompt"`
Event string `toml:"event"`
Filter map[string]string `toml:"filter,omitempty"`
TargetKind automationpkg.TargetKind `toml:"target_kind,omitempty"`
LoopTarget *automationpkg.LoopTarget `toml:"loop_target,omitempty"`
Enabled bool `toml:"enabled"`
Retry automationpkg.RetryConfig `toml:"retry,omitempty"`
FireLimit automationpkg.FireLimitConfig `toml:"fire_limit,omitempty"`
Source automationpkg.JobSource `toml:"-"`
EndpointSlug string `toml:"endpoint_slug,omitempty"`
WebhookSecretRef string `toml:"webhook_secret_ref,omitempty"`
}
AutomationTrigger holds a config-defined trigger before workspace resolution.
func (AutomationTrigger) Validate ¶
func (t AutomationTrigger) Validate(path string) error
Validate ensures the config-defined trigger is internally consistent before runtime resolution.
type AutonomyConfig ¶
type AutonomyConfig struct {
BlockRecurrenceLimit int `toml:"block_recurrence_limit"`
Scheduler SchedulerConfig `toml:"scheduler"`
}
AutonomyConfig controls opt-in autonomy features.
func (AutonomyConfig) Validate ¶
func (c AutonomyConfig) Validate() error
Validate ensures autonomy config is internally consistent.
type CapabilityBrief ¶
type CapabilityBrief struct {
ID string `json:"id" toml:"id"`
Summary string `json:"summary" toml:"summary"`
}
CapabilityBrief is the compact discovery projection for one capability.
type CapabilityCatalog ¶
type CapabilityCatalog struct {
Capabilities []CapabilityDef `json:"capabilities" toml:"capabilities"`
}
CapabilityCatalog is the normalized local catalog loaded from one agent directory.
func LoadAgentCapabilities ¶
func LoadAgentCapabilities(agentDir string) (catalog *CapabilityCatalog, err error)
LoadAgentCapabilities loads the optional capability catalog for one agent directory. When no supported capability catalog exists, it returns nil without error.
func (*CapabilityCatalog) Clone ¶
func (c *CapabilityCatalog) Clone() *CapabilityCatalog
Clone returns a deep copy of the catalog.
type CapabilityDef ¶
type CapabilityDef struct {
ID string `json:"id" toml:"id"`
Summary string `json:"summary" toml:"summary"`
Outcome string `json:"outcome" toml:"outcome"`
Version string `json:"version,omitempty" toml:"version,omitempty"`
ContextNeeded []string `json:"context_needed" toml:"context_needed"`
ArtifactsExpected []string `json:"artifacts_expected" toml:"artifacts_expected"`
ExecutionOutline []string `json:"execution_outline" toml:"execution_outline"`
Constraints []string `json:"constraints" toml:"constraints"`
Examples []string `json:"examples" toml:"examples"`
Requirements []string `json:"requirements,omitempty" toml:"requirements,omitempty"`
Digest string `json:"-" toml:"-"`
}
CapabilityDef is one normalized, outcome-oriented capability declaration for an agent.
type CmdPaletteConfig ¶
type CmdPaletteConfig struct {
FallbackTargets []string `toml:"fallback_targets"`
Personalization bool `toml:"personalization"`
Aliases map[string]string `toml:"aliases,omitempty"`
}
CmdPaletteConfig controls command-palette behavior and workspace vocabulary.
func ApplyCmdPaletteOverlayFile ¶
func ApplyCmdPaletteOverlayFile(path string, defaults CmdPaletteConfig) (CmdPaletteConfig, error)
ApplyCmdPaletteOverlayFile applies the optional workspace [cmd_palette] overlay.
func CloneCmdPaletteConfig ¶
func CloneCmdPaletteConfig(source CmdPaletteConfig) CmdPaletteConfig
CloneCmdPaletteConfig copies fallback targets and aliases without sharing maps.
func DefaultCmdPaletteConfig ¶
func DefaultCmdPaletteConfig() CmdPaletteConfig
DefaultCmdPaletteConfig returns the shipped command-palette behavior.
func (CmdPaletteConfig) Validate ¶
func (c CmdPaletteConfig) Validate() error
Validate rejects unsupported fallback targets and malformed aliases.
type Config ¶
type Config struct {
Vault VaultConfig `toml:"vault"`
Subagents SubagentsConfig `toml:"subagents"`
Daemon DaemonConfig `toml:"daemon"`
HTTP HTTPConfig `toml:"http"`
App AppConfig `toml:"app"`
Shell ShellConfig `toml:"shell"`
Attention AttentionConfig `toml:"attention"`
WindowManager WindowManagerConfig `toml:"window_manager"`
Terminal TerminalConfig `toml:"terminal"`
CmdPalette CmdPaletteConfig `toml:"cmd_palette"`
Defaults DefaultsConfig `toml:"defaults"`
Agents AgentsConfig `toml:"agents"`
Limits LimitsConfig `toml:"limits"`
Session SessionConfig `toml:"session"`
Permissions PermissionsConfig `toml:"permissions"`
MCP MCPConfig `toml:"mcp"`
MCPServers []MCPServer `toml:"mcp_servers,omitempty"`
Providers map[string]ProviderConfig `toml:"providers"`
ModelCatalog ModelCatalogConfig `toml:"model_catalog"`
Marketplace MarketplaceRuntimeConfig `toml:"marketplace"`
Observability ObservabilityConfig `toml:"observability"`
Log LogConfig `toml:"log"`
Redact RedactConfig `toml:"redact"`
Roles RolesConfig `toml:"roles"`
RoleSources RoleFieldSources `toml:"-" json:"-"`
Skills SkillsConfig `toml:"skills"`
Extensions ExtensionsConfig `toml:"extensions"`
Tools ToolsConfig `toml:"tools"`
Automation AutomationConfig `toml:"automation"`
Loops LoopsConfig `toml:"loops"`
Goals GoalsConfig `toml:"goals"`
Task TaskConfig `toml:"task"`
Hooks HooksConfig `toml:"hooks"`
Gateway GatewayConfig `toml:"gateway"`
Autonomy AutonomyConfig `toml:"autonomy"`
Worktrees WorktreesConfig `toml:"worktrees"`
}
Config is the fully merged Compozy configuration.
func CloneConfig ¶
CloneConfig returns an ownership-safe copy of the complete runtime configuration.
func DefaultWithHome ¶
func DeleteMCPSidecarServer ¶
func DeleteMCPSidecarServer( homePaths HomePaths, workspaceRoot string, target WriteTarget, name string, ) (cfg Config, deleted bool, err error)
DeleteMCPSidecarServer removes one MCP server definition from the selected sidecar target when present and returns the merged effective config after validation.
func EditConfigOverlay ¶
func EditConfigOverlay( homePaths HomePaths, workspaceRoot string, target WriteTarget, mutate func(*OverlayEditor) error, ) (Config, error)
EditConfigOverlay applies one validated mutation to a canonical TOML overlay target and returns the merged effective config after the write.
func EditConfigOverlayAndApply ¶
func EditConfigOverlayAndApply( homePaths HomePaths, workspaceRoot string, target WriteTarget, mutate func(*OverlayEditor) error, apply func(Config) error, ) (cfg Config, err error)
EditConfigOverlayAndApply restores rejected writes; apply must not re-enter overlay mutation.
func Load ¶
func Load(opts ...LoadOption) (Config, error)
Load reads defaults, global config, optional profile layers, and the optional workspace overlay. Workspace overlays are loaded only when WithWorkspaceRoot supplies an explicit root.
func LoadForHome ¶
func LoadForHome(homePaths HomePaths, opts ...LoadOption) (Config, error)
LoadForHome reads defaults, global config, optional profile layers, and the optional workspace overlay using the supplied Compozy home layout instead of the ambient process home.
func LoadGlobalConfig ¶
LoadGlobalConfig loads only the user-global Compozy config from the resolved home.
func PutMCPSidecarServer ¶
func PutMCPSidecarServer( homePaths HomePaths, workspaceRoot string, target WriteTarget, server MCPServer, ) (cfg Config, err error)
PutMCPSidecarServer upserts one MCP server definition in the selected sidecar target and returns the merged effective config after validation.
func SaveBootstrapConfig ¶
SaveBootstrapConfig writes the global bootstrap config managed by `compozy install`.
func (*Config) ResolveAgent ¶
func (c *Config) ResolveAgent(agent AgentDef) (ResolvedAgent, error)
ResolveAgent resolves a parsed agent definition against provider config and global defaults.
func (*Config) ResolveProvider ¶
func (c *Config) ResolveProvider(name string) (ProviderConfig, error)
ResolveProvider resolves a provider using the built-in registry and config overrides.
func (*Config) ResolveSessionAgent ¶
func (c *Config) ResolveSessionAgent(agent AgentDef, providerOverride string) (ResolvedAgent, error)
ResolveSessionAgent resolves a parsed agent definition for one session. When providerOverride is set, the selected provider becomes canonical and provider-owned runtime fields are re-resolved from that provider to avoid mixed runtimes from the original agent definition.
func (*Config) ResolveSessionAgentWithRuntime ¶
func (c *Config) ResolveSessionAgentWithRuntime( agent AgentDef, overrides RuntimeOverrides, ) (ResolvedAgent, error)
ResolveSessionAgentWithRuntime resolves one session agent with runtime-level overrides.
func (*Config) RoleFieldSource ¶
RoleFieldSource reports the winning config layer for one routed role field.
func (*Config) SubagentResultMaxChars ¶
func (*Config) ValidateAgentFallbackChain ¶
ValidateAgentFallbackChain validates an agent chain, including provider availability against this configuration. It is the authoring-surface check (HTTP/UDS, CLI, tools).
func (*Config) WarnRetiredProviderReferences ¶
func (c *Config) WarnRetiredProviderReferences()
WarnRetiredProviderReferences resolves the configured default and declared providers so every retired reference in this config reports its deprecation warning.
type CoordinatorRoleConfig ¶
type CoordinatorRoleConfig struct {
RoleConfig
TTL time.Duration `toml:"ttl"`
MaxChildren int `toml:"max_children"`
MaxActiveSessionsPerWorkspace int `toml:"max_active_sessions_per_workspace"`
}
CoordinatorRoleConfig combines routing with coordinator safety policy.
type DaemonConfig ¶
type DaemonConfig struct {
Socket string `toml:"socket"`
MemoryReportInterval time.Duration `toml:"memory_report_interval"`
SubprocessHealthEscalationThreshold int `toml:"subprocess_health_escalation_threshold"`
ReloadTimeouts DaemonReloadTimeoutsConfig `toml:"reload_timeouts"`
Load DaemonLoadConfig `toml:"load"`
}
DaemonConfig controls daemon-local socket, runtime reporting, and hot-reload settings.
func (DaemonConfig) Validate ¶
func (c DaemonConfig) Validate() error
Validate ensures daemon config values are internally consistent.
type DaemonLoadConfig ¶
type DaemonLoadConfig struct {
// AgentNiceness lowers the CPU priority of every agent process tree (Unix
// only); 0 keeps the daemon's priority.
AgentNiceness int `toml:"agent_niceness"`
// AdmissionThreshold delays new background (automation, Loop, scheduler)
// sessions and prompts while normalized load exceeds it; 0 disables sampling.
AdmissionThreshold float64 `toml:"admission_threshold"`
// AdmissionMaxWait bounds one delayed background admission before it proceeds.
AdmissionMaxWait time.Duration `toml:"admission_max_wait"`
}
DaemonLoadConfig controls how agent work yields to the rest of the host.
func DefaultDaemonLoadConfig ¶
func DefaultDaemonLoadConfig() DaemonLoadConfig
DefaultDaemonLoadConfig returns the built-in load-management defaults.
func (DaemonLoadConfig) Validate ¶
func (c DaemonLoadConfig) Validate() error
Validate ensures load-management values stay within supported ranges.
type DaemonReloadTimeoutsConfig ¶
type DaemonReloadTimeoutsConfig struct {
Providers time.Duration `toml:"providers"`
MCP time.Duration `toml:"mcp"`
}
DaemonReloadTimeoutsConfig bounds subsystem reload attempts during config apply.
func DefaultDaemonReloadTimeoutsConfig ¶
func DefaultDaemonReloadTimeoutsConfig() DaemonReloadTimeoutsConfig
DefaultDaemonReloadTimeoutsConfig returns daemon hot-reload timeout defaults.
func (DaemonReloadTimeoutsConfig) Validate ¶
func (c DaemonReloadTimeoutsConfig) Validate() error
Validate ensures daemon reload timeout values stay within bounded retry budgets.
type DefaultsConfig ¶
type DefaultsConfig struct {
Agent string `toml:"agent"`
Provider string `toml:"provider,omitempty"`
Model string `toml:"model,omitempty"`
ReasoningEffort string `toml:"reasoning_effort,omitempty"`
}
DefaultsConfig holds global runtime defaults.
Model and ReasoningEffort refine the runtime of sessions whose provider resolves from Provider. They never apply to an agent-authored provider, and a config layer that changes Provider drops the values inherited from lower layers, so a model chosen for one provider cannot reach another.
func (DefaultsConfig) Validate ¶
func (c DefaultsConfig) Validate() error
Validate ensures the default agent setting is present and valid, and that the session runtime defaults refine a configured provider.
type DiffEntry ¶
type DiffEntry struct {
Path string `json:"path"`
Before any `json:"before,omitempty"`
After any `json:"after,omitempty"`
BeforeRedacted bool `json:"before_redacted,omitzero"`
AfterRedacted bool `json:"after_redacted,omitzero"`
}
DiffEntry describes one redacted effective config difference.
func DiffConfigEntries ¶
DiffConfigEntries returns sorted redacted differences between two effective entry sets.
type DotEnvDiagnostic ¶
type DotEnvDiagnostic struct {
Line int `json:"line,omitzero"`
Key string `json:"key,omitempty"`
Code string `json:"code"`
Message string `json:"message"`
}
DotEnvDiagnostic describes one .env parse or repair issue without exposing values.
type DotEnvRepairError ¶
type DotEnvRepairError struct {
Path string
Diagnostics []DotEnvDiagnostic
}
DotEnvRepairError carries structured diagnostics for unsupported .env content.
func (*DotEnvRepairError) Error ¶
func (e *DotEnvRepairError) Error() string
Error returns a diagnostic summary without including .env values.
func (*DotEnvRepairError) Is ¶
func (e *DotEnvRepairError) Is(target error) bool
Is matches the unsupported .env sentinel.
type DotEnvRepairReport ¶
type DotEnvRepairReport struct {
Path string `json:"path"`
Status string `json:"status"`
Repaired bool `json:"repaired"`
Diagnostics []DotEnvDiagnostic `json:"diagnostics,omitempty"`
}
DotEnvRepairReport summarizes .env inspection or repair without including values.
func InspectDotEnvFile ¶
func InspectDotEnvFile(path string) (DotEnvRepairReport, error)
InspectDotEnvFile parses one .env file and reports whether explicit repair is possible.
func RepairDotEnvFile ¶
func RepairDotEnvFile(path string) (report DotEnvRepairReport, err error)
RepairDotEnvFile safely rewrites one .env file when every change is bounded and structured.
type Entry ¶
type Entry struct {
Path string `json:"path"`
Value any `json:"value"`
Redacted bool `json:"redacted"`
}
Entry is one flattened, redacted effective config value.
func EntryByPath ¶
EntryByPath returns one flattened entry.
func FlattenConfigEntries ¶
FlattenConfigEntries returns deterministic flattened config entries.
type ExtensionsConfig ¶
type ExtensionsConfig struct {
Trust ExtensionsTrustConfig `toml:"trust"`
Sources ExtensionsSourcesConfig `toml:"sources"`
Dev ExtensionsDevConfig `toml:"dev"`
Resources ExtensionsResourcesConfig `toml:"resources,omitempty"`
}
ExtensionsConfig controls extension trust, sources, development, and resource policy.
func (ExtensionsConfig) Validate ¶
func (c ExtensionsConfig) Validate() error
Validate ensures the extension configuration is internally consistent.
type ExtensionsDevConfig ¶
ExtensionsDevConfig controls the CLI-side extension development loop.
func (ExtensionsDevConfig) Validate ¶
func (c ExtensionsDevConfig) Validate() error
Validate ensures the extension dev-loop interval is usable.
type ExtensionsGitHubSourceConfig ¶
type ExtensionsGitHubSourceConfig struct {
Enabled bool `toml:"enabled"`
BaseURL string `toml:"base_url"`
}
ExtensionsGitHubSourceConfig controls the GitHub extension source.
func (ExtensionsGitHubSourceConfig) Validate ¶
func (c ExtensionsGitHubSourceConfig) Validate() error
Validate ensures the GitHub extension source is internally consistent.
type ExtensionsGitSourceConfig ¶
type ExtensionsGitSourceConfig struct {
Enabled bool `toml:"enabled"`
}
ExtensionsGitSourceConfig controls direct Git extension installs.
type ExtensionsResourceRateLimitConfig ¶
type ExtensionsResourceRateLimitConfig struct {
Requests int `toml:"requests"`
Window time.Duration `toml:"window"`
Queue int `toml:"queue"`
}
ExtensionsResourceRateLimitConfig controls one resource publication rate-limit bucket.
func (ExtensionsResourceRateLimitConfig) Validate ¶
func (c ExtensionsResourceRateLimitConfig) Validate(path string) error
Validate ensures one configured resource rate-limit bucket is internally consistent.
type ExtensionsResourcesConfig ¶
type ExtensionsResourcesConfig struct {
AllowedKinds []resources.ResourceKind `toml:"allowed_kinds,omitempty"`
MaxScope resources.ResourceScopeKind `toml:"max_scope,omitempty"`
SnapshotRateLimit ExtensionsResourceRateLimitConfig `toml:"snapshot_rate_limit,omitempty"`
OperatorWriteRateLimit ExtensionsResourceRateLimitConfig `toml:"operator_write_rate_limit,omitempty"`
}
ExtensionsResourcesConfig controls resource publication policy for extensions.
func (ExtensionsResourcesConfig) Validate ¶
func (c ExtensionsResourcesConfig) Validate() error
Validate ensures the extension resource policy is internally consistent.
type ExtensionsSourcesConfig ¶
type ExtensionsSourcesConfig struct {
GitHub ExtensionsGitHubSourceConfig `toml:"github"`
Git ExtensionsGitSourceConfig `toml:"git"`
}
ExtensionsSourcesConfig controls published extension source availability.
type ExtensionsTrustConfig ¶
type ExtensionsTrustConfig struct {
AllowUnverified bool `toml:"allow_unverified"`
}
ExtensionsTrustConfig controls operator policy for unverified published extensions.
type GatewayAuthConfig ¶
type GatewayAuthConfig struct {
RateLimit GatewayAuthRateLimitConfig `toml:"rate_limit"`
}
GatewayAuthConfig groups device authentication controls.
type GatewayAuthRateLimitConfig ¶
type GatewayAuthRateLimitConfig struct {
Window time.Duration `toml:"window"`
MaxFails int `toml:"max_fails"`
}
GatewayAuthRateLimitConfig bounds failed authentication attempts by source.
type GatewayConfig ¶
type GatewayConfig struct {
Enabled bool `toml:"enabled"`
PrivatePort int `toml:"private_port"`
PublicPort int `toml:"public_port"`
ActiveConnection string `toml:"active_connection,omitempty"`
Connections []GatewayConnectionConfig `toml:"connections,omitempty"`
Pairing GatewayPairingConfig `toml:"pairing"`
StreamTicket GatewayStreamTicketConfig `toml:"stream_ticket"`
Auth GatewayAuthConfig `toml:"auth"`
Verify GatewayVerifyConfig `toml:"verify"`
CredentialsDir string `toml:"-" json:"-"`
}
GatewayConfig controls the local gateway ceiling and runtime tunables. Durable exposure intent lives in the global database, never in this config.
func (GatewayConfig) Validate ¶
func (c GatewayConfig) Validate() error
Validate ensures every gateway tunable is safe and bounded.
type GatewayConnectionConfig ¶
type GatewayConnectionConfig struct {
Name string `toml:"name"`
Scheme string `toml:"scheme"`
Host string `toml:"host"`
Port int `toml:"port"`
CredentialFile string `toml:"credential_file,omitempty"`
DefaultWorkspace string `toml:"default_workspace,omitempty"`
RemoteHome string `toml:"remote_home,omitempty"`
}
GatewayConnectionConfig is non-secret metadata for one client-side connection profile.
func (GatewayConnectionConfig) Validate ¶
func (c GatewayConnectionConfig) Validate() error
Validate ensures a connection profile is safe to resolve from operator-global config.
type GatewayPairingConfig ¶
type GatewayPairingConfig struct {
TTL time.Duration `toml:"ttl"`
MaxPending int `toml:"max_pending"`
}
GatewayPairingConfig bounds pending, short-lived pairing artifacts.
type GatewayStreamTicketConfig ¶
GatewayStreamTicketConfig controls single-use stream ticket lifetime.
type GatewayVerifyConfig ¶
type GatewayVerifyConfig struct {
Timeout time.Duration `toml:"timeout"`
PublicDNSResolver string `toml:"public_dns_resolver"`
}
GatewayVerifyConfig bounds provider endpoint verification.
type GoalsConfig ¶
type GoalsConfig struct {
MaxTurns int `toml:"max_turns"`
ContextNudgeRatio float64 `toml:"context_nudge_ratio"`
OutboxBatchSize int `toml:"outbox_batch_size"`
OutboxPollInterval time.Duration `toml:"outbox_poll_interval"`
}
GoalsConfig controls defaults applied to newly started Goal runs.
func DefaultGoalsConfig ¶
func DefaultGoalsConfig() GoalsConfig
DefaultGoalsConfig returns the built-in Goal defaults.
func (GoalsConfig) Validate ¶
func (c GoalsConfig) Validate() error
Validate enforces Goal default bounds without changing explicit values.
type HTTPConfig ¶
HTTPConfig controls the HTTP server bind address.
func (HTTPConfig) Validate ¶
func (c HTTPConfig) Validate() error
Validate ensures the HTTP bind settings are valid.
type HeartbeatConfig ¶
type HeartbeatConfig struct {
Enabled bool `toml:"enabled"`
MaxBodyBytes int64 `toml:"max_body_bytes"`
ContextProjectionBytes int64 `toml:"context_projection_bytes"`
MinInterval time.Duration `toml:"min_interval"`
DefaultInterval time.Duration `toml:"default_interval"`
WakeCooldown time.Duration `toml:"wake_cooldown"`
MaxWakesPerCycle int `toml:"max_wakes_per_cycle"`
ActiveSessionOnly bool `toml:"active_session_only"`
AllowActiveHoursPreferences bool `toml:"allow_active_hours_preferences"`
WakeEventRetention time.Duration `toml:"wake_event_retention"`
SessionHealthStaleAfter time.Duration `toml:"session_health_stale_after"`
SessionHealthHookMinInterval time.Duration `toml:"session_health_hook_min_interval"`
}
HeartbeatConfig controls optional HEARTBEAT.md wake-policy parsing and runtime bounds.
func DefaultHeartbeatConfig ¶
func DefaultHeartbeatConfig() HeartbeatConfig
DefaultHeartbeatConfig returns built-in Agent Heartbeat wake-policy limits.
func (HeartbeatConfig) Validate ¶
func (c HeartbeatConfig) Validate() error
Validate ensures HEARTBEAT.md limits and timing bounds are internally consistent.
type HomePaths ¶
type HomePaths struct {
OperatorHomeDir string
HomeDir string
ConfigFile string
AgentsDir string
SkillsDir string
LoopsDir string
ProfilesDir string
DefaultProfileDir string
SessionsDir string
ToolArtifactsDir string
SessionAttachmentsDir string
RestartsDir string
LogsDir string
GatewayDir string
GatewayCredentialsDir string
ExtensionDataRoot string
BinDir string
LogFile string
AppStateFile string
UpdateOperationFile string
UpdateOperationLock string
UpdateHistoryFile string
DesktopProvenanceFile string
DatabaseFile string
DaemonSocket string
DaemonLock string
DaemonInfo string
}
HomePaths captures the filesystem layout for the Compozy home directory.
func ResolveHomePaths ¶
ResolveHomePaths resolves the canonical Compozy home layout.
func ResolveHomePathsForWorkspace ¶
ResolveHomePathsForWorkspace resolves the canonical Compozy home layout while honoring COMPOZY_HOME from the supplied workspace .env when the process env omits it.
func ResolveHomePathsFrom ¶
ResolveHomePathsFrom resolves the canonical Compozy home layout from an explicit directory.
type HooksConfig ¶
HooksConfig holds config-defined hook declarations.
func (HooksConfig) Validate ¶
func (c HooksConfig) Validate() error
Validate ensures the hook declarations are internally consistent.
type LaunchCommand ¶
LaunchCommand separates private leading environment assignments from the executable and arguments.
func ParseLaunchCommand ¶
func ParseLaunchCommand(command string) (LaunchCommand, error)
ParseLaunchCommand splits one shell-style launch command without executing a shell. Leading NAME=value tokens become private environment forwarded literally: there is no "~" or variable expansion. Errors are unprefixed ("parse command: …" or ErrCommandMissingExecutable) so callers attach their own path or subsystem prefix. providerauth.ParseCommand delegates here; this is the single launch-command grammar.
type LimitsConfig ¶
type LimitsConfig struct {
MaxConcurrentAgents int `toml:"max_concurrent_agents"`
}
LimitsConfig defines runtime safety bounds.
func (LimitsConfig) Validate ¶
func (c LimitsConfig) Validate() error
Validate ensures the configured limits are positive.
type LoadOption ¶
type LoadOption func(*loadOptions)
LoadOption customizes configuration loading.
func WithProfile ¶
func WithProfile(name string) LoadOption
WithProfile loads the personal and workspace layers bound to one active profile name.
func WithWorkspaceRoot ¶
func WithWorkspaceRoot(root string) LoadOption
WithWorkspaceRoot loads the optional workspace overlay from `<root>/.compozy/config.toml`. When omitted, Load applies only the built-in defaults and the global Compozy home config.
func WithoutWorkspaceOverlayFiles ¶
func WithoutWorkspaceOverlayFiles() LoadOption
WithoutWorkspaceOverlayFiles keeps workspace environment lookup while omitting workspace config files.
type LogConfig ¶
type LogConfig struct {
Level string `toml:"level"`
MaxSizeMB int `toml:"max_size_mb"`
MaxBackups int `toml:"max_backups"`
MaxAgeDays int `toml:"max_age_days"`
CompressBackups bool `toml:"compress_backups"`
}
LogConfig controls structured logging.
type LoopAdmissionDefaultConfig ¶
type LoopAdmissionDefaultConfig struct {
TombstoneHorizon string `toml:"tombstone_horizon"`
}
LoopAdmissionDefaultConfig controls watch admission tombstone retention.
type LoopAutopauseRule ¶
LoopAutopauseRule is one ordered first-match-wins pause rule.
type LoopBreakerConfig ¶
type LoopBreakerConfig struct {
Threshold int `toml:"threshold"`
ProbeInterval string `toml:"probe_interval"`
}
LoopBreakerConfig is the daemon-global target breaker policy.
type LoopBudgetDefaultConfig ¶
type LoopBudgetDefaultConfig struct {
Tokens int `toml:"tokens"`
WallClockSec int `toml:"wall_clock_sec"`
OnExceeded string `toml:"on_exceeded"`
}
LoopBudgetDefaultConfig controls loop budget defaults.
func (LoopBudgetDefaultConfig) Validate ¶
func (c LoopBudgetDefaultConfig) Validate(path string) error
Validate enforces SET budget semantics before config writes are persisted.
type LoopDefaultConfig ¶
type LoopDefaultConfig struct {
IterationCap int `toml:"iteration_cap"`
NoProgress LoopNoProgressDefaultConfig `toml:"no_progress"`
Gates LoopGatesDefaultConfig `toml:"gates"`
Budget LoopBudgetDefaultConfig `toml:"budget"`
RuntimeDefaults dsl.RuntimeDefaults `toml:"runtime_defaults"`
RuntimeRules []dsl.RuntimeRule `toml:"runtime_rules"`
FanOutWidth int `toml:"fan_out_width"`
Retry LoopRetryDefaultConfig `toml:"retry"`
Liveness LoopLivenessDefaultConfig `toml:"liveness"`
Resume LoopResumeDefaultConfig `toml:"resume"`
Predicates LoopPredicateDefaultConfig `toml:"predicates"`
Waits LoopWaitDefaultConfig `toml:"waits"`
Requests LoopRequestsDefaultConfig `toml:"requests"`
Admission LoopAdmissionDefaultConfig `toml:"admission"`
Autopause []LoopAutopauseRule `toml:"autopause"`
}
LoopDefaultConfig is one `[loops.defaults.<kind>]` seed layer.
func (LoopDefaultConfig) Validate ¶
func (c LoopDefaultConfig) Validate(path string) error
Validate enforces one loop default section without clamping operator input.
type LoopGatesDefaultConfig ¶
type LoopGatesDefaultConfig struct {
MaxRevisions int `toml:"max_revisions"`
}
LoopGatesDefaultConfig controls gate retry defaults.
type LoopInputDefaultSources ¶
type LoopInputDefaults ¶
LoopInputDefaults stores author-owned defaults by Loop name and declared input key. Values remain untyped until the named Loop definition is resolved.
type LoopLivenessDefaultConfig ¶
type LoopLivenessDefaultConfig struct {
SilenceWindow string `toml:"silence_window"`
}
LoopLivenessDefaultConfig controls evidence-based silence evaluation.
type LoopNoProgressDefaultConfig ¶
type LoopNoProgressDefaultConfig struct {
Window int `toml:"window"`
}
LoopNoProgressDefaultConfig controls generation-hash no-progress detection.
type LoopPredicateDefaultConfig ¶
type LoopPredicateDefaultConfig struct {
CostLimit uint64 `toml:"cost_limit"`
}
LoopPredicateDefaultConfig controls CEL evaluation cost.
type LoopRequestsDefaultConfig ¶
type LoopRequestsDefaultConfig struct {
ExpireAfter string `toml:"expire_after"`
}
LoopRequestsDefaultConfig controls the default lifetime of human requests.
type LoopResumeDefaultConfig ¶
type LoopResumeDefaultConfig struct {
DeathStreakLimit int `toml:"death_streak_limit"`
}
LoopResumeDefaultConfig controls bounded dead-session resume.
type LoopRetryDefaultConfig ¶
type LoopRetryDefaultConfig struct {
MaxAttempts int `toml:"max_attempts"`
BackoffBase string `toml:"backoff_base"`
BackoffMax string `toml:"backoff_max"`
}
LoopRetryDefaultConfig controls retry defaults for mechanical node families.
type LoopWaitDefaultConfig ¶
type LoopWaitDefaultConfig struct {
AdmissionAttempts int `toml:"admission_attempts"`
AdmissionRetryInterval string `toml:"admission_retry_interval"`
}
LoopWaitDefaultConfig controls wait admission retries.
type LoopsConfig ¶
type LoopsConfig struct {
ReconcileInterval string `toml:"reconcile_interval"`
Defaults LoopsDefaultsConfig `toml:"defaults"`
Breaker LoopBreakerConfig `toml:"breaker"`
Inputs LoopInputDefaults `toml:"inputs,omitempty"`
// contains filtered or unexported fields
}
LoopsConfig holds global and workspace defaults used to seed new loop runs.
func DefaultLoopsConfig ¶
func DefaultLoopsConfig() LoopsConfig
DefaultLoopsConfig returns the TechSpec `[loops.defaults.*]` layer.
func (*LoopsConfig) InputDefaultLayers ¶
func (c *LoopsConfig) InputDefaultLayers(loopName string) (global map[string]any, workspace map[string]any)
InputDefaultLayers returns caller-owned global and workspace defaults for one Loop. The source map is recorded while overlays are applied; origin is never inferred from values.
func (*LoopsConfig) Validate ¶
func (c *LoopsConfig) Validate() error
Validate enforces write-time loop default bounds.
type LoopsDefaultsConfig ¶
type LoopsDefaultsConfig struct {
Delivery LoopDefaultConfig `toml:"delivery"`
Watch LoopDefaultConfig `toml:"watch"`
}
LoopsDefaultsConfig separates delivery and watch loop seed defaults.
func (*LoopsDefaultsConfig) Validate ¶
func (c *LoopsDefaultsConfig) Validate(path string) error
Validate enforces delivery and watch default bounds.
type MCPAuthConfig ¶
type MCPAuthConfig struct {
Registration MCPAuthRegistration `json:"registration,omitempty" yaml:"registration,omitempty" toml:"registration,omitempty"`
IssuerURL string `json:"issuer_url,omitempty" yaml:"issuer_url,omitempty" toml:"issuer_url,omitempty"`
ClientID string `json:"client_id,omitempty" yaml:"client_id,omitempty" toml:"client_id,omitempty"`
ClientSecretRef string `json:"client_secret_ref,omitempty" yaml:"client_secret_ref,omitempty" toml:"client_secret_ref,omitempty"`
Scopes []string `json:"scopes,omitempty" yaml:"scopes,omitempty" toml:"scopes,omitempty"`
}
MCPAuthConfig describes OAuth registration policy and optional pre-registered client values for a remote MCP server.
func (MCPAuthConfig) Enabled ¶
func (a MCPAuthConfig) Enabled() bool
Enabled reports whether auth is configured.
func (MCPAuthConfig) IsZero ¶
func (a MCPAuthConfig) IsZero() bool
IsZero reports whether the auth config is empty.
func (MCPAuthConfig) Validate ¶
func (a MCPAuthConfig) Validate(path string) error
Validate ensures remote MCP OAuth configuration has enough metadata to run the authorization-code flow without placing token material in config files.
type MCPAuthRegistration ¶
type MCPAuthRegistration string
MCPAuthRegistration identifies the OAuth client registration strategy.
const ( // MCPAuthRegistrationAuto resolves CIMD before one dynamic-registration attempt. MCPAuthRegistrationAuto MCPAuthRegistration = "auto" // MCPAuthRegistrationPreRegistered uses issuer and client values declared by the operator. MCPAuthRegistrationPreRegistered MCPAuthRegistration = "pre_registered" )
type MCPConfig ¶
type MCPConfig struct {
OAuth MCPOAuthConfig `toml:"oauth"`
}
MCPConfig controls global MCP client behavior.
type MCPOAuthConfig ¶
type MCPOAuthConfig struct {
ClientMetadataURL string `toml:"client_metadata_url,omitempty"`
RedirectURI string `toml:"redirect_uri,omitempty"`
}
MCPOAuthConfig controls the Compozy MCP OAuth client identity.
func (MCPOAuthConfig) Validate ¶
func (c MCPOAuthConfig) Validate(path string) error
Validate ensures global MCP OAuth client configuration is safe to use.
type MCPServer ¶
type MCPServer struct {
Name string `json:"name" yaml:"name" toml:"name"`
Owner string `json:"owner,omitempty" yaml:"-" toml:"-"`
RuntimeName string `json:"runtime_name,omitempty" yaml:"-" toml:"-"`
Transport MCPServerTransport `json:"transport,omitempty" yaml:"transport,omitempty" toml:"transport,omitempty"`
Command string `json:"command,omitempty" yaml:"command,omitempty" toml:"command,omitempty"`
CWD string `json:"cwd,omitempty" yaml:"-" toml:"-"`
Args []string `json:"args,omitempty" yaml:"args,omitempty" toml:"args,omitempty"`
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty" toml:"env,omitempty"`
SecretEnv map[string]string `json:"secret_env,omitempty" yaml:"secret_env,omitempty" toml:"secret_env,omitempty"`
URL string `json:"url,omitempty" yaml:"url,omitempty" toml:"url,omitempty"`
Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty" toml:"headers,omitempty"`
SecretHeaders map[string]string `json:"secret_headers,omitempty" yaml:"secret_headers,omitempty" toml:"secret_headers,omitempty"`
Auth MCPAuthConfig `json:"auth" yaml:"auth,omitempty" toml:"auth,omitempty"`
CatalogEntry string `json:"catalog_entry,omitempty" yaml:"catalog_entry,omitempty" toml:"catalog_entry,omitempty"`
CatalogVersion string `json:"catalog_version,omitempty" yaml:"catalog_version,omitempty" toml:"catalog_version,omitempty"`
}
MCPServer describes an MCP server passed through to the agent runtime.
func LoadMCPServersJSONFile ¶
LoadMCPServersJSONFile parses an optional `mcp.json` file from disk. Missing files are treated as absent rather than as errors.
func MergeMCPServers ¶
MergeMCPServers merges provider-level and agent-level MCP servers by name.
func OverrideMCPServers ¶
OverrideMCPServers overlays MCP servers by name, replacing the full server object on collision instead of field-merging it.
func ParseMCPServersJSON ¶
ParseMCPServersJSON parses an MCP JSON document into canonical MCP server values. The document may use either `mcpServers` or `mcp_servers` as the top-level key.
func RedactedMCPServer ¶
RedactedMCPServer returns a server copy suitable for public API and CLI rendering. It preserves non-secret endpoint metadata and redacts env values.
func (MCPServer) EffectiveRuntimeName ¶
EffectiveRuntimeName is the published launch/tool name; credentials retain Name.
func (MCPServer) EffectiveTransport ¶
func (s MCPServer) EffectiveTransport() MCPServerTransport
EffectiveTransport returns the explicit transport or the compatibility default. Local command servers remain stdio; servers with a URL default to streamable HTTP.
type MCPServerTransport ¶
type MCPServerTransport string
MCPServerTransport identifies how Compozy reaches an MCP server.
const ( // MCPServerTransportStdio launches a local subprocess and talks MCP over stdio. MCPServerTransportStdio MCPServerTransport = "stdio" // MCPServerTransportHTTP talks to a remote streamable HTTP MCP endpoint. MCPServerTransportHTTP MCPServerTransport = "http" )
func (MCPServerTransport) Validate ¶
func (t MCPServerTransport) Validate(path string) error
Validate reports whether the transport is supported.
type MarketplaceCatalogConfig ¶
type MarketplaceCatalogConfig struct {
BaseURL string `toml:"base_url"`
TTL string `toml:"ttl"`
Timeout string `toml:"timeout"`
}
MarketplaceCatalogConfig controls curated feed fetching and projection freshness.
func (MarketplaceCatalogConfig) EffectiveBaseURL ¶
func (c MarketplaceCatalogConfig) EffectiveBaseURL() string
EffectiveBaseURL returns the configured feed base URL or the built-in default.
func (MarketplaceCatalogConfig) EffectiveTTL ¶
func (c MarketplaceCatalogConfig) EffectiveTTL() string
EffectiveTTL returns the configured projection TTL or the built-in default.
func (MarketplaceCatalogConfig) EffectiveTimeout ¶
func (c MarketplaceCatalogConfig) EffectiveTimeout() string
EffectiveTimeout returns the configured request timeout or the built-in default.
func (MarketplaceCatalogConfig) Validate ¶
func (c MarketplaceCatalogConfig) Validate(path string) error
Validate reports whether the curated catalog fetch settings are usable.
type MarketplacePluginSourceConfig ¶
type MarketplacePluginSourceConfig struct {
Name string `toml:"name"`
Source string `toml:"source"`
// Nil inherits a preset's default or enables a custom source.
Enabled *bool `toml:"enabled,omitempty"`
}
func (MarketplacePluginSourceConfig) EffectiveEnabled ¶
func (c MarketplacePluginSourceConfig) EffectiveEnabled(presetDefault bool) bool
type MarketplaceRuntimeConfig ¶
type MarketplaceRuntimeConfig struct {
Catalog MarketplaceCatalogConfig `toml:"catalog"`
PluginSources []MarketplacePluginSourceConfig `toml:"plugin_sources"`
}
MarketplaceRuntimeConfig contains shared curated-marketplace runtime settings.
func DefaultMarketplaceRuntimeConfig ¶
func DefaultMarketplaceRuntimeConfig() MarketplaceRuntimeConfig
DefaultMarketplaceRuntimeConfig returns the curated catalog defaults.
func (MarketplaceRuntimeConfig) Validate ¶
func (c MarketplaceRuntimeConfig) Validate() error
Validate reports whether the curated marketplace config is usable.
type ModelCatalogConfig ¶
type ModelCatalogConfig struct {
Sources ModelCatalogSourcesConfig `toml:"sources,omitempty"`
}
ModelCatalogConfig controls daemon-owned model catalog sources.
func DefaultModelCatalogConfig ¶
func DefaultModelCatalogConfig() ModelCatalogConfig
DefaultModelCatalogConfig returns the default model catalog source config.
func (ModelCatalogConfig) Validate ¶
func (c ModelCatalogConfig) Validate() error
Validate reports whether model catalog config is usable.
type ModelCatalogSourcesConfig ¶
type ModelCatalogSourcesConfig struct {
ModelsDev ModelsDevSourceConfig `toml:"models_dev,omitempty"`
}
ModelCatalogSourcesConfig groups built-in model catalog sources.
type ModelsDevSourceConfig ¶
type ModelsDevSourceConfig struct {
Enabled *bool `toml:"enabled,omitempty"`
Endpoint string `toml:"endpoint,omitempty"`
TTL string `toml:"ttl,omitempty"`
Timeout string `toml:"timeout,omitempty"`
}
ModelsDevSourceConfig controls the models.dev catalog source.
func (ModelsDevSourceConfig) EffectiveEnabled ¶
func (c ModelsDevSourceConfig) EffectiveEnabled() bool
EffectiveEnabled reports whether the models.dev source should run.
func (ModelsDevSourceConfig) EffectiveEndpoint ¶
func (c ModelsDevSourceConfig) EffectiveEndpoint() string
EffectiveEndpoint returns the configured endpoint or the default models.dev endpoint.
func (ModelsDevSourceConfig) EffectiveTTL ¶
func (c ModelsDevSourceConfig) EffectiveTTL() string
EffectiveTTL returns the configured TTL or the default models.dev TTL.
func (ModelsDevSourceConfig) EffectiveTimeout ¶
func (c ModelsDevSourceConfig) EffectiveTimeout() string
EffectiveTimeout returns the configured timeout or the default models.dev timeout.
func (ModelsDevSourceConfig) Validate ¶
func (c ModelsDevSourceConfig) Validate(path string) error
Validate reports whether the models.dev source config is usable.
type ObservabilityConfig ¶
type ObservabilityConfig struct {
Enabled bool `toml:"enabled"`
RetentionDays int `toml:"retention_days"`
MaxGlobalBytes int64 `toml:"max_global_bytes"`
AgentProbeTimeout time.Duration `toml:"agent_probe_timeout"`
Transcripts ObservabilityTranscriptConfig `toml:"transcripts"`
}
ObservabilityConfig controls global event retention settings.
func (ObservabilityConfig) AgentProbeTimeoutOrDefault ¶
func (c ObservabilityConfig) AgentProbeTimeoutOrDefault() time.Duration
AgentProbeTimeoutOrDefault returns the configured agent probe timeout or the default.
func (ObservabilityConfig) Validate ¶
func (c ObservabilityConfig) Validate() error
Validate ensures observability settings are sensible.
type ObservabilityTranscriptConfig ¶
type ObservabilityTranscriptConfig struct {
Enabled bool `toml:"enabled"`
SegmentBytes int `toml:"segment_bytes"`
MaxBytesPerSession int64 `toml:"max_bytes_per_session"`
}
ObservabilityTranscriptConfig configures transcript capture and retention.
func (ObservabilityTranscriptConfig) Validate ¶
func (c ObservabilityTranscriptConfig) Validate() error
Validate ensures transcript retention settings are sensible.
type OverlayEditor ¶
type OverlayEditor struct {
// contains filtered or unexported fields
}
OverlayEditor applies safe, comment-preserving mutations to one TOML overlay document.
func (*OverlayEditor) Bytes ¶
func (e *OverlayEditor) Bytes() ([]byte, error)
func (*OverlayEditor) Delete ¶
func (e *OverlayEditor) Delete(path []string) error
Delete removes one TOML key path when present.
func (*OverlayEditor) DeleteArrayTableItem ¶
func (e *OverlayEditor) DeleteArrayTableItem(path []string, nameField string, name string) (bool, error)
DeleteArrayTableItem removes one named entry from an array-of-tables.
func (*OverlayEditor) HasPath ¶
func (e *OverlayEditor) HasPath(path []string) bool
HasPath reports whether the current document already contains the given path.
func (*OverlayEditor) SetTable ¶
func (e *OverlayEditor) SetTable(path []string, values map[string]any) error
SetTable replaces or creates a TOML table at the provided path.
func (*OverlayEditor) SetValue ¶
func (e *OverlayEditor) SetValue(path []string, value any) error
SetValue updates or creates one scalar or array value at the provided path. Changing defaults.provider also removes the document's provider-bound defaults.model and defaults.reasoning_effort.
func (*OverlayEditor) UpsertArrayTableItem ¶
func (e *OverlayEditor) UpsertArrayTableItem( path []string, nameField string, name string, values map[string]any, ) error
UpsertArrayTableItem replaces or appends one named entry in an array-of-tables.
type PathDenial ¶
type PathDenial string
PathDenial is the config package's path-policy decision.
const ( ConfigPathAllowed PathDenial = "" ConfigPathForbidden PathDenial = "path_forbidden" ConfigPathSecretForbidden PathDenial = "secret_path_forbidden" ConfigPathTrustForbidden PathDenial = "trust_root_forbidden" )
type PathPolicy ¶
type PathPolicy struct {
Segments []string
Kind ValueKind
Redacted bool
Denial PathDenial
}
PathPolicy captures the deterministic decision for an agent-facing config path.
func ClassifyToolConfigPath ¶
func ClassifyToolConfigPath(path []string) (PathPolicy, error)
ClassifyToolConfigPath applies the agent-facing mutable config policy.
type PermissionMode ¶
type PermissionMode string
PermissionMode is the static permission policy applied by the daemon.
const ( // DefaultAgentName is the bootstrap agent name used across the system. DefaultAgentName = "general" PermissionModeDenyAll PermissionMode = "deny-all" PermissionModeApproveReads PermissionMode = "approve-reads" PermissionModeApproveAll PermissionMode = "approve-all" // DefaultObservabilityAgentProbeTimeout bounds daemon health probes for configured agents. DefaultObservabilityAgentProbeTimeout = 2 * time.Second )
func (PermissionMode) Rank ¶
func (m PermissionMode) Rank() int
Rank orders valid modes from least to most permissive; invalid modes rank below all valid modes.
func (PermissionMode) Validate ¶
func (m PermissionMode) Validate(path string) error
Validate ensures the permission mode is supported.
type PermissionsConfig ¶
type PermissionsConfig struct {
Mode PermissionMode `toml:"mode"`
ProviderFullAccess bool `toml:"provider_full_access,omitempty"`
}
PermissionsConfig defines the global default permission policy.
func (PermissionsConfig) Validate ¶
func (c PermissionsConfig) Validate() error
Validate ensures the permission mode is supported.
type ProfileLayerDiagnostic ¶
type ProfileLayerDiagnostic struct {
Code string
Layer string
Profile string
Path string
Message string
}
ProfileLayerDiagnostic reports a config or MCP sidecar whose directory does not bind to a known profile.
func InspectProfileLayerFiles ¶
func InspectProfileLayerFiles( homePaths HomePaths, workspaceRoot string, knownProfiles []string, ) ([]ProfileLayerDiagnostic, error)
InspectProfileLayerFiles finds dormant profile-layer files without reading or applying their contents.
type ProviderAuthMode ¶
type ProviderAuthMode string
ProviderAuthMode identifies who owns launch-time provider authentication.
const ( // ProviderAuthModeNativeCLI lets the provider CLI use its own login/session state. ProviderAuthModeNativeCLI ProviderAuthMode = "native_cli" // ProviderAuthModeBoundSecret injects explicitly configured credential slots at launch. ProviderAuthModeBoundSecret ProviderAuthMode = "bound_secret" // ProviderAuthModeNone launches the provider without Compozy-managed credentials. ProviderAuthModeNone ProviderAuthMode = "none" )
func (ProviderAuthMode) Validate ¶
func (m ProviderAuthMode) Validate(path string) error
Validate reports whether the provider auth mode is supported.
type ProviderConfig ¶
type ProviderConfig struct {
SessionEnv SessionEnv `toml:"session_env,omitempty"`
Command string `toml:"command"`
CommandIsBuiltin bool `toml:"-" json:"-" yaml:"-"`
SteerCapability SteerCapability `toml:"steer_capability,omitempty"`
DisplayName string `toml:"display_name,omitempty"`
Models ProviderModelsConfig `toml:"models,omitempty"`
Harness ProviderHarness `toml:"harness,omitempty"`
RuntimeProvider string `toml:"runtime_provider,omitempty"`
Transport string `toml:"transport,omitempty"`
BaseURL string `toml:"base_url,omitempty"`
AuthMode ProviderAuthMode `toml:"auth_mode,omitempty"`
EnvPolicy ProviderEnvPolicy `toml:"env_policy,omitempty"`
HomePolicy ProviderHomePolicy `toml:"home_policy,omitempty"`
NoneSecurity ProviderNoneSecurity `toml:"none_security,omitempty"`
AuthStatusCmd string `toml:"auth_status_command,omitempty"`
AuthLoginCmd string `toml:"auth_login_command,omitempty"`
AuthACPMethod string `toml:"auth_acp_method,omitempty"`
SessionMCP *bool `toml:"session_mcp,omitempty"`
CredentialSlots []ProviderCredentialSlot `toml:"credential_slots,omitempty"`
MCPServers []MCPServer `toml:"mcp_servers,omitempty"`
}
ProviderConfig describes how to launch a provider in ACP mode.
func CloneProviderConfig ¶
func CloneProviderConfig(provider ProviderConfig) ProviderConfig
CloneProviderConfig returns a deep copy safe for ownership boundaries and caches.
func (ProviderConfig) EffectiveACPMethod ¶
func (p ProviderConfig) EffectiveACPMethod() string
EffectiveACPMethod returns the trimmed protocol-owned authentication method.
func (ProviderConfig) EffectiveAuthMode ¶
func (p ProviderConfig) EffectiveAuthMode() ProviderAuthMode
EffectiveAuthMode returns the configured auth owner or the slot-derived default.
func (ProviderConfig) EffectiveCredentialSlots ¶
func (p ProviderConfig) EffectiveCredentialSlots() []ProviderCredentialSlot
EffectiveCredentialSlots returns explicit launch credential slots.
func (ProviderConfig) EffectiveEnvPolicy ¶
func (p ProviderConfig) EffectiveEnvPolicy() ProviderEnvPolicy
EffectiveEnvPolicy returns the configured provider environment inheritance policy.
func (ProviderConfig) EffectiveHarness ¶
func (p ProviderConfig) EffectiveHarness() ProviderHarness
EffectiveHarness returns the configured provider harness or the command-backed default.
func (ProviderConfig) EffectiveHomePolicy ¶
func (p ProviderConfig) EffectiveHomePolicy() ProviderHomePolicy
EffectiveHomePolicy returns the configured provider home inheritance policy.
func (ProviderConfig) EffectiveNoneSecurity ¶
func (p ProviderConfig) EffectiveNoneSecurity() ProviderNoneSecurity
EffectiveNoneSecurity returns the auth_mode=none safety rationale.
func (ProviderConfig) RequiresRuntimeModel ¶
func (p ProviderConfig) RequiresRuntimeModel() bool
RequiresRuntimeModel reports whether Compozy must provide a model to start this provider.
func (ProviderConfig) RuntimeProviderName ¶
func (p ProviderConfig) RuntimeProviderName(providerName string) string
RuntimeProviderName returns the downstream runtime provider id for harnesses that need one.
func (ProviderConfig) SessionMCPEnabled ¶
func (p ProviderConfig) SessionMCPEnabled() bool
SessionMCPEnabled reports whether Compozy should pass per-session MCP servers to the provider.
type ProviderCredentialSlot ¶
type ProviderCredentialSlot struct {
Name string `toml:"name"`
TargetEnv string `toml:"target_env"`
SecretRef string `toml:"secret_ref"`
Kind string `toml:"kind,omitempty"`
Required bool `toml:"required"`
}
ProviderCredentialSlot describes one launch-time secret binding needed by a provider.
func (ProviderCredentialSlot) Validate ¶
func (s ProviderCredentialSlot) Validate(path string) error
Validate reports whether the provider credential slot can be resolved at launch.
type ProviderEnvPolicy ¶
type ProviderEnvPolicy string
ProviderEnvPolicy identifies which daemon environment is inherited by a provider process.
const ( // ProviderEnvPolicyFiltered removes secret-shaped daemon variables but keeps operator context. ProviderEnvPolicyFiltered ProviderEnvPolicy = "filtered" // ProviderEnvPolicyIsolated keeps only a fixed operational allowlist. ProviderEnvPolicyIsolated ProviderEnvPolicy = "isolated" )
func (ProviderEnvPolicy) Validate ¶
func (p ProviderEnvPolicy) Validate(path string) error
Validate reports whether the provider env policy is supported.
type ProviderHarness ¶
type ProviderHarness string
ProviderHarness identifies the runtime strategy used to launch a provider.
const ( // ProviderHarnessACP launches the configured command directly as an ACP runtime. ProviderHarnessACP ProviderHarness = "acp" // ProviderHarnessPiACP launches pi through the pi-acp adapter and materializes provider settings. ProviderHarnessPiACP ProviderHarness = "pi_acp" )
func (ProviderHarness) Validate ¶
func (h ProviderHarness) Validate(path string) error
Validate reports whether the harness is supported.
type ProviderHomePolicy ¶
type ProviderHomePolicy string
ProviderHomePolicy identifies whether provider CLI state comes from the operator home or an isolated home.
const ( // ProviderHomePolicyOperator lets native CLIs read their existing operator login state. ProviderHomePolicyOperator ProviderHomePolicy = "operator" // ProviderHomePolicyIsolated points native CLIs at an Compozy-owned provider home. ProviderHomePolicyIsolated ProviderHomePolicy = "isolated" )
func (ProviderHomePolicy) Validate ¶
func (p ProviderHomePolicy) Validate(path string) error
Validate reports whether the provider home policy is supported.
type ProviderModelConfig ¶
type ProviderModelConfig struct {
ID string `toml:"id"`
DisplayName string `toml:"display_name,omitempty"`
ContextWindow *int64 `toml:"context_window,omitempty"`
MaxInputTokens *int64 `toml:"max_input_tokens,omitempty"`
MaxOutputTokens *int64 `toml:"max_output_tokens,omitempty"`
SupportsTools *bool `toml:"supports_tools,omitempty"`
SupportsReasoning *bool `toml:"supports_reasoning,omitempty"`
ReasoningEfforts []string `toml:"reasoning_efforts,omitempty"`
DefaultReasoningEffort string `toml:"default_reasoning_effort,omitempty"`
DefaultSpeed speedpkg.Speed `toml:"default_speed,omitempty"`
CostInputPerMillion *float64 `toml:"cost_input_per_million,omitempty"`
CostOutputPerMillion *float64 `toml:"cost_output_per_million,omitempty"`
CostCacheReadPerMillion *float64 `toml:"cost_cache_read_per_million,omitempty"`
CostCacheWritePerMillion *float64 `toml:"cost_cache_write_per_million,omitempty"`
CostReasoningPerMillion *float64 `toml:"cost_reasoning_per_million,omitempty"`
Deprecated *bool `toml:"deprecated,omitempty"`
Hidden *bool `toml:"hidden,omitempty"`
Featured *bool `toml:"featured,omitempty"`
ReleaseDate string `toml:"release_date,omitempty"`
}
ProviderModelConfig describes one curated provider model entry.
type ProviderModelsConfig ¶
type ProviderModelsConfig struct {
Default string `toml:"default,omitempty"`
Curated []ProviderModelConfig `toml:"curated,omitempty"`
Discovery ProviderModelsDiscoveryConfig `toml:"discovery,omitempty"`
Reasoning ProviderReasoningConfig `toml:"reasoning,omitempty"`
}
ProviderModelsConfig describes provider-scoped model defaults and metadata.
func (ProviderModelsConfig) EffectiveReasoningApply ¶
func (p ProviderModelsConfig) EffectiveReasoningApply() ReasoningApplyStrategy
EffectiveReasoningApply returns the provider's explicit strategy or none.
func (ProviderModelsConfig) Validate ¶
func (m ProviderModelsConfig) Validate(path string) error
Validate reports whether the provider model block is usable.
type ProviderModelsDiscoveryConfig ¶
type ProviderModelsDiscoveryConfig struct {
Enabled *bool `toml:"enabled,omitempty"`
Command string `toml:"command,omitempty"`
Endpoint string `toml:"endpoint,omitempty"`
Timeout string `toml:"timeout,omitempty"`
}
ProviderModelsDiscoveryConfig describes optional provider model discovery.
func (ProviderModelsDiscoveryConfig) Validate ¶
func (d ProviderModelsDiscoveryConfig) Validate(path string) error
Validate reports whether the discovery source config is usable.
type ProviderNoneSecurity ¶
type ProviderNoneSecurity string
ProviderNoneSecurity identifies why auth_mode=none is safe for a provider.
const ( // ProviderNoneSecurityLocalTransport limits unauthenticated providers to local transport. ProviderNoneSecurityLocalTransport ProviderNoneSecurity = "local_transport" // ProviderNoneSecurityExternalIdentity delegates authentication to the provider transport. ProviderNoneSecurityExternalIdentity ProviderNoneSecurity = "external_identity" // ProviderNoneSecurityPublicReadonly permits unauthenticated public read-only providers. ProviderNoneSecurityPublicReadonly ProviderNoneSecurity = "public_readonly" )
func (ProviderNoneSecurity) Validate ¶
func (s ProviderNoneSecurity) Validate(path string) error
Validate reports whether the auth_mode=none safety rationale is supported.
type ProviderReasoningConfig ¶
type ProviderReasoningConfig struct {
Apply ReasoningApplyStrategy `toml:"apply,omitempty"`
}
ProviderReasoningConfig describes provider-level reasoning application.
func (ProviderReasoningConfig) EffectiveReasoningApply ¶
func (r ProviderReasoningConfig) EffectiveReasoningApply() ReasoningApplyStrategy
EffectiveReasoningApply returns the reasoning strategy or none.
func (ProviderReasoningConfig) Validate ¶
func (r ProviderReasoningConfig) Validate(path string) error
Validate reports whether the reasoning strategy is supported.
type QuietPolicy ¶
type QuietPolicy struct {
WarningAfter time.Duration
StopGrace time.Duration
StopAfterQuiet time.Duration
}
QuietPolicy is the normalized silence policy consumed by the session manager. Zero durations disable their respective action. StopGrace starts at the warning; StopAfterQuiet is an absolute silence threshold.
type ReasoningApplyStrategy ¶
type ReasoningApplyStrategy string
ReasoningApplyStrategy identifies how Compozy applies a provider reasoning effort.
const ( // ReasoningApplyACPOption applies effort through an advertised ACP session config option. ReasoningApplyACPOption ReasoningApplyStrategy = "acp_option" // ReasoningApplyNone exposes no selectable reasoning effort for the provider. ReasoningApplyNone ReasoningApplyStrategy = "none" )
type RedactConfig ¶
type RedactConfig struct {
Enabled bool `toml:"enabled"`
}
RedactConfig controls additive secret redaction heuristics.
type ResolvedAgent ¶
type ResolvedAgent struct {
SessionEnv SessionEnv
ToolPolicyEnforced bool `json:"-"`
Name string
ProfileName string
Provider string
Command string
CommandIsBuiltin bool `json:"-" toml:"-" yaml:"-"`
DisplayName string
Model string
ReasoningEffort string
*AgentRuntimeDefaults
Tools []string
Toolsets []string
DenyTools []string
Permissions string
Harness ProviderHarness
RuntimeProvider string
Transport string
BaseURL string
AuthMode ProviderAuthMode
EnvPolicy ProviderEnvPolicy
HomePolicy ProviderHomePolicy
NoneSecurity ProviderNoneSecurity
AuthStatusCmd string
AuthLoginCmd string
AuthACPMethod string
SessionMCP bool
CredentialSlots []ProviderCredentialSlot
MCPServers []MCPServer
Reasoning ProviderReasoningConfig
RuntimeSources ResolvedRuntimeSources
Prompt string
}
ResolvedAgent is the effective runtime configuration for a parsed agent definition.
func (*ResolvedAgent) ACPOptionsValue ¶
func (a *ResolvedAgent) ACPOptionsValue() []ACPOptionSelection
ACPOptionsValue returns the resolved typed ACP selections.
func (ResolvedAgent) LaunchFingerprint ¶
func (agent ResolvedAgent) LaunchFingerprint() string
LaunchFingerprint binds native session reuse to the command and declared references. Routes without declarations retain their persisted pre-session_env identity.
func (*ResolvedAgent) SetACPOptions ¶
func (a *ResolvedAgent) SetACPOptions(selections []ACPOptionSelection)
SetACPOptions stores an ownership-safe resolved selection set.
func (*ResolvedAgent) SetSpeed ¶
func (a *ResolvedAgent) SetSpeed(value speedpkg.Speed)
SetSpeed stores one normalized resolved speed.
func (*ResolvedAgent) SpeedValue ¶
func (a *ResolvedAgent) SpeedValue() speedpkg.Speed
SpeedValue returns the resolved speed without exposing compact pointer storage.
type ResolvedCoordinatorRole ¶
type ResolvedCoordinatorRole struct {
Enabled bool
AgentName string
Provider string
Model string
ReasoningEffort string
Speed speedpkg.Speed
ACPOptions []ACPOptionSelection
Fallbacks []RoleFallback
TTL time.Duration
MaxChildren int
MaxActiveSessionsPerWorkspace int
}
ResolvedCoordinatorRole is the coordinator runtime policy assembled from a resolved role.
func DefaultResolvedCoordinatorRole ¶
func DefaultResolvedCoordinatorRole() ResolvedCoordinatorRole
DefaultResolvedCoordinatorRole returns the coordinator's resolved default identity and policy.
type ResolvedRuntimeSources ¶
type ResolvedRuntimeSources struct {
Provider RuntimeValueSource
Model RuntimeValueSource
ReasoningEffort RuntimeValueSource
Speed RuntimeValueSource
}
ResolvedRuntimeSources records the provenance of one effective agent runtime.
type RoleConfig ¶
type RoleConfig struct {
Enabled bool `toml:"enabled"`
Agent string `toml:"agent,omitempty"`
Provider string `toml:"provider,omitempty"`
Model string `toml:"model,omitempty"`
ReasoningEffort string `toml:"reasoning_effort,omitempty"`
// Speed selects normal or Fast execution when the provider advertises it.
Speed speedpkg.Speed `toml:"speed,omitempty"`
// ACPOptions selects provider-advertised typed session configuration values.
ACPOptions []ACPOptionSelection `toml:"acp_options,omitempty"`
FallbackChain []RoleFallback `toml:"fallback_chain,omitempty"`
}
RoleConfig controls one session-backed role.
type RoleFallback ¶
type RoleFallback struct {
SessionEnv SessionEnv `toml:"session_env,omitempty" json:"session_env,omitempty" yaml:"session_env,omitempty"`
Provider string `toml:"provider" json:"provider" yaml:"provider"`
Model string `toml:"model" json:"model" yaml:"model"`
ReasoningEffort string `toml:"reasoning_effort,omitempty" json:"reasoning_effort,omitempty" yaml:"reasoning_effort,omitempty"`
Speed speedpkg.Speed `toml:"speed,omitempty" json:"speed,omitempty" yaml:"speed,omitempty"`
ACPOptions []ACPOptionSelection `toml:"acp_options,omitempty" json:"acp_options,omitempty" yaml:"acp_options,omitempty"`
// Command selects the account for this route exactly like providers.<name>.command
// and agent.command: shell-style quoting, leading NAME=value assignments are private
// environment forwarded literally, and no shell is launched. Empty inherits.
Command string `toml:"command,omitempty" json:"command,omitempty" yaml:"command,omitempty"`
}
RoleFallback is one ordered invocation fallback route.
func CloneRoleFallbacks ¶
func CloneRoleFallbacks(source []RoleFallback) []RoleFallback
CloneRoleFallbacks deep-copies an ordered fallback chain.
type RoleFieldSources ¶
RoleFieldSources records which config layer last wrote each routed role field.
func CloneRoleFieldSources ¶
func CloneRoleFieldSources(sources RoleFieldSources) RoleFieldSources
CloneRoleFieldSources returns an ownership-safe copy of role source metadata.
type RoleName ¶
type RoleName string
RoleName identifies a background runtime role governed by [roles].
type RolesConfig ¶
type RolesConfig struct {
Coordinator CoordinatorRoleConfig `toml:"coordinator"`
AutoTitle RoleConfig `toml:"auto_title"`
}
RolesConfig is the closed [roles] roster.
func CloneRolesConfig ¶
func CloneRolesConfig(source *RolesConfig) RolesConfig
CloneRolesConfig returns an ownership-safe copy of the roles configuration.
func DefaultRolesConfig ¶
func DefaultRolesConfig() RolesConfig
DefaultRolesConfig returns routing defaults for the closed role roster.
func (*RolesConfig) Validate ¶
func (c *RolesConfig) Validate(path string, resolver providerResolver) error
Validate checks role shape, bounds, and configured provider references.
type RootKind ¶
type RootKind string
RootKind identifies the physical convention that produced one skill root.
type RuntimeOverrides ¶
type RuntimeOverrides struct {
SessionEnv SessionEnv
Provider string
Model string
Reasoning string
// Command is an explicit launch command for this attempt (a fallback route's account).
// It is applied after the provider-aware resolution: when non-empty it replaces the
// resolved command on any provider; when empty the existing rule holds (the agent
// command is kept only for a same-provider selection, else the selected provider's).
Command string
}
RuntimeOverrides are the engine-resolved runtime fields applied to one session.
type RuntimeValueSource ¶
type RuntimeValueSource uint8
RuntimeValueSource identifies the authored/default layer that supplied one effective runtime value.
const ( // RuntimeValueSourceUnspecified identifies an unresolved runtime value. RuntimeValueSourceUnspecified RuntimeValueSource = iota // RuntimeValueSourceAgent identifies a value authored in AGENT.md. RuntimeValueSourceAgent // RuntimeValueSourceProjectDefault identifies defaults.provider. RuntimeValueSourceProjectDefault // RuntimeValueSourceProviderDefault identifies provider.models.default. RuntimeValueSourceProviderDefault // RuntimeValueSourceModelDefault identifies a curated model runtime default. RuntimeValueSourceModelDefault )
func (RuntimeValueSource) String ¶
func (s RuntimeValueSource) String() string
String returns the public runtime-source value.
type SchedulerConfig ¶
type SchedulerConfig struct {
FanOutAfter int `toml:"fan_out_after"`
SpawnAfter int `toml:"spawn_after"`
EventAfter int `toml:"event_after"`
NeedsAttentionAfter int `toml:"needs_attention_after"`
MinQueuedAge time.Duration `toml:"min_queued_age"`
}
SchedulerConfig bounds the mechanical scheduler's convergence escalation ladder. The counts are monotonic wake cycles a claimable run must remain queued before each tier fires.
func DefaultSchedulerConfig ¶
func DefaultSchedulerConfig() SchedulerConfig
DefaultSchedulerConfig returns the built-in convergence ladder defaults.
func (SchedulerConfig) Validate ¶
func (c SchedulerConfig) Validate(path string) error
Validate ensures the convergence ladder thresholds are positive and monotonic.
type SessionAttachmentsConfig ¶
type SessionAttachmentsConfig struct {
MaxFileBytes int64 `toml:"max_file_bytes"`
MaxFilesPerPrompt int `toml:"max_files_per_prompt"`
AllowedMIME []string `toml:"allowed_mime"`
Retention SessionAttachmentsRetentionConfig `toml:"retention"`
}
SessionAttachmentsConfig controls persisted session-attachment admission and retention.
func DefaultSessionAttachmentsConfig ¶
func DefaultSessionAttachmentsConfig() SessionAttachmentsConfig
DefaultSessionAttachmentsConfig returns v1 admission and retention defaults.
func (SessionAttachmentsConfig) Validate ¶
func (c SessionAttachmentsConfig) Validate() error
Validate ensures attachment admission and retention values form real positive bounds.
type SessionAttachmentsRetentionConfig ¶
type SessionAttachmentsRetentionConfig struct {
MaxCount int `toml:"max_count"`
MaxBytes int64 `toml:"max_bytes"`
MaxAge time.Duration `toml:"max_age"`
}
SessionAttachmentsRetentionConfig controls disk bounds for stored attachments.
func (SessionAttachmentsRetentionConfig) Validate ¶
func (c SessionAttachmentsRetentionConfig) Validate() error
Validate ensures attachment retention values form real positive bounds.
type SessionBusyInputConfig ¶
type SessionBusyInputConfig struct {
DefaultMode string `toml:"default_mode,omitempty"`
QueueCap int `toml:"queue_cap,omitempty"`
MaxTextBytes int `toml:"max_text_bytes,omitempty"`
}
SessionBusyInputConfig controls operator input submitted while a turn is active.
func DefaultSessionBusyInputConfig ¶
func DefaultSessionBusyInputConfig() SessionBusyInputConfig
DefaultSessionBusyInputConfig returns the default busy-input behavior.
func (SessionBusyInputConfig) Normalize ¶
func (c SessionBusyInputConfig) Normalize() SessionBusyInputConfig
Normalize returns a config copy with implicit defaults applied.
func (SessionBusyInputConfig) Validate ¶
func (c SessionBusyInputConfig) Validate() error
Validate ensures busy-input controls are internally consistent.
type SessionConfig ¶
type SessionConfig struct {
Stop SessionStopConfig `toml:"stop"`
Limits SessionLimitsConfig `toml:"limits"`
Supervision SessionSupervisionConfig `toml:"supervision"`
BusyInput SessionBusyInputConfig `toml:"busy_input"`
Messaging SessionMessagingConfig `toml:"messaging"`
Attachments SessionAttachmentsConfig `toml:"attachments"`
Derive SessionDeriveConfig `toml:"derive"`
}
SessionConfig defines session-scoped runtime controls.
func (SessionConfig) Validate ¶
func (c SessionConfig) Validate() error
Validate ensures session-scoped controls are internally consistent.
type SessionDeriveConfig ¶
type SessionDeriveConfig struct {
// MaxReplayBytes is the hard upper bound of the serialized carried transcript.
MaxReplayBytes int `toml:"max_replay_bytes"`
// MaxMessageBytes caps each carried message body.
MaxMessageBytes int `toml:"max_message_bytes"`
}
SessionDeriveConfig bounds the context carried into a continued or forked session.
func DefaultSessionDeriveConfig ¶
func DefaultSessionDeriveConfig() SessionDeriveConfig
DefaultSessionDeriveConfig returns the default carried-context bounds.
func (SessionDeriveConfig) Validate ¶
func (c SessionDeriveConfig) Validate() error
Validate ensures the carried-context bounds are usable.
type SessionEnv ¶
type SessionEnv map[string]SessionEnvBinding
SessionEnv contains only explicitly declared environment names.
func MergeSessionEnv ¶
func MergeSessionEnv(base, override SessionEnv) SessionEnv
MergeSessionEnv applies declarations by name without sharing mutable maps.
func (SessionEnv) Validate ¶
func (env SessionEnv) Validate(path string) error
type SessionEnvBinding ¶
type SessionEnvBinding struct {
Ref string `json:"ref" yaml:"ref" toml:"ref"`
Required bool `json:"required" yaml:"required" toml:"required"`
}
SessionEnvBinding declares a launch-time reference, never a resolved value.
func (*SessionEnvBinding) UnmarshalJSON ¶
func (b *SessionEnvBinding) UnmarshalJSON(data []byte) error
func (*SessionEnvBinding) UnmarshalTOML ¶
func (b *SessionEnvBinding) UnmarshalTOML(value any) error
func (*SessionEnvBinding) UnmarshalYAML ¶
func (b *SessionEnvBinding) UnmarshalYAML(data []byte) error
func (SessionEnvBinding) Validate ¶
func (b SessionEnvBinding) Validate() error
type SessionLimitsConfig ¶
type SessionLimitsConfig struct {
// Timeout is deprecated and enforced by no session; it stays readable and
// writable until its removal in v0.5.0. Idle sessions use
// SessionSupervisionConfig.IdleReleaseAfter.
Timeout time.Duration `toml:"timeout,omitempty"`
}
SessionLimitsConfig holds the released session.limits keys.
func (SessionLimitsConfig) Validate ¶
func (c SessionLimitsConfig) Validate() error
Validate keeps the deprecated session.limits.timeout value well formed.
type SessionMessagingConfig ¶
type SessionMessagingConfig struct {
// RateLimitMessages is the most messages one sender session may admit into one target per window.
// -1 disables the budget; 0 means the default.
RateLimitMessages int `toml:"rate_limit_messages,omitempty"`
// RateLimitWindow is the sliding window the per sender→target budget is counted over.
RateLimitWindow time.Duration `toml:"rate_limit_window,omitempty"`
// ReplyWatchTTL releases an armed reply watch with an expired outcome when no reply arrives in time,
// so a forgotten watch stops keeping its sender awake. An explicit zero never expires a watch.
ReplyWatchTTL time.Duration `toml:"reply_watch_ttl"`
// QueuePromoteAfter promotes a queued message from another session into the live turn as injected
// steering once the target has been in the same turn this long and supports injection. Zero disables it.
QueuePromoteAfter time.Duration `toml:"queue_promote_after"`
}
SessionMessagingConfig bounds agent-to-agent messages sent with compozy__session_prompt.
func DefaultSessionMessagingConfig ¶
func DefaultSessionMessagingConfig() SessionMessagingConfig
DefaultSessionMessagingConfig returns the default agent messaging guards.
func (SessionMessagingConfig) Normalize ¶
func (c SessionMessagingConfig) Normalize() SessionMessagingConfig
Normalize returns a config copy with implicit defaults applied. ReplyWatchTTL and QueuePromoteAfter keep an explicit zero because zero disables them.
func (SessionMessagingConfig) Validate ¶
func (c SessionMessagingConfig) Validate() error
Validate ensures the messaging guards stay inside their supported bounds.
type SessionStopConfig ¶
SessionStopConfig bounds the cooperative phase before process termination.
func DefaultSessionStopConfig ¶
func DefaultSessionStopConfig() SessionStopConfig
func (SessionStopConfig) Validate ¶
func (c SessionStopConfig) Validate() error
type SessionSupervisionConfig ¶
type SessionSupervisionConfig struct {
ActivityHeartbeatInterval time.Duration `toml:"activity_heartbeat_interval,omitempty"`
ProgressNotifyInterval time.Duration `toml:"progress_notify_interval,omitempty"`
PromptDeadline time.Duration `toml:"prompt_deadline,omitempty"`
QuietAfter time.Duration `toml:"quiet_after"`
StopGrace time.Duration `toml:"stop_grace"`
// IdleReleaseAfter releases the agent process of a session that has no turn in
// flight and no work for this long; the next prompt rebinds it. Zero disables.
IdleReleaseAfter time.Duration `toml:"idle_release_after"`
TimeoutCancelGrace time.Duration `toml:"timeout_cancel_grace,omitempty"`
// contains filtered or unexported fields
}
SessionSupervisionConfig defines runtime activity monitoring controls applied to sessions.
func DefaultSessionSupervisionConfig ¶
func DefaultSessionSupervisionConfig() SessionSupervisionConfig
DefaultSessionSupervisionConfig returns the default runtime activity supervision settings.
func (SessionSupervisionConfig) QuietPolicy ¶
func (c SessionSupervisionConfig) QuietPolicy() QuietPolicy
QuietPolicy resolves the current keys and the N-1 loader's independent timers.
func (SessionSupervisionConfig) Validate ¶
func (c SessionSupervisionConfig) Validate() error
Validate ensures session supervision settings are internally consistent.
type ShellConfig ¶
type ShellConfig struct {
Sessions ShellSessionsConfig `toml:"sessions"`
}
ShellConfig persists operator preferences owned by the web shell.
func DefaultShellConfig ¶
func DefaultShellConfig() ShellConfig
DefaultShellConfig returns the built-in operator shell preferences.
func (ShellConfig) Validate ¶
func (c ShellConfig) Validate() error
Validate rejects unsupported shell preference values.
type ShellSessionScope ¶
type ShellSessionScope string
ShellSessionScope identifies the operator's preferred session list breadth.
const ( ShellSessionScopeWorkspace ShellSessionScope = "workspace" ShellSessionScopeAllWorkspaces ShellSessionScope = "all-workspaces" )
type ShellSessionSort ¶
type ShellSessionSort string
ShellSessionSort identifies the operator's preferred session ordering.
const ( ShellSessionSortCreated ShellSessionSort = "created" ShellSessionSortName ShellSessionSort = "name" ShellSessionSortLastActivity ShellSessionSort = "last_activity" ShellSessionSortAttention ShellSessionSort = "attention" ShellSessionSortManual ShellSessionSort = "manual" )
type ShellSessionsConfig ¶
type ShellSessionsConfig struct {
Sort ShellSessionSort `toml:"sort"`
Scope ShellSessionScope `toml:"scope"`
}
ShellSessionsConfig persists session-list preferences across shell restarts.
type SkillRootSpec ¶
type SkillRootSpec struct {
Dir string
SourceSlug string
Kind RootKind
ResourceScope resources.ResourceScope
ProfileID string
WorkspaceID string
}
SkillRootSpec is the typed, profile-aware identity of one skill root.
func ResolveGlobalSkillRoots ¶
func ResolveGlobalSkillRoots(cfg *SkillsConfig, home HomePaths) []SkillRootSpec
ResolveGlobalSkillRoots resolves the user-owned global roots in effective config order.
func (SkillRootSpec) RootID ¶
func (s SkillRootSpec) RootID() string
RootID returns an opaque identity derived only from stable ownership and location fields.
type SkillSourceOverridePresence ¶
SkillSourceOverridePresence reports whether one overlay explicitly owns each source list.
func ReadSkillSourceOverridePresence ¶
func ReadSkillSourceOverridePresence(path string) (SkillSourceOverridePresence, error)
ReadSkillSourceOverridePresence inspects one config overlay without applying inherited values.
type SkillSourcePreset ¶
type SkillSourcePreset struct {
Slug string
Label string
WorkspaceRel string
GlobalPath string
WorkspaceNativeReaders []string
GlobalNativeReaders []string
AlwaysOn bool
DefaultOn bool
}
SkillSourcePreset describes one curated filesystem convention understood by CompozyOS.
func SkillSourcePresets ¶
func SkillSourcePresets() []SkillSourcePreset
SkillSourcePresets returns the closed preset table in public display order.
type SkillSourceValidationError ¶
type SkillSourceValidationError struct {
Code string
Source string
Field string
Path string
ExistingSource string
Valid []string
Suggestion string
Message string
}
SkillSourceValidationError reports one portable source-policy validation failure.
func (*SkillSourceValidationError) Error ¶
func (e *SkillSourceValidationError) Error() string
type SkillsConfig ¶
type SkillsConfig struct {
Enabled bool `toml:"enabled"`
Sources []string `toml:"sources,omitempty"`
CustomSources []string `toml:"custom_sources,omitempty"`
DisabledSkills []string `toml:"disabled_skills,omitempty"`
PollInterval time.Duration `toml:"poll_interval"`
AllowedMarketplaceHooks []string `toml:"allowed_marketplace_hooks,omitempty"`
}
SkillsConfig controls skill loading and discovery.
func (SkillsConfig) Validate ¶
func (c SkillsConfig) Validate() error
Validate ensures the skills configuration is internally consistent.
func (SkillsConfig) ValidateForScope ¶
func (c SkillsConfig) ValidateForScope(scope WriteScope) error
ValidateForScope validates source policy for the layer that will own a write.
func (SkillsConfig) ValidateForScopeAtRoot ¶
func (c SkillsConfig) ValidateForScopeAtRoot(scope WriteScope, layerRoot string, home HomePaths) error
ValidateForScopeAtRoot rejects physical collisions using the owning layer's path base.
type SoulConfig ¶
type SoulConfig struct {
Enabled bool `toml:"enabled"`
MaxBodyBytes int64 `toml:"max_body_bytes"`
ContextProjectionBytes int64 `toml:"context_projection_bytes"`
}
SoulConfig controls optional SOUL.md parsing and projection limits.
func DefaultSoulConfig ¶
func DefaultSoulConfig() SoulConfig
DefaultSoulConfig returns the built-in Agent Soul resolver limits.
func (SoulConfig) Validate ¶
func (c SoulConfig) Validate() error
Validate ensures SOUL.md limits are internally consistent.
type SteerCapability ¶
type SteerCapability string
const ( SteerCapabilityExtension SteerCapability = "steer_ext" SteerCapabilityConcurrentPrompt SteerCapability = "concurrent_prompt" SteerCapabilityNone SteerCapability = "none" )
func (SteerCapability) Validate ¶
func (c SteerCapability) Validate(path string) error
type SubagentsConfig ¶
type SubagentsConfig struct {
ResultMaxChars int `toml:"result_max_chars"`
}
func DefaultSubagentsConfig ¶
func DefaultSubagentsConfig() SubagentsConfig
func (SubagentsConfig) Validate ¶
func (c SubagentsConfig) Validate() error
type TaskConfig ¶
type TaskConfig struct {
Orchestration TaskOrchestrationConfig `toml:"orchestration"`
Recovery TaskRecoveryConfig `toml:"recovery"`
}
TaskConfig controls task runtime behavior.
func DefaultTaskConfig ¶
func DefaultTaskConfig() TaskConfig
DefaultTaskConfig returns built-in task runtime defaults.
func (TaskConfig) Validate ¶
func (c TaskConfig) Validate() error
Validate ensures task config is safe to consume.
type TaskOrchestrationConfig ¶
type TaskOrchestrationConfig struct {
SummaryMaxBytes int `toml:"summary_max_bytes"`
ContextBodyMaxBytes int `toml:"context_body_max_bytes"`
ContextPriorAttempts int `toml:"context_prior_attempts"`
ContextRecentEvents int `toml:"context_recent_events"`
SpawnFailureLimit int `toml:"spawn_failure_limit"`
SchedulerBadTickThreshold int `toml:"scheduler_bad_tick_threshold"`
SchedulerBadTickCooldown time.Duration `toml:"scheduler_bad_tick_cooldown"`
DefaultMaxRuntime time.Duration `toml:"default_max_runtime"`
DesignatedRunMax int `toml:"designated_run_max"`
MaxActiveRunsPerWorkspace int `toml:"max_active_runs_per_workspace"`
StatusProjectionQueueSize int `toml:"status_projection_queue_size"`
StatusProjectionTimeout time.Duration `toml:"status_projection_timeout"`
Profile TaskOrchestrationProfileConfig `toml:"profile"`
Review TaskOrchestrationReviewConfig `toml:"review"`
}
TaskOrchestrationConfig controls bounded task orchestration behavior.
func (TaskOrchestrationConfig) Validate ¶
func (c TaskOrchestrationConfig) Validate(path string) error
Validate ensures task orchestration config is safe to consume.
type TaskOrchestrationProfileConfig ¶
type TaskOrchestrationProfileConfig struct {
DefaultCoordinatorMode string `toml:"default_coordinator_mode"`
DefaultWorkerMode string `toml:"default_worker_mode"`
DefaultWorktreeMode string `toml:"default_worktree_mode"`
AllowTaskProviderOverride bool `toml:"allow_task_provider_override"`
}
TaskOrchestrationProfileConfig controls task execution profile defaults and gates.
func (TaskOrchestrationProfileConfig) Validate ¶
func (c TaskOrchestrationProfileConfig) Validate(path string) error
Validate ensures task execution profile defaults are recognized.
type TaskOrchestrationReviewConfig ¶
type TaskOrchestrationReviewConfig struct {
DefaultPolicy string `toml:"default_policy"`
MaxRounds int `toml:"max_rounds"`
MaxReviewAttempts int `toml:"max_review_attempts"`
Timeout time.Duration `toml:"timeout"`
RapidTerminalWindow time.Duration `toml:"rapid_terminal_window"`
RapidTerminalLimit int `toml:"rapid_terminal_limit"`
MissingWorkMaxItems int `toml:"missing_work_max_items"`
MissingWorkItemMaxBytes int `toml:"missing_work_item_max_bytes"`
ReasonMaxBytes int `toml:"reason_max_bytes"`
ReviewTextMaxBytes int `toml:"review_text_max_bytes"`
NextRoundGuidanceMaxBytes int `toml:"next_round_guidance_max_bytes"`
FailurePolicy string `toml:"failure_policy"`
}
TaskOrchestrationReviewConfig controls task review gate defaults and bounds.
func (TaskOrchestrationReviewConfig) Validate ¶
func (c TaskOrchestrationReviewConfig) Validate(path string) error
Validate ensures review gate defaults are bounded.
type TaskRecoveryConfig ¶
type TaskRecoveryConfig struct {
AllowAgentForce bool `toml:"allow_agent_force"`
}
TaskRecoveryConfig controls task-run recovery verbs.
type TerminalConfig ¶
type TerminalConfig struct {
DefaultShell string `toml:"default_shell"`
ShellIntegration bool `toml:"shell_integration"`
ScrollbackBytes int `toml:"scrollback_bytes"`
DetachedTTL time.Duration `toml:"detached_ttl"`
ExitRetention time.Duration `toml:"exit_retention"`
Recording bool `toml:"recording"`
RecordingRetentionDays int `toml:"recording_retention_days"`
MaxPerWorkspace int `toml:"max_per_workspace"`
MaxPerDaemon int `toml:"max_per_daemon"`
MaxSubscribers int `toml:"max_subscribers"`
}
TerminalConfig controls terminal process, retention, and capacity policy.
func DefaultTerminalConfig ¶
func DefaultTerminalConfig() TerminalConfig
DefaultTerminalConfig returns the built-in terminal policy.
func (TerminalConfig) Validate ¶
func (c TerminalConfig) Validate() error
Validate checks terminal policy without probing the local executable set.
type ToolsArtifactsConfig ¶
type ToolsArtifactsConfig struct {
MaxCount int `toml:"max_count"`
MaxBytes int64 `toml:"max_bytes"`
MaxAge time.Duration `toml:"max_age"`
}
ToolsArtifactsConfig controls retained oversized tool result storage.
func (ToolsArtifactsConfig) Validate ¶
func (c ToolsArtifactsConfig) Validate() error
Validate ensures artifact retention values form real positive bounds.
type ToolsClarifyConfig ¶
ToolsClarifyConfig controls the boot-scoped human clarification broker.
func (ToolsClarifyConfig) Validate ¶
func (c ToolsClarifyConfig) Validate() error
Validate ensures clarification waits are either unbounded (zero) or inside the finite 1s-24h band. Zero covers both the omitted key (via DefaultToolsConfig) and an explicit `0s`.
type ToolsConfig ¶
type ToolsConfig struct {
Enabled bool `toml:"enabled"`
HostedMCPEnabled bool `toml:"hosted_mcp_enabled"`
DefaultMaxResultBytes int64 `toml:"default_max_result_bytes"`
HostedMCP ToolsHostedMCPConfig `toml:"hosted_mcp"`
Clarify ToolsClarifyConfig `toml:"clarify"`
Artifacts ToolsArtifactsConfig `toml:"artifacts"`
Policy ToolsPolicyConfig `toml:"policy"`
}
ToolsConfig controls registry, hosted MCP, and default tool-policy lifecycle settings.
func DefaultToolsConfig ¶
func DefaultToolsConfig() ToolsConfig
DefaultToolsConfig returns the TechSpec defaults for tool registry configuration.
func (ToolsConfig) Validate ¶
func (c ToolsConfig) Validate(mcpServers []MCPServer, providers map[string]ProviderConfig) error
Validate ensures tools lifecycle configuration is deterministic and safe to consume.
type ToolsExternalDefault ¶
type ToolsExternalDefault string
ToolsExternalDefault controls default policy for external executable sources.
const ( // ToolsExternalDefaultDisabled keeps external tools operator-visible but not session-callable by default. ToolsExternalDefaultDisabled ToolsExternalDefault = "disabled" // ToolsExternalDefaultAsk requires approval for external tools that otherwise pass policy. ToolsExternalDefaultAsk ToolsExternalDefault = "ask" // ToolsExternalDefaultEnabled allows external tools that otherwise pass policy. ToolsExternalDefaultEnabled ToolsExternalDefault = "enabled" )
type ToolsHostedMCPConfig ¶
type ToolsHostedMCPConfig struct {
BindNonceTTLSeconds int `toml:"bind_nonce_ttl_seconds"`
}
ToolsHostedMCPConfig controls Compozy-hosted MCP launch binding values.
func (ToolsHostedMCPConfig) BindNonceTTL ¶
func (c ToolsHostedMCPConfig) BindNonceTTL() time.Duration
BindNonceTTL returns the configured hosted MCP nonce lifetime.
func (ToolsHostedMCPConfig) Validate ¶
func (c ToolsHostedMCPConfig) Validate() error
Validate ensures hosted MCP lifecycle values are inside daemon bounds.
type ToolsPolicyConfig ¶
type ToolsPolicyConfig struct {
ExternalDefault ToolsExternalDefault `toml:"external_default"`
ApprovalTimeoutSeconds int `toml:"approval_timeout_seconds"`
TrustedSources []string `toml:"trusted_sources,omitempty"`
}
ToolsPolicyConfig controls default registry policy values consumed by later policy evaluation.
func (ToolsPolicyConfig) ApprovalTimeout ¶
func (c ToolsPolicyConfig) ApprovalTimeout() time.Duration
ApprovalTimeout returns the configured tool approval wait.
func (ToolsPolicyConfig) Validate ¶
func (c ToolsPolicyConfig) Validate(knownMCPSourceOwners map[string]struct{}) error
Validate ensures policy defaults are inside the supported grammar.
type UnknownKeysError ¶
func (*UnknownKeysError) Error ¶
func (e *UnknownKeysError) Error() string
func (*UnknownKeysError) Unwrap ¶
func (e *UnknownKeysError) Unwrap() error
type ValidationError ¶
ValidationError preserves the config path for agent-parseable validation failures.
func (ValidationError) Error ¶
func (e ValidationError) Error() string
type ValueKind ¶
type ValueKind uint8
ValueKind identifies the TOML scalar shape supported by tool writes.
type VaultConfig ¶
type VaultConfig struct {
KeyProvider string `toml:"key_provider"`
}
VaultConfig selects the machine-local encryption key source.
func (VaultConfig) Validate ¶
func (c VaultConfig) Validate() error
type WindowManagerBindingConfig ¶
type WindowManagerBindingConfig struct {
TopCenter string `toml:"top_center"`
BottomCenter string `toml:"bottom_center"`
}
WindowManagerBindingConfig maps each edge-center snap action; "reserved" blocks that edge-center snap.
func (WindowManagerBindingConfig) Validate ¶
func (c WindowManagerBindingConfig) Validate() error
Validate ensures reserved edge centers resolve to supported semantic actions.
type WindowManagerConfig ¶
type WindowManagerConfig struct {
NewWindowPolicy string `toml:"new_window_policy"`
SmallViewportPolicy string `toml:"small_viewport_policy"`
FocusPolicy string `toml:"focus_policy"`
FocusWrap bool `toml:"focus_wrap"`
FocusFollowsPointer bool `toml:"focus_follows_pointer"`
RaiseOnFocus bool `toml:"raise_on_focus"`
DragAwayPolicy string `toml:"drag_away_policy"`
GroupMoveModifier string `toml:"group_move_modifier"`
SwapModifier string `toml:"swap_modifier"`
HistoryLimit int `toml:"history_limit"`
ClosedEntryLimit int `toml:"closed_entry_limit"`
DesktopTransition string `toml:"desktop_transition"`
Gaps WindowManagerGapsConfig `toml:"gaps"`
Snap WindowManagerSnapConfig `toml:"snap"`
Bindings WindowManagerBindingConfig `toml:"bindings"`
Shortcuts map[string]windowmanager.ShortcutBinding `toml:"shortcuts,omitempty"`
GlobalShortcuts map[string]string `toml:"global_shortcuts,omitempty"`
}
WindowManagerConfig controls window topology behavior and browser projection defaults.
func ApplyWindowManagerOverlayFile ¶
func ApplyWindowManagerOverlayFile( path string, defaults WindowManagerConfig, ) (WindowManagerConfig, error)
ApplyWindowManagerOverlayFile applies only the optional [window_manager] section at path onto the supplied active defaults.
func DefaultWindowManagerConfig ¶
func DefaultWindowManagerConfig() WindowManagerConfig
DefaultWindowManagerConfig returns the built-in behavior shared by daemon and web clients.
func (WindowManagerConfig) Validate ¶
func (c WindowManagerConfig) Validate() error
Validate rejects incomplete or internally conflicting window-manager behavior.
type WindowManagerGapsConfig ¶
type WindowManagerGapsConfig struct {
Inner int `toml:"inner"`
Top int `toml:"top"`
Right int `toml:"right"`
Bottom int `toml:"bottom"`
Left int `toml:"left"`
}
WindowManagerGapsConfig controls the shared inner gap and work-area insets.
func (WindowManagerGapsConfig) Validate ¶
func (c WindowManagerGapsConfig) Validate() error
Validate ensures projection gaps stay within a practical viewport-safe range.
type WindowManagerSnapConfig ¶
type WindowManagerSnapConfig struct {
EdgeBand int `toml:"edge_band"`
CornerReach int `toml:"corner_reach"`
ExitSlack int `toml:"exit_slack"`
RepeatRatios []float64 `toml:"repeat_ratios"`
}
WindowManagerSnapConfig controls pointer target resolution and repeated side ratios.
func (WindowManagerSnapConfig) Validate ¶
func (c WindowManagerSnapConfig) Validate() error
Validate ensures snap thresholds and ratios can resolve deterministic targets.
type WorkspaceDiscoveryRoot ¶
type WorkspaceDiscoveryRoot struct {
Dir string
WorkspaceRoot string
Source WorkspaceDiscoverySource
ProfileID string
WorkspaceID string
ResourceScopeID string
OperatorHomeDir string
}
WorkspaceDiscoveryRoot describes a filesystem root participating in multi-root resource discovery.
func WorkspaceDiscoveryRoots ¶
func WorkspaceDiscoveryRoots( rootDir string, additionalDirs []string, homePaths HomePaths, profileName string, ) []WorkspaceDiscoveryRoot
WorkspaceDiscoveryRoots returns ordered discovery roots for workspace-visible resources. A non-empty profile name inserts the two profile-bound roots at their precedence slots.
func (WorkspaceDiscoveryRoot) AgentsDir ¶
func (r WorkspaceDiscoveryRoot) AgentsDir() string
AgentsDir returns the agent-definition directory for this discovery root.
func (WorkspaceDiscoveryRoot) LoopsDir ¶
func (r WorkspaceDiscoveryRoot) LoopsDir() string
LoopsDir returns the loop-definition directory for this discovery root.
func (WorkspaceDiscoveryRoot) SkillsDirs ¶
func (r WorkspaceDiscoveryRoot) SkillsDirs(cfg *SkillsConfig) []SkillRootSpec
SkillsDirs resolves configured roots owned by this discovery layer.
type WorkspaceDiscoverySource ¶
type WorkspaceDiscoverySource string
WorkspaceDiscoverySource identifies where a discovery root came from.
const ( // WorkspaceDiscoverySourceWorkspace marks the primary workspace root. WorkspaceDiscoverySourceWorkspace WorkspaceDiscoverySource = "workspace" // WorkspaceDiscoverySourceAdditional marks an additional workspace root. WorkspaceDiscoverySourceAdditional WorkspaceDiscoverySource = "additional" // WorkspaceDiscoverySourceGlobal marks the global Compozy home root. WorkspaceDiscoverySourceGlobal WorkspaceDiscoverySource = "global" // WorkspaceDiscoverySourceProfile marks the active profile's personal root. WorkspaceDiscoverySourceProfile WorkspaceDiscoverySource = "profile" // WorkspaceDiscoverySourceWorkspaceProfile marks the project root bound to the active profile name. WorkspaceDiscoverySourceWorkspaceProfile WorkspaceDiscoverySource = "workspace_profile" )
type WorktreesConfig ¶
type WorktreesConfig struct {
Root string `toml:"root"`
RunBranchNamespace string `toml:"run_branch_namespace"`
CopyList []string `toml:"copy_list,omitempty"`
SetupCommand string `toml:"setup_command"`
SetupTimeout time.Duration `toml:"setup_timeout"`
DiscoveryCacheTTL time.Duration `toml:"discovery_cache_ttl"`
}
WorktreesConfig controls worktree placement, discovery, and bootstrap.
func DefaultWorktreesConfig ¶
func DefaultWorktreesConfig() WorktreesConfig
DefaultWorktreesConfig returns the built-in worktree defaults.
func (WorktreesConfig) ResolveRoot ¶
func (c WorktreesConfig) ResolveRoot(homePaths HomePaths) string
ResolveRoot resolves the central placement root without changing existing worktrees.
func (WorktreesConfig) Validate ¶
func (c WorktreesConfig) Validate() error
Validate rejects invalid worktree configuration and names the offending key.
type WriteScope ¶
type WriteScope string
WriteScope identifies the config scope a write should target.
const ( // WriteScopeUser targets the user-wide Compozy home config. WriteScopeUser WriteScope = "user" // WriteScopeProfile targets the active profile's personal config. WriteScopeProfile WriteScope = "profile" // WriteScopeWorkspace targets a workspace-local Compozy overlay. WriteScopeWorkspace WriteScope = "workspace" )
func (WriteScope) Validate ¶
func (s WriteScope) Validate() error
Validate ensures the write scope is supported.
type WriteTarget ¶
type WriteTarget struct {
// contains filtered or unexported fields
}
WriteTarget captures a semantic destination while keeping the on-disk path internal to the config package.
func ResolveConfigWriteTarget ¶
func ResolveConfigWriteTarget( homePaths HomePaths, workspaceRoot string, scope WriteScope, profileName string, ) (WriteTarget, error)
ResolveConfigWriteTarget resolves the canonical config overlay destination for the requested scope.
func ResolveMCPSidecarWriteTarget ¶
func ResolveMCPSidecarWriteTarget( homePaths HomePaths, workspaceRoot string, scope WriteScope, profileName string, ) (WriteTarget, error)
ResolveMCPSidecarWriteTarget resolves the canonical MCP sidecar destination for the requested scope.
func (WriteTarget) Kind ¶
func (t WriteTarget) Kind() WriteTargetKind
Kind returns the semantic destination identifier for the write target.
func (WriteTarget) Path ¶
func (t WriteTarget) Path() string
Path returns the resolved filesystem path for operator-facing diagnostics and tools.
func (WriteTarget) Scope ¶
func (t WriteTarget) Scope() WriteScope
Scope returns the write scope for the target.
type WriteTargetKind ¶
type WriteTargetKind string
WriteTargetKind describes the canonical persistence destination without exposing filesystem paths to higher layers.
const ( // WriteTargetGlobalConfig writes `~/.compozy/config.toml`. WriteTargetGlobalConfig WriteTargetKind = "global-config" // WriteTargetProfileConfig writes `~/.compozy/profiles/<name>/config.toml`. WriteTargetProfileConfig WriteTargetKind = "profile-config" // WriteTargetWorkspaceConfig writes `<workspace>/.compozy/config.toml`. WriteTargetWorkspaceConfig WriteTargetKind = "workspace-config" // WriteTargetGlobalMCPSidecar writes `~/.compozy/mcp.json`. WriteTargetGlobalMCPSidecar WriteTargetKind = "global-mcp-sidecar" // WriteTargetProfileMCPSidecar writes `~/.compozy/profiles/<name>/mcp.json`. WriteTargetProfileMCPSidecar WriteTargetKind = "profile-mcp-sidecar" // WriteTargetWorkspaceMCPSidecar writes `<workspace>/.compozy/mcp.json`. WriteTargetWorkspaceMCPSidecar WriteTargetKind = "workspace-mcp-sidecar" )
Source Files
¶
- agent.go
- agent_clone.go
- agent_create.go
- agent_delete.go
- agent_discovery.go
- agent_duplicate.go
- agent_edit.go
- agent_hook_retirement.go
- agent_name.go
- agent_origin.go
- agent_resource.go
- agent_runtime_options.go
- agent_skills.go
- agent_validation.go
- app.go
- attention.go
- automation.go
- automation_agent_target.go
- automation_suggestions.go
- autonomy.go
- bootstrap.go
- builtin_agents.go
- capabilities.go
- capabilities_decode.go
- capabilities_digest.go
- capabilities_validation.go
- cmd_palette.go
- cmd_palette_overlay.go
- config.go
- config_agent_session.go
- config_agent_validation.go
- config_clone.go
- config_clone_automation.go
- config_clone_loops.go
- config_default.go
- config_dotenv_lookup.go
- config_extensions.go
- config_load.go
- config_marketplace_validation.go
- config_paths.go
- config_session_messaging.go
- config_validate_features.go
- config_validation.go
- config_validation_helpers.go
- daemon.go
- daemon_load.go
- defaults.go
- defaults_runtime.go
- dotenv.go
- dotenv_parse.go
- dotenv_value.go
- dotenv_write.go
- extensions.go
- fallback_chain.go
- file_io.go
- gateway_config.go
- goals.go
- home.go
- home_extension_data.go
- hook_overlay_read.go
- hooks.go
- http.go
- launch_command.go
- log.go
- loop_autopause.go
- loop_lifecycle.go
- loops.go
- marketplace.go
- marketplace_plugin_sources.go
- mcp.go
- mcp_overlay.go
- mcp_resource.go
- mcp_server.go
- mcp_server_validation.go
- mcpjson.go
- mcpjson_write.go
- merge.go
- merge_app.go
- merge_attention.go
- merge_cmd_palette.go
- merge_collections.go
- merge_daemon.go
- merge_extensions.go
- merge_features.go
- merge_gateway.go
- merge_goals.go
- merge_load.go
- merge_log.go
- merge_loops.go
- merge_mcp.go
- merge_observability.go
- merge_overlay.go
- merge_provider.go
- merge_redact.go
- merge_roles.go
- merge_session.go
- merge_session_attachments.go
- merge_shell.go
- merge_task.go
- merge_terminal.go
- merge_tools.go
- merge_window_manager.go
- merge_worktrees.go
- persistence.go
- persistence_document_mutation.go
- persistence_document_ranges.go
- persistence_helpers.go
- persistence_marketplace.go
- persistence_memory_retirement.go
- persistence_render.go
- persistence_transaction.go
- persistence_tree.go
- profile_layer_diagnostics.go
- profile_overlay.go
- profile_secret_refs.go
- provider.go
- provider_auth_merge.go
- provider_builtin.go
- provider_clone.go
- provider_clone_helpers.go
- provider_effective.go
- provider_merge.go
- provider_models.go
- provider_models_validation.go
- provider_reasoning.go
- provider_resolve.go
- provider_resolved_validation.go
- provider_retired.go
- provider_runtime_sources.go
- provider_steer.go
- provider_validation.go
- redact.go
- redaction.go
- role_sources.go
- role_tool_surface.go
- roles.go
- session_attachments_config.go
- session_derive_config.go
- session_env.go
- session_env_mutation.go
- session_stop.go
- shell.go
- skill_source_overlay.go
- skill_source_presets.go
- skill_source_roots.go
- skill_source_slugs.go
- skill_source_validation.go
- subagents.go
- supervision_compatibility.go
- task_orchestration.go
- task_orchestration_validation.go
- terminal.go
- tool_grammar.go
- tool_surface.go
- tool_surface_acp_options.go
- tool_surface_automation.go
- tool_surface_coercion.go
- tool_surface_entries.go
- tool_surface_loops.go
- tool_surface_reflection.go
- tool_surface_security.go
- tool_surface_session_attachments.go
- tool_surface_task.go
- tool_surface_types.go
- tool_surface_worktrees.go
- tools.go
- unknown_keys.go
- vault.go
- window_manager.go
- window_manager_overlay.go
- workspace_overlay.go
- worktrees.go
- write_override.go
- write_scope_policy.go