Desktop Plugin SDK (@hermes/plugin-sdk)
Desktop الإضافات SDK (@hermes/plugin-sdk)
Start with meaning, then move to detail.
This lesson explains Desktop Plugin SDK (@hermes/plugin-sdk) as part of Hermes internals and extension points. You will learn what it does, when it matters, and the smallest safe test that proves it works.
If you are new, do not memorize names. Focus on three questions: what problem does this solve, what access does it need, and how can you verify the result?
For practice, inspect the first example, identify its effects, run it on test data, and compare the result with the source claim.
For advanced readers, inspect Mental model, Two delivery modes, Quick start — your first plugin, then verify failure modes and version compatibility.
Know Python, Git, and basic project structure before changing code.
A clear outcome before you read.
- Understand Desktop Plugin SDK (@hermes/plugin-sdk) without assumed prior knowledge.
- Separate the source description from what still needs testing in your environment.
- Read the first command and identify its inputs and outputs before copying it.
Short definitions before the details.
- Provider
- The service that runs or provides access and authentication to a model.
Extend the native Hermes Desktop app — panes, pages, sidebar nav, status bar, palette commands, keybinds, themes, and a scoped backend namespace, with one import and no build step.
What does the source say, and in what order?
- 01Mental model
Start here to understand the core idea or structure.
- 02Two delivery modes
Read this after the foundation, then connect it to the previous step.
- 03Quick start — your first plugin
Read this after the foundation, then connect it to the previous step.
- 04The plugin contract
Read this after the foundation, then connect it to the previous step.
- 05Contribution areas — the cookbook
Read this after the foundation, then connect it to the previous step.
- 06Panes
Read this after the foundation, then connect it to the previous step.
- 07Pages and sidebar nav
Read this after the foundation, then connect it to the previous step.
- 08Status bar and title bar
Read this after the foundation, then connect it to the previous step.
- 09Palette commands and keybinds
Read this after the foundation, then connect it to the previous step.
- 10Themes
Finish here to verify the result and special cases.
Copy only after you understand the effect.
Save it. The app watches `desktop-plugins/`, loads the file within a few seconds,
and hot-reloads every later save in place. If it doesn't appear, run ⌘K →
**Reload desktop plugins**. If loading fails, a toast names the error — fix and
save again.
:::note No JSX, no build
The disk file is loaded **uncompiled**, so JSX syntax will not parse. Write UI
with `jsx()` / `jsxs()` calls from `react/jsx-runtime` (or `React.createElement`).
The only importable specifiers are `@hermes/plugin-sdk`, `react`, and
`react/jsx-runtime` — everything else fails to resolve, on purpose.
:::
## The plugin contrac`register` receives a **scoped** `PluginContext`. It never touches the registry
directly — the context auto-tags provenance (`source: 'plugin:<id>'`) and
namespaces every contribution id (`<id>:<localId>`), so two plugins can never
collide.A **contribution** is the one primitive every surface shares:Read the first command and identify its inputs and outputs before copying it.
Match every command to your installed Hermes version, review the files and accounts it can reach, and use non-sensitive data for the first test. If this explanation differs from the source, the official source wins.