Engineering notes · Plugin contract · 12 min read · 2026-10-16
Designing the plugin manifest: what an executor declares
A tray plugin is launched by a host that has never seen it before. The host has to answer four questions before a line of the plugin's own code runs: what is this, what can it do, what does each action need, and should it be allowed. One file answers all four: the plugin manifest. This note works through what an executor declares, why the host reads it before launch rather than trusting the plugin at runtime, and where a manifest deliberately stops short of making promises it cannot keep.
On this page
- The short version
- Why capabilities are declared, not discovered
- The four things a manifest declares
- A worked manifest, field by field
- How declarations meet the permission gates
- Why an agent needs the same contract
- What a manifest is not
- Questions people ask
The short version
A tray plugin manifest is a single declarative file that ships with a plugin and describes the whole tool: who publishes it, what commands it offers, what inputs each command takes, and what each command is permitted to do. The host reads that file up front, before executing the plugin, and uses it to render the plugin's card, wire its commands into the shared command plane, and apply the right permission rules. Nothing risky is inferred by probing the plugin's code.
The contract itself is a declared P0 commitment on the developer portal — the ".tray contract freeze: P0" item means the boundary is being settled first, before packaging tooling (P1) and the marketplace (P2). So this note is a design document for a contract that is being frozen, not documentation of a finished SDK. Where something is planned rather than shipped, it is labeled as such.
Why capabilities are declared, not discovered
The alternative to a manifest is introspection: let the plugin run, watch what it touches, and build the command list from what it happens to register. That sounds convenient and it is exactly the wrong starting point for a host that runs third-party executables. If the host learns what a plugin can do only by running it, it has already given the plugin the chance to do it. A file converter that also reads your browser profile looks identical to a normal converter until the moment it reads your browser profile.
Declaration reverses the order. The plugin states its capabilities and needs in data, the host evaluates that data against the user's trust tier and permission settings, and only then does executable code run. Three useful properties fall out of that ordering for free.
The UI can render before code runs
A catalog card needs a name, a one-line summary, and an icon. If those live in the manifest, the host can show a plugin, search it, and explain what it asks for without ever launching it. This is also what lets plugin pages show permissions, capabilities, and trust tier plainly — the "honest visibility" commitment in the developer materials, currently scoped to phase P1, is just the manifest rendered back to the reader.
The same data drives humans and agents
You do not want two descriptions of a tool, one prose version for the menu and one machine version an AI can read. The manifest is the single source both consume: a person scans the card, an agent reads the command names and input schemas. That is the difference between an AI that can drive your tools and an AI that can only describe them.
Policy becomes a check against data
"High-risk permissions structurally denied for unverified plugins" is only enforceable if the host knows the requested permissions before execution. With a manifest, that rule is a comparison between two pieces of data — requested scope versus trust tier — evaluated before launch, not a runtime interception you hope fires in time.
The four things a manifest declares
The field set follows from the four questions the host has to answer. Keeping the groups separate matters, because they are validated by different parts of the host and trusted at different levels.
| Group | Answers | Who consumes it |
|---|---|---|
| Identity | What is this and who published it? | Catalog UI, trust tier, update path |
| Commands | What can it be asked to do? | Command plane, tray menu, agent |
| Inputs | What does each command need and return? | Argument validation, agent planning |
| Permissions | What may each command touch? | Three-tier gate, audit, tier policy |
Identity
Stable plugin id, display name, short summary, publisher identifier, and version. The id is the key updates and audit records hang off, so it never changes across releases even though the display name can. The publisher identifier is what connects an installed package to a trust tier — an unsigned handoff, a self-signed self-distributed plugin, and a platform-reviewed plugin are not distinguished by the manifest's words, but by the signature over it. The trust mechanics themselves live in the dedicated plugin trust guide; the manifest only carries the identity the signature is checked against.
Commands
Each command gets a stable name, a human label, and the entry point that implements it. The command set is what the current build already speaks in practice: the host ships 71 host commands across 15 domains, and the one plugin module with business commands today (OWMap Atlas) contributes 14. A manifest simply lets third-party packages describe commands in the same shape instead of registering them by side effects.
Inputs
Every command declares the arguments it accepts — names, types, which are required, and the shape of the result. This is ordinary input-schema work, but it doubles as the contract an agent reads to call the command without guessing. A command whose inputs are undeclared cannot be offered to an agent safely; the agent would have to invent arguments.
Permissions
Each command names the capabilities it needs, attached to the command rather than the package as a whole. Per-command scoping is the important choice: a plugin can have a read-only query command that needs nothing and an export command that needs file write, and approving the query does not quietly approve the export. These declared permissions feed the three safety gates described in understanding permissions.
A worked manifest, field by field
Below is an illustrative manifest for a small local tool, to make the four groups concrete. It is a design example, not the frozen schema file and not a shipping plugin; field spellings can still move before the P1 tooling lands. The shape is what matters.
{
"id": "com.example.localnotes",
"name": "Local Notes",
"summary": "Save and search short text notes on this machine.",
"version": "0.3.0",
"publisher": { "id": "pub_example", "selfSigned": true },
"commands": [
{
"name": "search",
"label": "Search notes",
"entry": "commands.js#search",
"input": {
"query": { "type": "string", "required": true },
"limit": { "type": "integer", "required": false, "default": 10 }
},
"returns": { "type": "array", "items": "string" },
"permissions": []
},
{
"name": "save",
"label": "Save a note",
"entry": "commands.js#save",
"input": { "text": { "type": "string", "required": true } },
"returns": { "type": "object" },
"permissions": ["fs:write"]
}
]
}
Reading it as the host would: the identity block identifies a self-distributed, self-signed package, which maps to the Signed tier in the developer portal's distribution table — full scope available, high-risk capabilities still require explicit opt-in. The search command is pure and declares no permissions, so it can be offered to agents and run without a prompt. The save command declares fs:write, so the gate treats it differently even within the same package. Nothing in the file grants anything; it only asks.
That last sentence is the whole mental model. A manifest is a request the host evaluates, never a capability the plugin hands itself. Writing fs:write does not create write access; it puts the request on the table for the tier rules and the user to decide.
How declarations meet the permission gates
The manifest only states intent. Enforcement happens when a command is actually invoked, and the developer materials already define how the tiers line up with the three distribution channels. The manifest's declared permissions are the input to those rules, not a bypass of them.
| Trust tier | How the manifest is treated | High-risk permissions |
|---|---|---|
| Unverified | Installed only after a full-screen warning; commands still read from the manifest | Structurally denied, regardless of what the manifest requests |
| Signed | Registered publisher signature; full scope available | Require explicit per-tool opt-in |
| Reviewed | Platform channel signature plus review | Requestable on the official marketplace |
This is why an unverified plugin can honestly list a high-risk command in its manifest and still be unable to run it. The declaration makes the request visible; the tier decides the answer. Keeping those two steps separate is what prevents a carefully worded manifest from becoming a privilege escalation — the file can ask for anything, but a request an unverified package is structurally incapable of receiving is simply denied before launch.
The gates themselves run in three stages that every automated action passes — a plan stage, an approval stage, and an execution stage — with an audit record of what was decided. The manifest supplies the facts the gates reason over; it does not sit in the gates. That separation is covered end to end in the three safety gates guide.
Why an agent needs the same contract
When an AI drives the tray, it picks a command and supplies arguments. To do that without guessing, it needs exactly the information the manifest already holds: the command names, what each one does, the input types, and what permission the call will trigger. There is no separate "agent descriptor" to maintain, because duplicating it would guarantee the two drift apart.
The current build's command plane already demonstrates the shape agents call: 71 host commands across 15 domains, each reached through one plane rather than a separate chat tab per tool, with the same gates and audit as a human click. The command plane basics guide walks through invocation. A third-party manifest extends that same plane — which is why invocation traffic across plugins is a phase P2 item rather than something the v2.0 build claims. Today the plane carries host commands and the built-in module; external packages adding commands to it arrives with the runtime loader.
Input schemas do quiet work here. When an agent plans a call against search(query, limit?), the manifest tells it that query is a required string and limit is an optional integer, so the host can reject a malformed call before executing it instead of discovering the mistake mid-action. Declared inputs are as much a safety control as declared permissions.
What a manifest is not
It is worth naming the limits, because a declarative file is easy to oversell.
- It is not a proof of behavior. The manifest says a command needs file write; it cannot promise the implementation only writes what it should. That is why signing, the trust ladder, per-command gating, and isolation all exist around it. A manifest that lies about scope is caught at review or by behavior; a manifest that understates scope still hits a gate when the code attempts something undeclared. Isolation between a plugin and the resident host is its own upcoming note (N24).
- It is not a quality signal. Valid manifest syntax says a package is well-described, not that it is useful. Quality and curation belong to the reviewed tier and the marketplace, which are planned (P2), not shipped.
- It is not the frozen schema yet. The P0 commitment is to freeze the contract; packaging, manifest validation, a local test host, and CI templates are phase P1 tooling per the developer portal. Field spellings in this note's example can still change, which is why the example is labeled illustrative.
- It does not replace the signature. Identity fields are only trustworthy because a signature binds them to a publisher. An unsigned manifest is a claim, not evidence — which is exactly how the unverified tier treats it.
Questions people ask
Why JSON and not code that registers itself?
Because the host has to make trust decisions before executable code runs. A data file can be parsed, validated, shown to the user, and compared against tier policy without executing anything. Letting the plugin register itself by running inverts that order and makes the first execution the moment of maximum trust.
Does every command have to declare permissions?
Every command declares what it needs, and read-only commands declare an empty set, as the search example does. Declaring nothing is meaningful: it tells the host the command is safe to run without a prompt. A command that then attempts a privileged action it did not declare is stopped at the gate rather than excused.
Can I ship a plugin today against this?
Not as a runtime-loaded third-party package in the v2.0 build. That build bundles six built-ins and zero third-party plugins; runtime loading of external packages is P1 and the marketplace is P2. What you can do today is read the contract and the developer portal, which is why the contract is being frozen before the tooling: authors are not being asked to build against a moving target.
How is this different from the plugin contract overview on the developer page?
That page is the entry point and the business commitment — definition rights, compatibility, channels. This note goes one level deeper into one artifact inside the contract: the manifest file itself. They deliberately do not compete on the same terms; the portal explains why you would build here, this note explains the shape of the file you write.
Where to go next
- The previous note frames why one host launches many tools: the Steam model for desktop utilities.
- Want what happens after a manifest is trusted? The next note covers process isolation (N24, upcoming).
- Ship-side rules and distribution channels live on the developer portal; signing tiers live in the plugin trust guide.
- How agents actually call declared commands: the command plane basics and the three safety gates.
See the command plane running today
Download TrayTool for Windows 10/11 and open the resident host: 71 commands across 15 domains already run through the same plane third-party manifests will extend.
Last updated 2026-10-16. Product state (six built-ins, zero third-party plugins, 71 host commands across 15 domains, 14 plugin commands in one module, contract freeze P0, tooling P1, marketplace P2) reflects the audited measured baseline and the developer portal; the example manifest is an illustrative design, not the frozen schema.