Documentation
¶
Index ¶
- func RegisterRoutes(router *swagger.RouteGroup, handler *Handler)
- type Handler
- func (h *Handler) CreateProfile(c *gin.Context)
- func (h *Handler) DeleteProfile(c *gin.Context)
- func (h *Handler) DeleteProfileClaudeConfig(c *gin.Context)
- func (h *Handler) GetProfileClaudeConfig(c *gin.Context)
- func (h *Handler) GetProfiles(c *gin.Context)
- func (h *Handler) GetScenarioConfig(c *gin.Context)
- func (h *Handler) GetScenarioDescriptors(c *gin.Context)
- func (h *Handler) GetScenarioFlag(c *gin.Context)
- func (h *Handler) GetScenarioIntFlag(c *gin.Context)
- func (h *Handler) GetScenarioStringFlag(c *gin.Context)
- func (h *Handler) GetScenarios(c *gin.Context)
- func (h *Handler) SetScenarioConfig(c *gin.Context)
- func (h *Handler) SetScenarioFlag(c *gin.Context)
- func (h *Handler) SetScenarioIntFlag(c *gin.Context)
- func (h *Handler) SetScenarioStringFlag(c *gin.Context)
- func (h *Handler) UpdateProfile(c *gin.Context)
- func (h *Handler) UpdateProfileClaudeConfig(c *gin.Context)
- type ProfileClaudeConfigData
- type ProfileClaudeConfigRequest
- type ProfileClaudeConfigResponse
- type ProfileCreateRequest
- type ProfileUpdateRequest
- type RemoteControlController
- type ScenarioDescriptorsResponse
- type ScenarioFlagResponse
- type ScenarioFlagUpdateRequest
- type ScenarioIntFlagUpdateRequest
- type ScenarioResponse
- type ScenarioStringFlagUpdateRequest
- type ScenarioUpdateRequest
- type ScenarioUpdateResponse
- type ScenariosResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
func RegisterRoutes(router *swagger.RouteGroup, handler *Handler)
RegisterRoutes registers all scenario routes with swagger documentation
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles scenario HTTP requests
func NewHandler ¶
func NewHandler(cfg *config.Config, rcControl RemoteControlController) *Handler
NewHandler creates a new scenario handler
func (*Handler) CreateProfile ¶
CreateProfile creates a new profile for a base scenario
func (*Handler) DeleteProfile ¶
DeleteProfile deletes a profile by ID
func (*Handler) DeleteProfileClaudeConfig ¶ added in v0.260723.1
DeleteProfileClaudeConfig clears only the profile-specific delta, preserving the profile, its rules, and the main configuration it inherits.
func (*Handler) GetProfileClaudeConfig ¶ added in v0.260723.1
GetProfileClaudeConfig returns the profile's concrete effective values and its inherited base so the UI can explain and reset overrides accurately.
func (*Handler) GetProfiles ¶
GetProfiles returns all profiles for a base scenario
func (*Handler) GetScenarioConfig ¶
GetScenarioConfig returns configuration for a specific scenario
func (*Handler) GetScenarioDescriptors ¶ added in v0.260611.1
GetScenarios returns all scenario configurations GetScenarioDescriptors returns all registered scenario descriptors from the registry.
func (*Handler) GetScenarioFlag ¶
GetScenarioFlag returns a specific flag value for a scenario
func (*Handler) GetScenarioIntFlag ¶ added in v0.260611.1
GetScenarioIntFlag returns a specific integer flag value for a scenario
func (*Handler) GetScenarioStringFlag ¶
GetScenarioStringFlag returns a specific string flag value for a scenario
func (*Handler) GetScenarios ¶
func (*Handler) SetScenarioConfig ¶
SetScenarioConfig creates or updates scenario configuration
func (*Handler) SetScenarioFlag ¶
SetScenarioFlag sets a specific flag value for a scenario
func (*Handler) SetScenarioIntFlag ¶ added in v0.260611.1
SetScenarioIntFlag sets a specific integer flag value for a scenario
func (*Handler) SetScenarioStringFlag ¶
SetScenarioStringFlag sets a specific string flag value for a scenario
func (*Handler) UpdateProfile ¶
UpdateProfile updates a profile's name and/or mode
func (*Handler) UpdateProfileClaudeConfig ¶ added in v0.260723.1
UpdateProfileClaudeConfig persists a minimal delta and materializes it immediately. CLI launch uses the same resolver and will reproduce the file.
type ProfileClaudeConfigData ¶ added in v0.260723.1
type ProfileClaudeConfigData struct {
BasePreferences agent.ClaudeCodePrefs `json:"basePreferences"`
Preferences agent.ClaudeCodePrefs `json:"preferences"`
InheritedDefaultMode string `json:"inheritedDefaultMode"`
DefaultMode string `json:"defaultMode"`
HasOverrides bool `json:"hasOverrides"`
SettingsPath string `json:"settingsPath"`
SettingsExists bool `json:"settingsExists"`
}
type ProfileClaudeConfigRequest ¶ added in v0.260723.1
type ProfileClaudeConfigRequest struct {
Preferences *agent.ClaudeCodePrefs `json:"preferences" binding:"required"`
DefaultMode string `json:"defaultMode,omitempty"`
}
ProfileClaudeConfigRequest is the complete desired typed configuration for one Claude Code profile. The backend persists only its delta from inheritance.
type ProfileClaudeConfigResponse ¶ added in v0.260723.1
type ProfileClaudeConfigResponse struct {
Success bool `json:"success"`
Data ProfileClaudeConfigData `json:"data"`
}
type ProfileCreateRequest ¶
type ProfileCreateRequest struct {
Name string `json:"name" binding:"required"`
Unified bool `json:"unified,omitempty"` // Optional, defaults to false (separate mode)
}
ProfileCreateRequest represents the request to create or rename a profile
type ProfileUpdateRequest ¶ added in v0.260414.2000
type ProfileUpdateRequest struct {
Name string `json:"name,omitempty"`
Unified *bool `json:"unified,omitempty"` // Pointer to distinguish zero from unset; nil = no change
}
ProfileUpdateRequest represents the request to update a profile
type RemoteControlController ¶
type RemoteControlController interface {
StartRemoteCoder() error
StopRemoteCoder()
SyncRemoteCoderBots(ctx context.Context) error
}
RemoteControlController defines the interface for controlling remote coder service
type ScenarioDescriptorsResponse ¶ added in v0.260611.1
type ScenarioDescriptorsResponse struct {
Success bool `json:"success" example:"true"`
Data []typ.ScenarioDescriptor `json:"data"`
}
ScenarioDescriptorsResponse represents the response for listing scenario descriptors
type ScenarioFlagResponse ¶
type ScenarioFlagResponse struct {
Success bool `json:"success" example:"true"`
Data struct {
Scenario typ.RuleScenario `json:"scenario" example:"claude_code"`
Flag string `json:"flag" example:"unified"`
Value bool `json:"value" example:"true"`
} `json:"data"`
}
ScenarioFlagResponse represents the response for a scenario flag
type ScenarioFlagUpdateRequest ¶
type ScenarioFlagUpdateRequest struct {
Value bool `json:"value"`
}
ScenarioFlagUpdateRequest represents the request to update a boolean flag
type ScenarioIntFlagUpdateRequest ¶ added in v0.260611.1
type ScenarioIntFlagUpdateRequest struct {
Value int `json:"value"`
}
ScenarioIntFlagUpdateRequest represents the request to update an integer flag
type ScenarioResponse ¶
type ScenarioResponse struct {
Success bool `json:"success" example:"true"`
Data typ.ScenarioConfig `json:"data"`
}
ScenarioResponse represents the response for a single scenario
type ScenarioStringFlagUpdateRequest ¶
type ScenarioStringFlagUpdateRequest struct {
Value string `json:"value"`
}
ScenarioStringFlagUpdateRequest represents the request to update a string flag
type ScenarioUpdateRequest ¶
type ScenarioUpdateRequest struct {
Scenario typ.RuleScenario `json:"scenario" binding:"required" example:"claude_code"`
Flags typ.ScenarioFlags `json:"flags" binding:"required"`
}
ScenarioUpdateRequest represents the request to update a scenario
type ScenarioUpdateResponse ¶
type ScenarioUpdateResponse struct {
Success bool `json:"success" example:"true"`
Message string `json:"message" example:"Scenario config saved successfully"`
Data typ.ScenarioConfig `json:"data"`
}
ScenarioUpdateResponse represents the response for updating scenario
type ScenariosResponse ¶
type ScenariosResponse struct {
Success bool `json:"success" example:"true"`
Data []typ.ScenarioConfig `json:"data"`
}
ScenariosResponse represents the response for getting all scenarios