Documentation
¶
Overview ¶
Package proc makes the commands magpie runs: agents' CLIs, the probes that ask them what they have, the system's own tools. Every one is made here rather than with os/exec, so that on Windows none of them opens a window.
The desktop app on Windows is linked as a GUI program and has no console. A console program it starts (devin, claude, codex, cursor-agent, grok, the probes behind them) is given a new console by Windows, and with it a window, one for every run; so a child of a magpie with no console is started with CREATE_NO_WINDOW, which gives it a console without one. A magpie run in a terminal, or the desktop app started from one with a command, lets its children share that console as before, so Ctrl+C there reaches them too. Nothing magpie starts reads or writes the terminal itself: its output is piped back, which a hidden console doesn't change.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandContext ¶
CommandContext is exec.CommandContext, with no window of its own on Windows.
func UserBinDirs ¶ added in v0.1.441
func UserBinDirs() []string
UserBinDirs are the folders a user's command-line tools are installed in that exist here — npm's prefixes, each Node version of nvm, fnm and mise, bun, volta, pnpm, asdf, the standalone installers' ~/.local/bin, Homebrew — for finding one PATH doesn't reach.
func UserPath ¶ added in v0.1.67
func UserPath()
UserPath gives the desktop app the PATH a terminal of the user's has. One opened from the Finder, the Dock or a login item gets launchd's /usr/bin:/bin:/usr/sbin:/sbin and nothing a shell profile adds, so a claude or codex installed with a custom npm prefix (~/.npm-global/bin), nvm, bun, volta or asdf wasn't found: the agent wasn't seen and its subscription couldn't be used. The folders those tools use are added at once, when they exist; the login shell's own PATH is asked for in the background and added after, since a slow profile mustn't hold the window up.
Types ¶
type Process ¶ added in v0.1.368
A Process is one running on this computer, as the system lists it: its id and its command line, arguments joined by spaces.
type Tree ¶ added in v0.1.183
type Tree struct {
// contains filtered or unexported fields
}
A Tree is a started command and the processes it starts in turn: an agent's CLI with the MCP servers, shells and helpers it runs. Killing the CLI alone leaves those running, so they are ended with it.
func StartTree ¶ added in v0.1.183
StartTree starts cmd in a group of its own: a session on Unix, a job on Windows. It has no terminal then, and a Ctrl+C there doesn't reach it.