Documentation
¶
Index ¶
- func ScanAllCmd(r *Registry, cwd, home string, agents []agent.Agent) tea.Cmd
- func ScanCmd(p Core, cwd, home string, agents []agent.Agent) tea.Cmd
- func SyncPreviewCmd(p Core, selected Item, width int, previewGen *int) tea.Cmd
- func VisibleListCount(items []Item) int
- type BindEffect
- type Capabilities
- type Core
- type DisableEffect
- type InspectEffect
- type Item
- func (i Item) BindEffect() (BindEffect, bool)
- func (i Item) CanBind() bool
- func (i Item) CanDisable() bool
- func (i Item) CanInspect() bool
- func (i Item) CanRemove() bool
- func (i Item) CanUpdate() bool
- func (i Item) DisableEffect() (DisableEffect, bool)
- func (i Item) FilterValue() string
- func (i Item) InspectEffect() (InspectEffect, bool)
- func (i Item) MCPConfigKey() string
- func (i Item) RemoveEffect() (RemoveEffect, bool)
- func (i Item) Render(styles theme.Styles, width int, selected bool) string
- func (i Item) UpdateEffect() (UpdateEffect, bool)
- type ItemKind
- type MCPKeyGroup
- type MCPProvider
- type Panel
- type Placement
- type PreviewLoadedMsg
- type Registry
- type RemoveEffect
- type ScannedMsg
- type SkillProvider
- type Tab
- type UpdateEffect
- type ViewState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScanAllCmd ¶ added in v0.1.1
ScanAllCmd triggers scan for every panel in the registry.
func SyncPreviewCmd ¶ added in v0.1.1
SyncPreviewCmd loads preview markdown asynchronously and returns PreviewLoadedMsg.
func VisibleListCount ¶
VisibleListCount returns how many real rows are shown (excludes empty placeholders).
Types ¶
type BindEffect ¶ added in v0.1.1
type BindEffect struct {
Skill *skilldomain.Skill
MCPKey string
MCPMembers []*mcpdomain.Server
}
BindEffect describes starting the agent bind flow.
type Capabilities ¶
type Capabilities struct {
Inspect bool
Disable bool
Bind bool
Remove bool
Update bool
Find bool
Add bool
Init bool
SearchInstall bool
}
Capabilities describes which actions the active panel supports.
type Core ¶ added in v0.1.1
type Core interface {
Tab() Tab
Count() int
CountLabel() string
Capabilities() Capabilities
Scan(ctx context.Context, cwd, home string, agents []agent.Agent) ScannedMsg
ApplyScan(msg ScannedMsg) bool
ListItems(agentFilter []string) []Item
SearchItems(query string, agentFilter []string) []Item
PanelTitle(state ViewState) string
ReloadHint() string
StaticPreview() string
PreviewMarkdown(selected Item, width int) (string, error)
SelectedSkill(item Item) bool
SelectedMCP(item Item) bool
}
Core drives list content, scanning, and preview for one extension tab (no Bubble Tea).
type DisableEffect ¶ added in v0.1.1
type DisableEffect struct {
Skill *skilldomain.Skill
MCPMembers []*mcpdomain.Server
}
DisableEffect describes a disable/enable toggle target.
type InspectEffect ¶ added in v0.1.1
InspectEffect describes how to open inspection for a list item.
type Item ¶
type Item struct {
Kind ItemKind
Title string
Desc string
Meta string
DetailLines []string
Command commands.Spec
Skill *skilldomain.Skill
MCP *mcpdomain.Server // representative instance for mutations
MCPKey string // config key (level-1 list selection)
MCPMembers []*mcpdomain.Server // all config files using this key
}
Item is the panel-neutral list row model used directly in the app layer.
func CommandItems ¶
CommandItems builds list rows for the help command catalog.
func (Item) BindEffect ¶ added in v0.1.1
func (i Item) BindEffect() (BindEffect, bool)
func (Item) CanDisable ¶
func (Item) CanInspect ¶
func (Item) DisableEffect ¶ added in v0.1.1
func (i Item) DisableEffect() (DisableEffect, bool)
func (Item) FilterValue ¶
func (Item) InspectEffect ¶ added in v0.1.1
func (i Item) InspectEffect() (InspectEffect, bool)
func (Item) MCPConfigKey ¶ added in v0.1.1
MCPConfigKey returns the MCP config key for this row, if any.
func (Item) RemoveEffect ¶ added in v0.1.1
func (i Item) RemoveEffect() (RemoveEffect, bool)
func (Item) UpdateEffect ¶ added in v0.1.1
func (i Item) UpdateEffect() (UpdateEffect, bool)
type MCPKeyGroup ¶
MCPKeyGroup is one MCP config key and every on-disk instance (backend stays per file).
type MCPProvider ¶
MCPProvider is optionally implemented by a Panel to expose scanned MCP servers.
type Panel ¶
type Panel = Core
Panel is the extension tab contract used by the app (framework-agnostic core).
func NewSkillPanel ¶
func NewSkillPanel(mgr manager.ExtensionManager[*skilldomain.Skill]) Panel
NewSkillPanel creates the skills extension panel.
type Placement ¶
type Placement struct {
Agent string
AgentName string
Scope string
ConfigPath string
Disabled bool
}
Placement is one agent/scope/path row for preview (levels 2+3 merged).
type PreviewLoadedMsg ¶
PreviewLoadedMsg delivers async preview content.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds all extension panels keyed by tab. Panels are registered by position; Tab is auto-assigned from registration order.
func NewRegistry ¶
NewRegistry builds a registry from the given panels. Tabs are assigned in registration order: the first panel gets TabSkills, second gets TabMCP, etc.
func (*Registry) MCPServers ¶
MCPServers returns scanned MCP servers from the first panel that implements MCPProvider.
func (*Registry) Skills ¶
func (r *Registry) Skills() []*skilldomain.Skill
Skills returns scanned skills from the first panel that implements SkillProvider.
type RemoveEffect ¶ added in v0.1.1
type RemoveEffect struct {
Skill *skilldomain.Skill
MCPName string
MCPMembers []*mcpdomain.Server
}
RemoveEffect describes a remove confirmation target.
type ScannedMsg ¶ added in v0.1.1
type ScannedMsg struct {
Gen uint64
Tab Tab
Skills []*skilldomain.Skill
Servers []*mcpdomain.Server
Err error
}
ScannedMsg delivers panel scan results to the TUI (one message type per batch).
func MCPScan ¶ added in v0.1.1
func MCPScan(servers []*mcpdomain.Server, err error) ScannedMsg
MCPScan builds an MCP-tab scan result (Gen is set by the scan coordinator).
func SkillsScan ¶ added in v0.1.1
func SkillsScan(skills []*skilldomain.Skill, err error) ScannedMsg
SkillsScan builds a skills-tab scan result (Gen is set by the scan coordinator).
type SkillProvider ¶
type SkillProvider interface {
Skills() []*skilldomain.Skill
}
SkillProvider is optionally implemented by a Panel to expose scanned skills.
type UpdateEffect ¶ added in v0.1.1
type UpdateEffect struct {
Skill *skilldomain.Skill
}
UpdateEffect describes a skill update target.