Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeStoredServiceConfig(data []byte) (any, error)
- func ValidateCWDAllowed(cwd string, roots []string) error
- type CodexConfig
- type Manager
- func (m *Manager) Create(ctx context.Context, cfg ServiceConfig) error
- func (m *Manager) Delete(ctx context.Context, id string) error
- func (m *Manager) Get(ctx context.Context, id string) (ServiceConfig, error)
- func (m *Manager) List(ctx context.Context) ([]ServiceConfig, error)
- func (m *Manager) Update(ctx context.Context, id string, cfg ServiceConfig) error
- type ServiceConfig
Constants ¶
View Source
const ( CodexModeAdapter = "adapter" CodexModeAppServer = "app_server" )
Variables ¶
View Source
var ErrServiceNotConfigured = fmt.Errorf("acp service is not configured")
Functions ¶
func ValidateCWDAllowed ¶
Types ¶
type CodexConfig ¶
type CodexConfig struct {
Mode string `json:"mode,omitempty"`
AdapterCommand string `json:"adapter_command,omitempty"`
AdapterArgs []string `json:"adapter_args,omitempty"`
AppServerCommand string `json:"app_server_command,omitempty"`
AppServerArgs []string `json:"app_server_args,omitempty"`
DefaultProfile string `json:"default_profile,omitempty"`
InitialAuthMode string `json:"initial_auth_mode,omitempty"`
TraceJSON bool `json:"trace_json,omitempty"`
RetryTurnOnCrash bool `json:"retry_turn_on_crash,omitempty"`
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(store configstore.ConfigStore) *Manager
type ServiceConfig ¶
type ServiceConfig struct {
ID string `json:"id"`
Name string `json:"name"`
AgentType string `json:"agent_type"`
CWD string `json:"cwd"`
AllowedRoots []string `json:"allowed_roots,omitempty"`
DefaultModel string `json:"default_model,omitempty"`
Env map[string]string `json:"env,omitempty"`
ConfigOverrides map[string]string `json:"config_overrides,omitempty"`
IdleTTL time.Duration `json:"idle_ttl,omitempty"`
MaxInstances int `json:"max_instances,omitempty"`
PermissionMode string `json:"permission_mode,omitempty"`
Disabled bool `json:"disabled"`
Description string `json:"description,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Codex *CodexConfig `json:"codex,omitempty"`
}
func (*ServiceConfig) Normalize ¶
func (c *ServiceConfig) Normalize()
func (*ServiceConfig) NormalizeTimestamps ¶
func (c *ServiceConfig) NormalizeTimestamps(now time.Time)
func (ServiceConfig) Validate ¶
func (c ServiceConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.