configapply

package
v0.260507.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(router *swagger.RouteGroup, handler *Handler)

RegisterRoutes registers all config apply routes with swagger documentation

Types

type ApplyConfigResponse

type ApplyConfigResponse struct {
	Success          bool               `json:"success"`
	SettingsResult   config.ApplyResult `json:"settingsResult"`
	OnboardingResult config.ApplyResult `json:"onboardingResult"`
	CreatedFiles     []string           `json:"createdFiles"`
	UpdatedFiles     []string           `json:"updatedFiles"`
	BackupPaths      []string           `json:"backupPaths"`
}

ApplyConfigResponse is the response for ApplyClaudeConfig

type ApplyOpenCodeConfigResponse

type ApplyOpenCodeConfigResponse struct {
	config.ApplyResult
}

ApplyOpenCodeConfigResponse is the response for ApplyOpenCodeConfigFromState

type HTTPTransportConfigUpdate added in v0.260409.1540

type HTTPTransportConfigUpdate struct {
	RespectEnvProxy *bool   `json:"respect_env_proxy"` // nil = no change
	GlobalProxyURL  *string `json:"global_proxy_url"`  // nil = no change; "" = clear
}

HTTPTransportConfigUpdate represents the update request for HTTP transport settings

type Handler

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

Handler handles config apply HTTP requests

func NewHandler

func NewHandler(cfg *config.Config, host string) *Handler

NewHandler creates a new configapply handler

func (*Handler) ApplyClaudeConfig

func (h *Handler) ApplyClaudeConfig(c *gin.Context)

ApplyClaudeConfig generates and applies Claude Code configuration from system state

func (*Handler) ApplyOpenCodeConfigFromState

func (h *Handler) ApplyOpenCodeConfigFromState(c *gin.Context)

ApplyOpenCodeConfig generates and applies OpenCode configuration from system state

func (*Handler) GetConfig added in v0.260409.1540

func (h *Handler) GetConfig(c *gin.Context)

GetConfig returns the current system configuration Only returns settings that are safe to expose to the UI

func (*Handler) GetOpenCodeConfigPreview

func (h *Handler) GetOpenCodeConfigPreview(c *gin.Context)

GetOpenCodeConfigPreview generates OpenCode configuration preview from system state This endpoint returns the config JSON for display purposes without applying it

func (*Handler) RestoreClaudeConfig added in v0.260507.1

func (h *Handler) RestoreClaudeConfig(c *gin.Context)

RestoreClaudeConfig rolls back Claude Code config files to their most recent backup. Mirrors the CLI 'agent restore claude-code' flow.

func (*Handler) RestoreOpenCodeConfig added in v0.260507.1

func (h *Handler) RestoreOpenCodeConfig(c *gin.Context)

RestoreOpenCodeConfig rolls back OpenCode config files to their most recent backup. Mirrors the CLI 'agent restore opencode' flow.

func (*Handler) UpdateConfig added in v0.260409.1540

func (h *Handler) UpdateConfig(c *gin.Context)

UpdateConfig updates the system configuration Only allows updating specific safe fields

type OpenCodeConfigPreviewResponse

type OpenCodeConfigPreviewResponse struct {
	Success    bool   `json:"success"`
	ConfigJSON string `json:"configJson"`
	ScriptWin  string `json:"scriptWindows"`
	ScriptUnix string `json:"scriptUnix"`
	Message    string `json:"message,omitempty"`
}

OpenCodeConfigPreviewResponse is the response for GetOpenCodeConfigPreview

type RestoreConfigResponse added in v0.260507.1

type RestoreConfigResponse struct {
	Success           bool     `json:"success"`
	AgentType         string   `json:"agentType"`
	RestoredFiles     []string `json:"restoredFiles"`
	PreRestoreBackups []string `json:"preRestoreBackups"`
	Failures          []string `json:"failures,omitempty"`
	Message           string   `json:"message"`
}

RestoreConfigResponse is the response for the restore endpoints. It mirrors the agent.RestoreAgentResult so callers can drive UI from the same data the CLI prints.

Jump to

Keyboard shortcuts

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