Skip to main content

Module agent_env

Module agent_env 

Source
Expand description

What the coding agents on this machine are configured with.

Five agents are known — Claude Code, Codex, Antigravity, Cursor, and Windsurf — and this module answers three questions about each: whether its CLI is installed, what MCP servers and skills it is configured with, and whether that setup looks broken. Everything here reads; nothing writes.

The agents are deliberately not handled uniformly, because they are not uniform. Each stores its servers in a different file, in a different format, under different rules for what a remote server’s transport is; the differences are spelled out on [Reader] rather than smoothed away, since smoothing them away is exactly how this drifts from what the agents do.

Structs§

AddOutcome
AgentConfigView
AgentStatus
ChangePreview
ChangeReport
DoctorCheck
DoctorReport
OrderedMap
PendingChange
One staged mutation, after the route has checked its shape.
RemoteServer
ServerSpec
SkillEntry
SnapshotOutcome
StdioServer

Enums§

Action
Agent
Category
Json
A JSON document that keeps every object’s key order, at every depth.
Scope

Constants§

AGENTS
The agents this knows about, in the order every answer reports them.

Functions§

add_mcp
Add or replace one MCP server.
apply_changes
Apply the batch, or refuse it whole.
backup_config_file
Copy a file beside itself before something replaces it.
backup_skill_directory
Move a skill’s directory into the backup store and return where it went.
doctor
The same two facts status and read_configs answer, restated as checks: every agent’s CLI first, then every agent’s config file.
install_skill_destination
Where install_user_skill would put a skill of this name.
install_user_skill
Put a skill into an agent’s own user-scope skills directory, replacing whatever was installed under that name.
move_mcp_scope
move_skill_scope
preview_changes
What the batch would do, without doing any of it.
read_configs
Every agent’s MCP servers and skills. cwd is the project directory that project scope is resolved against; absent, it is this process’s own.
remove_mcp
snapshot_agent
Copy an agent’s config aside without changing it.
status
Which agent CLIs are installed, in the fixed agent order.