Repository navigation
Plugins
A plugin is how Studio obtains anything it does not ship — a language server, a debug adapter, a decoder, a container engine, an AI provider: a manifest describing what to download, how to verify it, and what it contributes. Plugins fill seams Studio already has — a language server slot, a debug adapter slot, an agent harness slot — and never add UI of their own. Core ships none of these; a fresh install has nothing in any slot until the user installs it, and the setup wizard is the first place they are offered.
A manifest is a JSON document validated by parsePluginManifest in
src/shared/api/plugin-manifest.ts. The essentials:
| Field | Meaning |
|---|---|
id, name, description
|
Identity. id is lower-case letters, digits, hyphens and dots — it becomes an install directory. |
version |
The plugin's own version; scopes its install directory. |
apiVersion |
The contract version the manifest was written against (see below). |
detail |
Optional note shown before install — a large download, a prerequisite. |
provision |
How the payload is obtained: archive (one download per platform) or npm (a lockfile). |
contributes.languageServers |
Language servers: id, display name, languages, priority, how to start it. |
contributes.debugAdapters |
Debug adapters: the same, plus a transport (stdio or tcp-server). |
contributes.decoders |
Decoders: a format's disassembler or reader, keyed by the formats it decodes. |
contributes.containerEngines |
Container engines: where the socket is, which CLI drives it — see Container engines. |
contributes.agentHarnesses |
AI providers: which connections the harness serves, and how to start it — see Agent harnesses. |
requires |
Runtimes that must be present first — one of java, dotnet, go, node, python. |
-
archive— a per-platform map (darwin-arm64,linux-x64, …) of HTTPS URL, SHA-256 and archive kind, plus the executable's path inside it. A platform with no entry is unsupported and the Plugin Manager says so rather than offering an install that cannot work. The archive kinds aretar.gz,zipandgz— the last for a publisher that ships a single compressed binary rather than a one-entry tarball, where the entry-point path says where the decompressed file lands rather than where to find it. A download may also namemembers, to take only part of an archive that carries more than the thing being contributed. -
npm— the HTTPS URL and SHA-256 of an npm lockfile. A lockfile is a list of (path, tarball URL, integrity) triples, so pinning its hash pins every package it names; Studio reifies the tree from those triples without running npm. One lockfile serves every platform; what varies by platform varies inside it.
Every download is verified against its hash before anything is extracted or executed. Payloads live outside the application archive and are version-scoped, so an upgrade never overwrites a working install.
A contribution's command names how the entry point is run, with optional args and env. A payload
holding several programs gives each contribution its own entryPoint.
| Kind | Runs the entry point |
|---|---|
executable |
Directly. |
node |
As JavaScript under the runtime Studio ships, so a JavaScript-bundled server needs no Node on the machine. |
python |
As a script under a Python interpreter found on the machine. |
python is deliberately not symmetric with node. Studio is a Node runtime and can promise one; it
ships no Python, so a python plugin depends on the user having one and should declare it in
requires. A payload that must bring its own runtime is not expressible at all.
A user can run their own copy of any language server instead of the installed one, by setting its path in Settings. That is keyed by server id, so it works for a contributed server as well as a first-party one, and what the path points at follows the command's kind.
The fifth contribution point, added in plugin API 1.9.0
(#653), and the first whose payload is a
peer rather than a tool. It is also the only way Studio gets an AI provider at all: core ships
no provider. A fresh binary has no working agents, and no provider page in Settings, until a harness
plugin is installed — that is the acceptance test, not a gap. The three first-party harnesses are
onixlabs.claude-harness, onixlabs.codex-harness and onixlabs.ai-sdk-harness, all in plugins/
in this repository and all on the curated catalogue.
A language server answers questions about a file and a decoder turns bytes into a listing; a harness runs an agent turn, streams what the model says, and stops mid-way to ask the user for permission.
It speaks the agent protocol — line-delimited JSON on stdin and stdout, defined in
src/shared/api/agent-protocol.ts and versioned independently of the plugin API. A harness needs no
library to speak it; the reference implementation at
src/shared/electron/ai/testing/echo-harness.mjs imports nothing at all.
connectionAuths names the auth kinds of the AI connections this harness serves. Which harness runs a
turn is a property of the connection the user picked, not of a file — so a connection is run by the
installed harness that claims its auth kind, and a connection nobody claims cannot run. Core owns
exactly two auth kinds, api-key and none; anything else (claude-login, codex-login, …) is a
plugin's word. An OpenAI-compatible endpoint, including a local Ollama, is served by the AI-SDK harness
— it is the same api-key/none connection, and needs no harness of its own.
auth is user-editable data rather than a vocabulary Studio owns, and a harness published for a kind
Studio has not shipped yet is one waiting for it. The failure mode is the safe one: an unmatched harness
never claims a connection.
Since plugin API 1.12.0 a harness may declare providers: the company pages Settings draws (kind,
company name, description), the ways to sign in to each (its add-buttons), and the models a new
configuration starts with. This is the whole of what core used to hardcode — PROVIDER_PAGES,
SEED_CONNECTIONS, the model tables — and it is declared on the harness rather than through a
contribution point of its own on purpose: the plugin that runs Claude is the plugin that knows
Anthropic, and a second seam would let a page offer a sign-in no installed harness can serve.
The Settings › AI tree and the setup wizard's AI Providers step are both built from these; with no harness installed they are empty, exactly as the Language Servers branch is with no server installed. An already-installed harness from before 1.12.0 contributes no providers — the user has to update it to get pages.
coreAgentProviders() in src/shared/electron/ai/agent-provider-registry.ts returns an empty list
and exists to say so. ⛔ Anything tempted to add a built-in back has to edit that function and read
its comment first. ai-sdk-stream.ts stays in core and is not a provider: it holds Studio's own
tools, which a harness asks for over the protocol, so a new Studio capability reaches every provider
at once instead of requiring each plugin to be republished.
| Direction | Messages |
|---|---|
| Studio → harness |
initialize, turn.start, turn.abort, steer, answer
|
| Harness → Studio |
ready, event, request, audit, turn.completed, turn.failed
|
event carries AiEvent unchanged — the same eighteen event kinds the transcript already renders, so a
harness's output needs no translation. request is the blocking half: permission, a question for the
user, an edit decision, or a bridge capability. Every answer has a shape for "the user did not
answer", because a turn can be aborted with a prompt open.
Capabilities are declared once at the handshake rather than probed per turn. A capability absent there means Studio does not offer the affordance at all, which is better than offering a control that silently does nothing.
A harness is versioned separately from Studio, so it has its own release workflow
(.github/workflows/harness-plugin.yml) keyed off a tag:
- ⛔ Tags are
plugin-<name>-v<version>—plugin-claude-harness-v0.4.0. Theplugin-prefix is what tells a plugin release apart from a Studio release (v2026.1.0) in the same repository. It is a prefix on the tag only: the directory staysplugins/claude-harness, and the workflow strips it when resolving the directory. - A release title and a tag are different things, and only the tag resolves. Renaming a release on
GitHub changes nothing about
…/releases/download/<tag>/<asset>. - The procedure: PR the harness change with a regenerated lockfile and a repinned
curated-plugins.json(the index entry is a copy of the plugin's ownplugin.json, and a spec asserts they are equal); merge; then tag onmainand push the tag immediately. The compiled-in index beats a published one at the same or lower revision, so from the moment the repin is onmainevery build points at an asset that does not exist until the tag does. The workflow builds the tarball, checks it against the integrity the merged lockfile pins, and refuses to publish a mismatch. - Tag only after the workflow change is on
main— the workflow runs against the commit the tag points at, and a failed run spends the tag. -
gh workflow run harness-plugin.yml --ref <branch> -f plugin=<name>dry-runs a build against the pin without publishing; run it before spending a tag. - The workflow publishes with
--latest=false, because a plugin release must not take the repository's Latest badge from the app.
| Number | Where | Rule |
|---|---|---|
| Plugin API version |
PLUGIN_API_VERSION in src/shared/api/plugin-manifest.ts
|
A manifest is honoured when its major matches and its minor is not newer than the build's. Minor = the contract grew; major = a field changed meaning. |
| Agent protocol version |
AGENT_PROTOCOL_VERSION in src/shared/api/agent-protocol.ts
|
Versioned separately, on the same rule: a harness declaring a newer minor is refused at the handshake rather than half-honoured. |
| Catalogue revision |
revision in src/shared/electron/contributions/plugins/curated-plugins.json
|
A counter. The compiled-in copy and the published copy of the catalogue compete; the higher revision wins. |
| Studio version | package.json |
CalVer, independent of the two above. Each release's notes state all three. |
A contributor changing the manifest contract must bump PLUGIN_API_VERSION in the same PR; a spec
fingerprints the contract's shape and fails otherwise. See
Contributing › Changing the plugin contract.
The list of plugins Studio offers is curated, not open: every entry names an archive that will be
downloaded and executed, so what is on the list is a decision somebody made. The catalogue is
curated-plugins.json, compiled into the app so an offline machine still has one, and fetched live
from main so a new plugin or a bumped version reaches users without a Studio release. The fetched
document goes through the same validator as a sideloaded manifest.
To propose a plugin for the catalogue, open an issue with the manifest and the reason. To use a plugin
that is not on the list, sideload its plugin.json through the Plugin Manager — the same validation
and hash checks apply.
A manifest is entirely a set of claims about external artifacts: this URL exists, its bytes hash to
this, the archive extracts to that entry point. No unit test or end-to-end test can check those — they
stub the artifact, and so test everything except the claim. npm run verify:plugin-index fetches every
pinned download and compares its SHA-256 with what the index states (--all for every platform,
--plugin <id> for one). It is not part of the normal gate, because it downloads hundreds of megabytes
and depends on third-party hosts being reachable; run it before a release, or on a schedule. It catches
the failure nobody notices until a user clicks Install: an upstream project deleting a release,
retagging an asset, or rebuilding it non-reproducibly.
Produce the lockfile in a scratch package
(npm init -y && npm install <server>@<version> --package-lock-only), publish it somewhere stable
over HTTPS, and record its SHA-256 in the manifest. The bundled examples are in
src/shared/electron/contributions/plugins/lockfiles/.
Using Studio
Contributing
How it works
- Architecture
- Runtime seams
- Agent access and permissions
- Agent MCP capabilities
- Agent surfaces, prompts and skills
- Source control
- Plugins
- Package managers
- Language servers — capability matrix
- Language servers — adding a server
- Setup wizard
- Container engines
Decisions