Documentation
¶
Overview ¶
Package machine answers what the runtime reads from the machine itself: processes, the Claude Code session files, a tab's working folder.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChildPIDs ¶
ChildPIDs are a process's children in pid order, listed per thread (see proc.ChildPIDs).
func ProcessArgs ¶
ProcessArgs is a process's command line as ps prints it (arguments joined by spaces); false when it cannot be read.
func ProcessCwd ¶
ProcessCwd is a process's working folder, or "" when it cannot be read.
func SessionCwd ¶
SessionCwd is a tab session's working folder (its shell's, else tmux's idea of the pane) and the command running in it, or nil.
Types ¶
type DirCheck ¶
type DirCheck struct {
Valid bool `json:"valid"`
Error *string `json:"error,omitempty"`
SuggestedName *string `json:"suggestedName,omitempty"` // "" for the root folder
}
DirCheck is the answer to "can this folder be a workspace".
func DirMissing ¶
func DirMissing() DirCheck
DirMissing is the answer for a path that cannot be looked at.
func ValidateDirectory ¶
ValidateDirectory checks that dir exists and is a folder, and names a workspace after it.
type Peer ¶
type Peer struct {
Name string `json:"name"`
PID int64 `json:"pid"`
SessionID *string `json:"sessionId"`
TabID *string `json:"tabId"`
Status *string `json:"status"`
UpdatedAt *float64 `json:"updatedAt"`
}
Peer is a live Claude Code session on this machine, under the name agents message each other by.