Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
Example Plugins
Sample plugins for development, specification, and integration tests. Start with the zero-to-one plugin development guide before using these as API references.
hello
Reference example covering:
commandsui.panelagentToolsskillssettingsthemes- resident
services - inter-plugin
bus permissions
Related specs:
docs/spec/07-plugins/01-plugin-system.mddocs/spec/07-plugins/02-plugin-manifest-schema.mddocs/spec/07-plugins/03-plugin-api.mddocs/spec/07-plugins/05-plugin-lifecycle.mddocs/spec/07-plugins/09-plugin-command-palette.md
Panel chrome contract:
- PI-Desktop owns exactly a transparent 46px drag band and the minimal top-right three-button window-control capsule on every platform.
- Normal-flow panel content is offset below that band automatically. Do not add another 46px top padding.
- If a panel adds fixed or sticky top UI, anchor it at
top: var(--pi-plugin-titlebar-height, 46px). The plugin owns that UI and should add-webkit-app-region: no-dragto its interactive controls.
ui-slots-lab
Test plugin for the renderer UI slots (docs/plugin-plan/). It puts one
visible sample in every slot, each marked data-lab="<slot>[:<side>]":
userAction/assistantActionitems; the assistant bar's right side has four items, so the fourth sits in the ⋯ menu- two stacked
entryExtrablocks under a reply - the
toolCardof its ownlab_probetool - the
blockRendererforlab.ui-slots:chartfences (label,valuelines) composerControlcontrols on both toolbar sides
The samples exercise the contract a person should see working: plugin.call
round trips (Echo, Refuse → LAB_REFUSED, Stall →
PLUGIN_CALL_TIMEOUT), composer.insertText, a Crash control the host
must contain, Grow past the entryExtra collapsed height, and deliberate
contract failures that hand the block back to the host: lab_probe
with mode: "crash", and a chart whose first line is crash or tall
(taller than the 4000px clamp).
Covered by apps/desktop/test/plugin-ui-slots-lab.test.mjs and the Electron
E2E.
Templates and additional examples
panel-basic, agent-tool-basic, skill-pack, and full-demo are implemented
in packages/plugin-devkit/src/templates.ts; generate them with the app or
pi-plugin init rather than looking for separate example folders.
roundtable demonstrates model catalog/one-shot completion and an agent tool.
fetch-redirect is a local-only network-policy probe, not a marketplace package.
Load repository examples with Load development plugin and inspect their
manifest grants before exercising them. Source maps and the complete SDK method
inventory are in the development guide.
Distribution
The official catalog is the plugin center's
catalog.json. Plugin sources remain
in publisher-owned repositories. The
GitHub distribution mirror
contains distribution artifacts/catalog data, not the source warehouse or a
mandatory plugin template. pi-plugin publish prepares local submission files;
it does not upload. See the guide's release workflow before publishing.
Fetch redirect probe
fetch-redirect is a local-only fixture plugin for host-enforced follow/error/manual policies and capability detection.