Expand description
The allow.commands capability schema and ${var} resolution.
A plugin declares each command it may run; the handler can only
invoke declared names (default-deny). A spec is either a shorthand
string (a sh -c line) or an object with explicit execution policy.
Resolution is strict: every ${placeholder} must have a supplied
value and every value must be a scalar — a typo fails loudly instead
of expanding to empty.
Deserializer-agnostic by hand (no #[serde(untagged)]): the same
types are read from serde_json (the MCP manifest round-trip) and
from rquickjs-serde (a defineTool call), so the impls only use
deserialize_any + visitors, which both back-ends support.
Structs§
- Command
Spec - One declared command. Constructed only via deserialization (manifest
or
defineTool); never hand-built by a handler. - Resolved
Command
Enums§
- Command
Output - How
commands.runinterprets the command’s stdout. - Command
Run - What to execute. A string runs through
sh -c(shell features live); an array is executed directly with no shell (each element is one argv entry — no quoting, no metacharacter interpretation). - Resolved
Exec - A command resolved against caller
vars: ready to spawn.