Documentation
¶
Overview ¶
Package agents implements the Agent Monitor panel for grut. It displays spawned agent processes with their status, output, and provides controls to kill agents and refresh the list.
Index ¶
- type Agents
- func (p *Agents) Close()
- func (p *Agents) Focus()
- func (p *Agents) Init(ctx context.Context) tea.Cmd
- func (p *Agents) KeyBindings() []panels.KeyBinding
- func (p *Agents) SetActionsCfg(cfg config.ActionsConfig)
- func (p *Agents) Update(msg tea.Msg) (panels.Panel, tea.Cmd)
- func (p *Agents) View(width, height int) string
- type Tracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agents ¶
Agents is the agent monitor panel. It implements panels.Panel and panels.Closer.
func (*Agents) Close ¶
func (p *Agents) Close()
Close implements panels.Closer. Kills all running agents on shutdown.
func (*Agents) Focus ¶
func (p *Agents) Focus()
Focus overrides BasePanel.Focus to start auto-refresh.
func (*Agents) Init ¶
--------------------------------------------------------------------------- panels.Panel interface --------------------------------------------------------------------------- Init implements panels.Panel.
func (*Agents) KeyBindings ¶
func (p *Agents) KeyBindings() []panels.KeyBinding
KeyBindings implements panels.Panel.
func (*Agents) SetActionsCfg ¶
func (p *Agents) SetActionsCfg(cfg config.ActionsConfig)
SetActionsCfg stores the actions configuration for right-click menus.
type Tracker ¶
type Tracker interface {
List() []mcp.AgentInfo
Kill(pid int) error
KillAll()
Output(pid int) (stdout, stderr []string)
}
--------------------------------------------------------------------------- Tracker interface (for testability) --------------------------------------------------------------------------- Tracker is the subset of mcp.AgentTracker used by this panel.