Documentation
¶
Index ¶
- type Attribution
- type ChangeNotifier
- type ClaudeSettings
- type Repository
- type Server
- func (s *Server) GetClaudeSettings(ctx context.Context, ...) (*connect.Response[taskguildv1.GetClaudeSettingsResponse], error)
- func (s *Server) SyncClaudeSettingsFromDir(ctx context.Context, ...) (*connect.Response[taskguildv1.SyncClaudeSettingsFromDirResponse], error)
- func (s *Server) UpdateClaudeSettings(ctx context.Context, ...) (*connect.Response[taskguildv1.UpdateClaudeSettingsResponse], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribution ¶ added in v0.0.32
type Attribution struct {
Commit *string `yaml:"commit,omitempty"`
Pr *string `yaml:"pr,omitempty"`
}
Attribution holds optional attribution messages appended to commits and PRs. nil = not configured, pointer to "" = explicitly off, pointer to value = custom text.
type ChangeNotifier ¶
type ChangeNotifier interface {
NotifyClaudeSettingsChange(projectID string)
}
ChangeNotifier is called after settings updates from the UI to push a SyncClaudeSettingsCommand to connected Agent Managers.
type ClaudeSettings ¶
type ClaudeSettings struct {
ProjectID string `yaml:"project_id"`
Language *string `yaml:"language,omitempty"`
Attribution *Attribution `yaml:"attribution,omitempty"`
UpdatedAt time.Time `yaml:"updated_at"`
}
ClaudeSettings represents project-scoped Claude Code settings (e.g. language) that are synced to .claude/settings.json on agents. One ClaudeSettings per project.
type Repository ¶
type Repository interface {
// Get returns the settings for a project.
// Returns an empty ClaudeSettings (not an error) if none exists yet.
Get(ctx context.Context, projectID string) (*ClaudeSettings, error)
// Upsert creates or replaces the settings for a project.
Upsert(ctx context.Context, cs *ClaudeSettings) error
}
Repository provides persistence for project-scoped Claude Code settings.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the ClaudeSettingsService RPC handlers.
func NewServer ¶
func NewServer(repo Repository, notifier ChangeNotifier) *Server
NewServer creates a new Claude Code settings service server.
func (*Server) GetClaudeSettings ¶
func (s *Server) GetClaudeSettings(ctx context.Context, req *connect.Request[taskguildv1.GetClaudeSettingsRequest]) (*connect.Response[taskguildv1.GetClaudeSettingsResponse], error)
GetClaudeSettings returns the settings for a project.
func (*Server) SyncClaudeSettingsFromDir ¶
func (s *Server) SyncClaudeSettingsFromDir(ctx context.Context, req *connect.Request[taskguildv1.SyncClaudeSettingsFromDirRequest]) (*connect.Response[taskguildv1.SyncClaudeSettingsFromDirResponse], error)
SyncClaudeSettingsFromDir reads .claude/settings.json from the given directory and merges its settings into the stored set.
func (*Server) UpdateClaudeSettings ¶
func (s *Server) UpdateClaudeSettings(ctx context.Context, req *connect.Request[taskguildv1.UpdateClaudeSettingsRequest]) (*connect.Response[taskguildv1.UpdateClaudeSettingsResponse], error)
UpdateClaudeSettings replaces the settings for a project.