Expand description
Plugins: how the agent is extended without editing it.
A plugin is a directory named after the plugin, containing plugin.toml. Nothing
is compiled, loaded as a shared library or interpreted in-process: a plugin declares
its tools, prompt fragments, provider profiles and hooks in that one manifest, and the
only thing that ever executes is a process the manifest names. That keeps the agent a
single static binary, keeps a panic in a plugin out of the agent, and makes a plugin
reviewable by reading two files.
What a plugin can add:
| Section | Adds |
|---|---|
[[tool]] | a model-callable tool: a JSON Schema for its arguments plus a command to run |
[[prompt]] | text appended to the system prompt (inline or from a file) |
[[provider_profile]] | an OpenAI-compatible wire profile, overriding a built-in of the same name |
[[hook]] | before_tool (may refuse a tool call) or after_tool (may rewrite its output) |
[[mcp]] | every tool an MCP server offers, from one stdio JSON-RPC process (see crate::mcp) |
What it deliberately cannot do: replace a built-in tool without saying override = true
on that tool, and run without being listed in [plugins] enabled. An MCP server is declared
once per server in [[mcp]] and contributes all of its tools from there (see crate::mcp);
kind = "mcp" on a single [[tool]] is refused with a pointer to it.
See docs/USER.md for the file format and docs/TECHNICAL.md for the execution and
trust model.
Structs§
- Hook
- One
[[hook]]. SeeHooksfor when it runs and what it may do. - HookDef
- Hooks
- The hooks of every loaded plugin, ready to run around a tool call.
- Limit
Def - One model’s limits.
- Manifest
- McpServer
State - What
mcp listprints for one server: the declaration, and what it actually did. - McpSettings
- How MCP servers are started in this process, when
[[mcp]]entries do not say.None—--no-mcp— starts none of them at all: no process, no tools, and no problem entries for servers that would have failed anyway. - Plugin
- A plugin that loaded: its manifest plus where it lives.
- Plugin
Tool - What
Plugins::toolsproduces: tools to register, and the reasons some were rejected. One tool a plugin offers, with the policy it asked for and the plugin to blame or credit. - Plugins
- Everything that loaded, and everything that did not (with the reason).
- Profile
Def - Prompt
Def - Request
Def [provider_profile.request]: what this backend wants on every request, whatever the turn asks.- ToolDef
Enums§
- Cwd
- Working directory for a plugin command, and for an MCP server
config.tomldeclares — which is why it serializes: the spec carrying it round-trips throughconfig show(#352). - Event
- Kind
- How a plugin tool gets its arguments, and what runs it.
- Model
Reasoning Def - A model’s own reasoning entry:
reasoning = false(it does not think), or a policy of its own. - Parameters
- Where a tool’s JSON Schema comes from.
- Temperature
Def temperature = "omit"ortemperature = { fixed = 0.2 }.- Verdict
- What a
before_toolhook decided.
Constants§
- API
- Manifest API version this build speaks. A plugin asking for a newer one is not loaded.
- DEFAULT_
TIMEOUT - Default timeout for a plugin tool or hook; a manifest may lower it.
- MANIFEST
- Manifest file name inside a plugin directory.
- MAX_
MANIFEST_ FILE_ BYTES - The largest a plugin-authored file may be, matching the line
skills.rsdraws forSKILL.md: a prompt is paid for on every request, so a 5 MBprompts/*.mdcrowds out the conversation it was meant to steer. - MAX_
TIMEOUT - Hard ceiling: no manifest may make the agent wait longer than this.
Functions§
- discover_
all - Every directory that has a manifest, whether or not it is enabled, in search order. Used
by
eclipse plugins listso a plugin you forgot to enable is still visible. - load
- Discover and load plugins from
dirs, in order: the first plugin with a given name wins (so a profile’s copy shadows the shared one). Only names inenabledare considered, except a manifest that declares nothing but provider profiles (see [declares_only_profiles]). A missing manifest, a manifest that does not parse, a name that does not match its directory, or a newerapibecomes a problem entry, never an error. - mcp_
timeout - The ceiling for an MCP server that states no
timeout_secsof its own.[plugins] mcp_timeout_secsis the machine-wide answer; the plugin default (and its clamp) applies when the config says nothing. - profile_
from_ def - One manifest entry as the profile the provider runs on. Public because the tests that check what
the shipped manifests promise read them from
plugins/and must go through the same conversion — a test that reimplements it would be testing itself.