chore: checkpoint uncommitted work before session store fix
Pre-existing work-in-progress in the tree: karakeep, snippets, skills-health and redaction ingesters, the opencode.db session sweep, gossip and metrics changes. Checkpointed as-is so the adapter fix in the next commit stays reviewable on its own.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/david/knox/internal/skillsrepo"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// NewSkillsHealthCmd checks the skills git repo (~/.skills) health.
|
||||
func NewSkillsHealthCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "skills-health",
|
||||
Short: "Check the skills git repo (~/.skills) health: HEAD, fsck, ahead/behind, disk",
|
||||
RunE: func(c *cobra.Command, args []string) error {
|
||||
h := skillsrepo.Default()
|
||||
fmt.Print(formatSkillsHealth(h))
|
||||
if !h.Healthy() {
|
||||
return fmt.Errorf("skills repo unhealthy")
|
||||
}
|
||||
return nil
|
||||
},
|
||||
}
|
||||
return cmd
|
||||
}
|
||||
Reference in New Issue
Block a user