mcp

package
v0.0.0-...-305be7e Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultWorkspace = "mcp-agents"
	ServerName       = "termtile"
	ServerVersion    = "0.1.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentInfo

type AgentInfo struct {
	Slot           int    `json:"slot"`
	AgentType      string `json:"agent_type"`
	SessionName    string `json:"session_name"`
	CurrentCommand string `json:"current_command"`
	IsIdle         bool   `json:"is_idle"`
	Exists         bool   `json:"exists"`
	SpawnMode      string `json:"spawn_mode"`
}

AgentInfo describes a single running agent.

type KillAgentInput

type KillAgentInput struct {
	Slot      int    `json:"slot" jsonschema:"required,Slot index of agent to kill"`
	Workspace string `json:"workspace" jsonschema:"Workspace name (default: mcp-agents)"`
}

KillAgentInput is the input for the kill_agent tool.

type KillAgentOutput

type KillAgentOutput struct {
	SessionName string `json:"session_name"`
	Killed      bool   `json:"killed"`
}

KillAgentOutput is the output for the kill_agent tool.

type ListAgentsInput

type ListAgentsInput struct {
	Workspace string `json:"workspace" jsonschema:"Workspace name (default: mcp-agents)"`
}

ListAgentsInput is the input for the list_agents tool.

type ListAgentsOutput

type ListAgentsOutput struct {
	Workspace string      `json:"workspace"`
	Agents    []AgentInfo `json:"agents"`
}

ListAgentsOutput is the output for the list_agents tool.

type ReadFromAgentInput

type ReadFromAgentInput struct {
	Slot      int    `json:"slot" jsonschema:"required,Slot index to read from"`
	Lines     int    `json:"lines" jsonschema:"Number of lines to capture (default: 50)"`
	Clean     bool   `json:"clean" jsonschema:"When true, strip TUI chrome and control characters from output (default: false)"`
	Workspace string `json:"workspace" jsonschema:"Workspace name (default: mcp-agents)"`
	Pattern   string `json:"pattern" jsonschema:"Optional text pattern to wait for. When set, polls until pattern appears or timeout."`
	Timeout   int    `json:"timeout" jsonschema:"Timeout in seconds when waiting for pattern (default: 30). Only used when pattern is set."`
}

ReadFromAgentInput is the input for the read_from_agent tool.

type ReadFromAgentOutput

type ReadFromAgentOutput struct {
	Output      string `json:"output"`
	SessionName string `json:"session_name"`
	Found       *bool  `json:"found,omitempty"`
}

ReadFromAgentOutput is the output for the read_from_agent tool.

type SendToAgentInput

type SendToAgentInput struct {
	Slot      int    `json:"slot" jsonschema:"required,Slot index of the target agent"`
	Text      string `json:"text" jsonschema:"required,Text to send to the agent"`
	Workspace string `json:"workspace" jsonschema:"Workspace name (default: mcp-agents)"`
}

SendToAgentInput is the input for the send_to_agent tool.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the MCP server for termtile agent orchestration.

func NewServer

func NewServer(cfg *config.Config) (*Server, error)

NewServer creates a new MCP server backed by tmux.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts the MCP server on stdio transport, blocking until done.

type SpawnAgentInput

type SpawnAgentInput struct {
	AgentType string `json:"agent_type" jsonschema:"required,The agent type from config (e.g. claude, codex, aider)"`
	Workspace string `json:"workspace" jsonschema:"Workspace name (default: mcp-agents)"`
	Cwd       string `json:"cwd" jsonschema:"Working directory for the agent"`
	Task      string `` /* 239-byte string literal not displayed */
	Window    *bool  `` /* 147-byte string literal not displayed */
}

SpawnAgentInput is the input for the spawn_agent tool.

type SpawnAgentOutput

type SpawnAgentOutput struct {
	Slot        int    `json:"slot"`
	SessionName string `json:"session_name"`
	AgentType   string `json:"agent_type"`
	Workspace   string `json:"workspace"`
	SpawnMode   string `json:"spawn_mode"`
}

SpawnAgentOutput is the output for the spawn_agent tool.

type WaitForIdleInput

type WaitForIdleInput struct {
	Slot      int    `json:"slot" jsonschema:"required,Slot index to monitor"`
	Timeout   int    `json:"timeout" jsonschema:"Timeout in seconds (default: 120)"`
	Lines     int    `json:"lines" jsonschema:"Number of lines to capture when idle (default: 100)"`
	Workspace string `json:"workspace" jsonschema:"Workspace name (default: mcp-agents)"`
}

WaitForIdleInput is the input for the wait_for_idle tool.

type WaitForIdleOutput

type WaitForIdleOutput struct {
	IsIdle      bool   `json:"is_idle"`
	Output      string `json:"output"`
	SessionName string `json:"session_name"`
}

WaitForIdleOutput is the output for the wait_for_idle tool.

Jump to

Keyboard shortcuts

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