design draft

38. The plugin interface

Status: unimplemented — design draft. This chapter is a plan for the owner to edit. It ships no code yet, and paths marked planned do not exist.

Premise

Every member so far was written by us. This chapter defines the interface that lets anyone add one: what a plugin declares, what it may register, and how it is packaged.

Draft

Episode 289 says of the member list: "This is all going to be added to, first by us and then by you." A plugin is how you add to it.

This is the oldest network argument in the archive. [Episode 48](../../docs/transcripts/048.md) plans a plugin system so that community developers can supply agent logic and integrations. [Episode 58](../../docs/transcripts/058.md) has an agent call one. The reusable unit moved from a whole agent to a piece another agent can use.

A plugin declares its operations. Each has a name, a summary, typed input and output, its effects, and how it can be tested. That is the same descriptor every member has, so the front treats a plugin's operation like any other route.

Everything a plugin registers belongs to it. When the plugin is turned off, its operations, hooks and commands go with it. Its state is always visible: installed, enabled, admitted, active, failed or stopping. The Coder book builds this ownership model for a coding session, and this chapter widens it to the whole agent.

A package can carry four kinds of contribution: a plugin with code, a program, a skill, which is written instructions the agent loads when needed, and knowledge entries. A package can also carry the test set that measures it.

Episode 289 says where the shape came from: we adapted it from Claude Code's plugins and its way of helping you write evals. People already write plugins and skills in that form, so reading those formats is worth doing.

What we build

A plan for what this chapter ships once the draft is approved:

  • A plugin manifest and operation descriptor, shared with chapter 13's member descriptor.
  • Owned registration: turning a plugin off removes everything it registered.
  • A package format that carries plugins, programs, skills, knowledge entries and test sets.

It builds on what exists today:

On the protocol (chapter 65):

RecordSchemaCarriageToday
Manifest and operation descriptoropenagents.extension.v1 Manifest, OperationDescriptor (spec 20.2)Inside a release event (chapter 54)Spec sketch; no .proto file. coax/lib/nostr/ext handles the NIP's JSON. Coder's plugin manifests are plain files or signed NIP-78 events today
Skill listingopenagents.skill.v1 Listing (spec 20.3)Nostr kind 30188 (NIP-SKILL)Spec sketch; no .proto file

The chapter's check

  • Source: a plugin manifest with one operation descriptor, under openagents/plugins/, and the owned registration that comes with it.
  • Trace: load the manifest, enable the plugin and print the front's routes: the plugin's operation appears with its name, summary, input and output types. Turn the plugin off and print the routes again: its operation, hooks and commands are gone, and its state reads stopping then installed.
  • Refusal: a manifest whose operation has no input type is refused with the field named, and nothing is registered.
  • Independent check: Coder's existing plugin, `coder/plugins/hello`, read through the new manifest reader, gives the same operation that coder/tui/plugins.coax registers for it today.

Planned paths: openagents/plugins/.

Sources

Open questions for the owner

  1. Do we read Claude Code's plugin and skill formats directly, or only our own package format?