agents

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 12 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agents

type Agents struct {
	panels.BasePanel
	// contains filtered or unexported fields
}

Agents is the agent monitor panel. It implements panels.Panel and panels.Closer.

func New

func New(tracker Tracker) *Agents

New creates a new Agents panel with the given tracker.

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

func (p *Agents) Init(ctx context.Context) tea.Cmd

--------------------------------------------------------------------------- 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.

func (*Agents) Update

func (p *Agents) Update(msg tea.Msg) (panels.Panel, tea.Cmd)

Update implements panels.Panel.

func (*Agents) View

func (p *Agents) View(width, height int) string

View implements panels.Panel.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL