Files
skillshare/internal/projects/dto.go
T
Rusty Shackleford 5729eee088 feat(project): manage global registrations from the CLI (#603)
Add global project list, show, add, edit, sync and remove so setup scripts
can register repositories without editing YAML or opening the dashboard.
Keep dry runs read-only and report completed work when a target fails.

Reuse the shared project service and sync runners. Include command docs,
translations, completions and regression coverage. Quote overlap hints for
their shell and log partial project syncs consistently with ordinary sync.
2026-10-26 01:38:04 +08:00

32 lines
1.1 KiB
Go

package projects
// Resource is one resource kind of a project. nil means it is not sent.
type Resource struct {
// Disabled preserves config state for text adapters without changing the wire DTO.
Disabled bool `json:"-"`
Mode string `json:"mode"`
TargetNaming string `json:"targetNaming,omitempty"`
Include []string `json:"include"`
Exclude []string `json:"exclude"`
}
type Group struct {
Target string `json:"target"` // target name, as the sync and target lists show it
Tools []string `json:"tools"`
SkillsPath string `json:"skillsPath"`
AgentsPath string `json:"agentsPath"`
}
type Item struct {
Root string `json:"root"` // as written in config.yaml
Path string `json:"path"` // absolute
Name string `json:"name"`
CustomName string `json:"customName,omitempty"`
Targets []string `json:"targets"`
Skills *Resource `json:"skills"`
Agents *Resource `json:"agents"`
Groups []Group `json:"groups"`
Missing bool `json:"missing"`
HasOwnConfig bool `json:"hasOwnConfig"`
}