remove proc/ directory from agent namespace (processes live in toolsrv)

This commit is contained in:
Levi Neely 2026-08-13 22:01:06 +02:00
parent 6e5b1aa5f0
commit 48add8f7bb
1 changed files with 0 additions and 18 deletions

View File

@ -775,23 +775,5 @@ func buildAgentChildren(a *agent.Agent, s *session.Session) []virtfs.FsNodeDecl
virtfs.FileNode("id", 0444,
virtfs.Read(func() ([]byte, error) { return []byte(a.ID() + "\n"), nil }),
),
virtfs.DirNode("proc",
virtfs.Doc("Background processes owned by this agent"),
virtfs.FileNode("top", 0444,
virtfs.Doc("List background processes: PID, TOOL, CMD"),
virtfs.Read(func() ([]byte, error) {
procs := a.ListProcs()
if len(procs) == 0 {
return []byte("(no background processes)\n"), nil
}
var sb strings.Builder
fmt.Fprintf(&sb, "%-8s %-16s %s\n", "PID", "TOOL", "CMD")
for _, p := range procs {
fmt.Fprintf(&sb, "%-8d %-16s %s\n", p.PID, p.Tool, p.Cmd)
}
return []byte(sb.String()), nil
}),
),
),
}
}