refactor: remove core skill direct loading, skills owned by clawhubadapter only

- Drop skill.NewManager from homed bootstrap; skills dir no longer core-managed
- Remove GetInjectedPrompt system-prompt injection (skills are not first-class)
- Delete internal/skill package, SkillAPI, webui /api/v1/skills, status skills block
- ConfigRegistry: plugin config tables now created only via RegisterDef; arbitrary
  scope Set/Get no longer implicitly creates config_<name> tables (fixes stray
  config_today_task table from SKILL directory name being used as a scope)
This commit is contained in:
root
2026-08-02 11:40:13 +08:00
parent 5eb6484dde
commit 85aa68ccad
13 changed files with 10 additions and 333 deletions

View File

@ -90,7 +90,6 @@ type PluginSDK struct {
status StatusAPI
supervisor SupervisorAPI
skill SkillAPI
adapter AdapterAPI
tracker TrackerAPI
config ConfigAPI
@ -150,7 +149,6 @@ type SDKConfig struct {
Status StatusAPI
Supervisor SupervisorAPI
Skill SkillAPI
Adapter AdapterAPI
Tracker TrackerAPI
Config ConfigAPI
@ -187,7 +185,6 @@ func New(name string, cfg SDKConfig) *PluginSDK {
status: cfg.Status,
supervisor: cfg.Supervisor,
skill: cfg.Skill,
adapter: cfg.Adapter,
tracker: cfg.Tracker,
config: cfg.Config,
@ -198,7 +195,6 @@ func New(name string, cfg SDKConfig) *PluginSDK {
func (s *PluginSDK) Status() StatusAPI { return s.status }
func (s *PluginSDK) Supervisor() SupervisorAPI { return s.supervisor }
func (s *PluginSDK) Skill() SkillAPI { return s.skill }
func (s *PluginSDK) Adapter() AdapterAPI { return s.adapter }
func (s *PluginSDK) Tracker() TrackerAPI { return s.tracker }
func (s *PluginSDK) Config() ConfigAPI { return s.config }

View File

@ -1,22 +0,0 @@
package sdk
// SkillAPI provides access to the skill manager.
type SkillAPI interface {
List() []*Skill
Get(name string) *Skill
Install(name, content string) error
Uninstall(name string) error
Toggle(name string, enabled bool) error
}
// Skill is a neutral description of an installed skill.
type Skill struct {
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
Author string `json:"author,omitempty"`
Entry string `json:"entry,omitempty"`
Source string `json:"source,omitempty"`
Enabled bool `json:"enabled"`
RawContent string `json:"-"`
}

View File

@ -21,7 +21,6 @@ type KernelStatus struct {
Documents DocumentStatus `json:"documents"`
TextMemory TextMemoryStatus `json:"text_memory"`
Social SocialStatus `json:"social"`
Skills SkillsStatus `json:"skills"`
LLM LLMStatus `json:"llm"`
@ -72,11 +71,6 @@ type SocialStatus struct {
PersonCount int `json:"person_count"`
}
type SkillsStatus struct {
Available bool `json:"available"`
SkillList []string `json:"skill_list,omitempty"`
}
type LLMStatus struct {
Available bool `json:"available"`
Provider string `json:"provider,omitempty"`