---
name: auldera-plugin
description: Build, change or debug a plugin for the Auldera meeting app. Covers finding the installed SDK and the auldera-plugin CLI, starting from a recipe, checking and testing against synthetic meetings, looking at the UI you built, and registering the plugin for the person to review. Use when someone asks for an Auldera plugin.
metadata:
  version: "2.0.0"
  sdk-level: "2"
---

# Building an Auldera plugin

Auldera captures and transcribes meetings. Plugins do what comes after:
summaries, live coaching, cards, tabs, commands, exports and generated views.
You write one, prove it works from the command line, and hand it to the person
for review. This guide is for SDK level 2.

Three rules hold throughout:

- **Never approve.** You register; only the person approves, in Auldera. Never
  write under `~/.config/auldera/plugins/.status/` or work around review.
- **Never use real meeting content.** Test only against the synthetic meetings
  the SDK ships. Do not read the person's recordings, transcripts or notes.
- **Never ask for credentials.** A plugin declares a secret by name in its
  manifest and the person types the value into Auldera. You never see it.

## 1. Find the SDK and the CLI

```
ls ~/.config/auldera/plugins/sdk/        # README.md, auldera.d.ts, sdk.json, recipes/, fixtures/
cat ~/.config/auldera/plugins/sdk/sdk.json
~/.config/auldera/bin/auldera-plugin --help
```

- If `sdk/` or the CLI is missing, stop. Tell the person to open Auldera and go
  to Plugins, which installs both. Do not download an SDK from anywhere else.
- `sdk.json` has `"sdk"`, the level. Below 2, stop: this guide needs a newer
  Auldera.
- `sdk.json` has `"status"`: a key is `true` when the app itself serves that
  feature (`run`, `hostCalls`, `panels`, `views`, `generateUI` and so on). The
  CLI works either way, because it runs your plugin against a mock host. If a
  feature the plugin needs is `false`, build and register it anyway and tell
  the person their build does not run that part yet.
- Use the full path if `auldera-plugin` is not on `PATH`. Every command takes
  `--json`. Exit code 0 is clean, 1 is problems, 2 is a wrong call.

`sdk/README.md` is the API in one page and `sdk/auldera.d.ts` is every type.
Read both before writing code: they are the authority on what the installed
build accepts.

## 2. The loop

Work in this order and skip nothing.

1. **Pick the capability and the nearest recipe** (section 3), then scaffold:
   `auldera-plugin new ~/.config/auldera/plugins/<name> --template <recipe>`.
   Use that folder unless the person names another. Leave the plugin there:
   Auldera loads it from the folder you register. `new` sets the id to
   `my/<name>` and the name from the folder name. Everything else is still
   the recipe's.
2. **Choose the model on facts** (section 5) if the plugin uses one.
3. **Edit** `auldera-plugin.json` and `plugin.ts`. Rewrite `description`.
   Delete what the recipe had that this plugin does not need: handlers,
   capabilities, permissions, settings, `cases/`, `panels/`,
   `fetch-fixtures.json`. Declare every permission the code uses and nothing
   else. The id in `definePlugin` must equal the manifest's.
4. **Check:** `auldera-plugin check <dir>`. It validates the manifest and
   freezes the code as the app will. Fix every problem; each has a `hint`. It
   prints whether the plugin is on-device or connected.
5. **Test:** `auldera-plugin test <dir>` runs every declared capability on five
   synthetic meetings. Every run must pass. A `skip` line means nothing in that
   meeting triggers the capability, which is fine if at least one meeting does.
   A `note:` line at the end means the host refused a call and the handler
   caught it. The run passed, but the plugin may have done nothing.
6. **Read one run in full:** `auldera-plugin run <dir> --fixture <name>` prints
   the reply, every host call with its outcome, every log line and anything
   shown. Passing is not the same as right: compare the output with the goal.
   `auldera-plugin fixtures` lists the meetings and `fixtures <name>` prints
   one, so you can pick a meeting that says what the plugin reacts to.
7. **Look at any UI you built.** For a panel, run
   `auldera-plugin render <dir> --panel <id> --fixture <name> --png out.png`.
   Then open `out.png` and `out-dark.png` and look at both. Without `--png` the
   command prints the block tree. If no picture could be written, read the
   tree. Tell the person you could not look at a picture.
8. **Write eval cases** if the plugin shows cards, recap sections, notices or
   views. `auldera-plugin eval <dir> --record --fixture <name> --at <row>`
   writes `cases/<fixture>-<row>.json` from what the plugin shows at that row.
   Add the text that matters to its `facts`. Add one case where the plugin
   must show nothing (`"expect": { "quiet": true }`). `--record` runs the live
   capabilities; for an event or a command, add `"capability"` to the case by
   hand. Run `auldera-plugin eval <dir>` until every case passes. Eval does
   not see a provider's reply, a command's message or a panel. For those, skip
   this step and rely on steps 6 and 7.
9. **Score:** `auldera-plugin eval <dir> --score`. `forbidden shown` must be 0
   and `false offers` should be 0. Recall counts live output only, so 0% is
   expected for a plugin that shows nothing during a meeting.
10. **Register:** `auldera-plugin register <dir>`. Register last, and again
    after any change: Auldera refuses a request whose manifest has changed.
11. **Tell the person** (section 7).

`auldera-plugin dev <dir>` repeats check and a run on every save.

## 3. Choose the capability

A capability is what Auldera calls your plugin for. List each one in the
manifest and in `definePlugin`, and define its handler.

| The person wants | Capability | Handler | Nearest recipes |
| --- | --- | --- | --- |
| Their own kind of summary | `summary.generate` | `onSummaryGenerate` | `design-review`, `sales-discovery` |
| Help while the meeting runs | `live.coach` | `onTranscriptContext` | `one-on-one-coach`, `glossary`, `agenda-coverage` |
| Something when a phrase is said | `event.transcript.keyword` | `onKeyword` | `standup-blockers` |
| Something after the meeting | `event.session.settled` | `onSessionSettled` | `decision-log`, `standing-views` |
| A menu or palette command | `command` | `onCommand` | `follow-up-email`, `what-if` |
| A tab, side panel or app | `ui` | `onPanelRender` | `design-review`, `one-on-one-coach`, `decision-log` |
| The Canvas beside the meeting | `view.compose` | `onViewCompose` | `commitment-readback`, `spoken-numbers`, `argument-map` |
| Send the meeting somewhere | `export` or `command` | `onExport`, `onCommand` | `action-items-to-linear` |

The others are `title.generate`, `ask.answer`, `live.fold`,
`preparation.provide`, `schedule`, and the events `event.session.started`,
`event.session.stopped`, `event.summary.completed`, `event.project.filed` and
`event.item.committed`. See [capabilities](references/capabilities.md) and
[recipes](references/recipes.md).

Providers (the summary, title, ask, fold, coach and preparation handlers)
receive the transcript in their first argument. Events, commands and panels
receive only a reference to the meeting and read what they need through
`host`, which needs the matching permission.

## 4. A complete plugin

Two files. This coach is on-device and uses no model.

```json complete-plugin=parking-lot file=auldera-plugin.json
{
  "sdk": 2,
  "id": "my/parking-lot",
  "name": "Parking Lot",
  "description": "When someone parks a discussion for later, reminds you to write it down. On-device, no model.",
  "version": "1.0.0",
  "entry": "plugin.ts",
  "capabilities": ["live.coach"]
}
```

```ts complete-plugin=parking-lot file=plugin.ts
import { definePlugin } from "@auldera/plugin";

const parked = /\b(?:take (?:that|this|it) offline|park (?:that|this|it)|come back to (?:that|this|it)|another time)\b/i;

export default definePlugin({
  id: "my/parking-lot",
  capabilities: ["live.coach"],

  // Called as the transcript grows, with the newest rows. Return a card, or `{ card: null }` for nothing.
  onTranscriptContext({ rows }) {
    const latest = rows.at(-1);
    if (latest === undefined || !parked.test(latest.text)) return { card: null };
    return { card: { title: "Parked", body: "A discussion was just put off. Note it so it is not lost.", refs: [latest.ref] } };
  },
});
```

Every handler is `(context, { host, signal })`. A plugin only computes.
Everything else goes through `host`: models, reading the meeting, proposing
changes, the network, storage and UI. [Host API](references/host-api.md) lists
each call with the permission it needs.

## 5. Choose the model

The SDK assumes nothing about the model, and neither should you.

- If the person said which model the plugin will use, write for that model.
  Otherwise ask them, or read the facts with `auldera-plugin models --json`:
  context size, structured output (`none`, `json` or `schema`), tool calling,
  vision, speed, and whether the model runs on Private meetings.
- State what the plugin needs in the manifest, so the person sees it:
  `"models": { "requires": { "structuredOutput": "schema" } }`. If no model
  the person has meets it, the plugin shows "Needs a model that …" and waits.
- Write the prompt and the parsing for that model. A call that asks for a
  feature the model lacks is refused with `unsupported`. Nothing degrades
  silently. The host never retries, repairs or falls back for you.
- Do not branch on model names or guess at size. Patterns that suit different
  models, each with what it costs, are in [models](references/models.md).

**The test model knows nothing.** The CLI runs your plugin against a mock host
whose model is deterministic. Asked for text, it returns every markdown heading
in your prompt, in order, each followed by one line taken from the prompt. With
`json: true` it returns the last JSON object written in the prompt; with
`schema`, the smallest value the schema allows. A test proves that the plugin
asks, parses and handles refusals correctly, not that the answers are good.
A firm rule in the goal belongs in your code, not in a hope about the model.
Examples are sections that must exist, a line that must be quoted, and a card
that must not appear.

## 6. Permissions, privacy and UI in brief

- **Permissions** live under `permissions` in the manifest: `read`
  (`transcript`, `notes`, `items`, `library.search`, `views`), `write`
  (`propose` or `apply`), `model`, `storage`, `destinations` and `secrets`. A
  call without its permission is refused with `denied`, and the hint names the
  line to add. Add one only when the plugin's purpose needs it.
- **Privacy class.** A plugin with no destinations and no secrets is
  **on-device** and may run on every meeting. Any other is **connected** and
  never runs on Private meetings. Prefer on-device.
- **Network.** `host.fetch` reaches only the exact HTTPS origins under
  `destinations`. The host adds a declared secret:
  `auth: { secret: "NAME", as: "bearer" }`. In tests, responses come from
  `fetch-fixtures.json` beside the manifest; the CLI never uses the network.
- **UI.** A plugin can show a card, add a recap section, and add tabs and
  panels built from blocks. It can create views on the Canvas, generated ones
  included (`host.generateUI`). See [views and UI](references/views-and-ui.md).
- **Budgets and state.** Host calls, tokens, storage and network volume are
  budgets the person owns; a reached one refuses with `limit`. The worker can
  restart at any time: keep what must survive in `host.storage`.

## 7. Hand it to the person

After `register` succeeds, tell the person, in plain words:

1. Where the plugin folder is and what the plugin does.
2. What it reads, whether it uses a model, and where it sends data, if
   anywhere. Whether it runs on Private meetings (`check` printed this).
3. Any secret they must enter, by its label: in Auldera, in the plugin's
   settings, never in this conversation.
4. What you tested and what you could not. The test model is a stand-in.
5. The next step: **open Auldera, go to Plugins, and review the plugin.**
   Nothing runs until they approve it.

`auldera-plugin status <id>` and `auldera-plugin logs <id>` show what Auldera
knows about a registered plugin and what it did once it has run.

## When something fails

Every problem the CLI prints is `{ code, path, message, hint }`. Fix the cause
the hint names. Do not widen permissions, weaken a case or delete a capability
to make a command pass. [Debugging](references/debugging.md) lists the codes
and the mistakes that cost the most time. Audio capture, transcription and
Sync are not open to plugins, and nothing may cover the capture controls.

## References

- [Capabilities](references/capabilities.md): handlers, contexts and returns.
- [Host API](references/host-api.md): each `host` call and its permission.
- [Views and UI](references/views-and-ui.md): panels, blocks, views, bindings,
  generated UI, `definePluginUI`, computed values.
- [Manifest](references/manifest.md): every field of `auldera-plugin.json`.
- [Models](references/models.md): facts, `models.requires`, patterns and costs.
- [Debugging](references/debugging.md): codes, what `test` and `eval` exercise.
- [Recipes](references/recipes.md): the fifteen recipes and what each shows.
