Documentation
¶
Overview ¶
Package shells finds the processes the hosted agents started: the shells Claude Code runs commands in, and the servers they leave listening. Each agent runs under a small sh whose command line names it (see Wrap), and the process tree under it tells which agent a shell belongs to.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseEtime ¶
ParseEtime parses ps's elapsed time, [[dd-]hh:]mm:ss.
func Stop ¶
Stop ends a shell and everything it started: SIGTERM to the tree, children first, then SIGKILL to whatever is left after a grace period.
Types ¶
type Shell ¶
type Shell struct {
PID int
Agent string // the agent's handle
Command string // what the agent asked to run
Kind string // "shell", or "server" for a process listening on a port
Cwd string
Started time.Time
Ports []int // TCP ports the shell or its children listen on
Out string // the file its output goes to, if it is a file
Procs int // processes in its tree, itself included
}
Shell is a command an agent runs.