Rove

Writing Rove plugins

The developer-facing reference: everything a plugin can declare, every event Rove fires, every environment variable it injects, and every way to call back in. Design rationale lives in design/plugins.md and design/plugin-events.md; this page is the contract.

A plugin is a directory with a rove-plugin.toml manifest plus any argv commands your machine can run: Bash, Node, Bun, Python, Rust, a prebuilt binary. No SDK is required: the whole rove CLI and the daemon socket are the plugin API, with an optional TypeScript SDK described below. Rove owns the host surface (install, validation, event dispatch, env injection, panes, settings UI, run logs); you own the implementation.

Quickstart

mkdir my-plugin && cd my-plugin
cat > rove-plugin.toml <<'EOF'
id = "you.hello"
name = "Hello"
version = "0.1.0"
min_rove_version = "0.8.24"

[[events]]
on = "agent.turn-complete"
command = ["sh", "-c", "echo \"$ROVE_PLUGIN_TASK_TITLE finished a turn\" >> \"$ROVE_PLUGIN_STATE_DIR/log\""]
EOF

rove plugin link .            # register your working directory (dev loop)
rove plugin log you.hello     # inspect hook runs (exit codes, output, timing)

link is a one-time registration. After it, a running daemon picks up edits to your rove-plugin.toml within about half a second — add an [[events]] hook, fire the event, and rove plugin log shows the run. Re-run link only when you move the plugin, or when its id or version changes.

That half-second applies to the parts the DAEMON runs: [[events]], [[startup]], [[shutdown]], [[actions]], [[panes]], [[settings]]. An [[engines]] table is read once per Rove process instead, so a running TUI keeps the engine list it booted with — see the [[engines]] note under Manifest reference.

Optional SDK (TypeScript)

The contract above is the API: any language, no SDK required. For TypeScript/JavaScript authors, @sma1lboy/rove-plugin-sdk wraps that same contract with types and autocomplete (zero deps, Node ≥ 18 or Bun):

import { pluginContext, pluginEvent, notify, Pane, RoveSocket } from "@sma1lboy/rove-plugin-sdk"

const ctx = pluginContext()   // typed ROVE_PLUGIN_* env
const ev = pluginEvent()      // typed event envelope (null outside [[events]])
  • pluginContext() / pluginEvent(): the env contract, typed.
  • readSettings() / setting(): your [[settings]] values from config .env.
  • rove() / roveJson() + notify / dispatch / listTasks / openPane / promptUser: $ROVE_BIN_PATH callbacks. promptUser pops the TUI's own input dialog and returns null for every non-submit path.
  • RoveSocket: daemon socket client: request(name, payload) + live channel subscribe (always role: "pane").
  • Pane + parseKeys: a tiny pane kit for [[panes]] pages: alt screen, raw-mode keys, resize, absolute-addressed draw(lines). parseKeys turns one raw stdin chunk into key events, for a pane driving its own read loop.
  • PLUGIN_EVENT_NAMES / DAEMON_CHANNELS: the catalogs as typed unions. These are the SINGLE source: the daemon itself imports them from the SDK's ./contract module, so host and SDK can't drift by construction.

Package README has full examples: packages/rove-plugin-sdk/README.md. Module-by-module SDK reference: PLUGIN-SDK.md.

SDK examples

Five runnable examples live under packages/rove-plugin-sdk/examples/, one per surface. Each clip below is the real TUI — recorded through the same browser-PTY path the README assets use, against a throwaway home with the example already linked (packages/rove-harness/e2e/films/), so what you see is where your plugin actually shows up.

task-board [[panes]] — the pane is offered in the ctrl+e picker under its declared title, splits in beside the engine, and redraws when a task is created from outside the TUI: it is subscribed to task.snapshot, not polling.

contrib-engine [[engines]] — a manifest-only plugin puts fake-coder in the engine list next to the built-ins, with the identity and screen-state rules it declared.

settings-demo [[settings]] + [[actions]] — Settings → Plugins renders the settings the manifest declares; editing one writes the config .env your plugin reads on its next run.

hello-events [[events]] — an issue.changed fired from outside the TUI reaches the hook, and the plugin's run summary records the exit status and timing.

turn-notify [[events]] + notify() — the hook calls back INTO the host, and its own copy appears as a toast in every attached UI.

Re-record with:

cd packages/rove-harness
bun e2e/hero-fixture.ts --fresh   # throwaway home + a real repo
bun e2e/hero-plugins.ts           # link every example (BEFORE the TUI boots)
bun e2e/hero-serve.ts             # warm capture stack (keep running)
bun e2e/film.ts take task-board   # also contrib-engine, settings-demo, hello-events, turn-notify
bun e2e/film.ts render task-board # re-encode from the committed cast; no stack needed

Linking has to happen before the harness starts: the TUI reads the plugin registry once at boot, so a plugin linked mid-session contributes nothing a running TUI can see. A take resets the state the previous one left (split panes, run logs, the settings values) and removes the task or story it filed, but a fresh fixture is still the safest start.

Publish: push a public GitHub repo (one plugin per subdirectory is fine), add the topic rove-plugin → it appears automatically in the marketplace (rove.run/plugins, rove plugin search, and Settings → Marketplace inside the TUI) and in the plugin directory. Users install with rove plugin install owner/repo[/subdir] or from that Settings section, and stay fresh with rove plugin outdated / rove plugin update --all (an update is a clean reinstall of the managed checkout; config/state survive).

Manifest reference

id = "you.example"               # letters/digits/dot/colon/underscore/hyphen
name = "Example"
version = "0.1.0"
min_rove_version = "0.8.24"      # install refuses older Rove versions
description = "…"                # optional
platforms = ["macos", "linux", "windows"] # optional; item-level override

[[build]]                        # runs at GitHub install (after preview confirm), cwd = checkout
command = ["npm", "install"]     # self-provision deps INTO the plugin dir; `link` skips build

[[startup]]                      # once per daemon start; the socket may not accept connections yet — retry your connect. One-shot, not a daemon
command = ["node", "restore.js"]
timeout_ms = 30000               # optional, 100…600000; the host SIGKILLs the
                                 # hook's process group at the deadline.
                                 # Default 30s for [[startup]]/[[events]], 3s
                                 # for [[shutdown]] (it delays daemon stop)

[[shutdown]]                     # at daemon stop; bounded (~3s), the host kills a hook that lingers
command = ["node", "flush.js"]

[[actions]]                      # on-demand: rove plugin action invoke you.example.greet [args…]
id = "greet"                     # local id, no dots; extra CLI args append to argv
title = "Say hello"
command = ["sh", "greet.sh"]

[[events]]                       # async observer fired by the daemon (catalog below)
on = "agent.turn-complete"
command = ["sh", "notify.sh"]

[[panes]]                        # a terminal surface in the task workspace
id = "board"
title = "Board"
placement = "split"              # split (default: joins the focused chattab's
                                 # split group beside the engine) | tab (own tab)
command = ["node", "$ROVE_PLUGIN_ROOT/board.js"]   # cwd = the TASK WORKTREE

[[pages]]                        # a React page in the content pane, on the rail
id = "board"                     # rail id: <plugin id>.board
title = "Board"                  # rail label
entry = "page.tsx"               # module inside the plugin (see Pages below)
order = 40                       # rail position; built-in pages sit at 10/20/30
action = "kanban.open"           # optional; see Pages below

[mod]                            # one long-lived process that draws native UI in
command = ["bun", "mod.ts"]      # the TUI and the web alike — see Mods below;
                                 # cwd = plugin root, restarted if it dies

[[settings]]                     # rendered as an editor in Settings → Plugins
key = "YOU_EXAMPLE_MODE"         # stored as KEY=value in your config .env;
                                 # must be a plain env var name, and may not
                                 # be one that steers how a process runs
                                 # (PATH, LD_PRELOAD, NODE_OPTIONS, …)
label = "Mode"
type = "enum"                    # string | number | boolean | enum | secret
options = ["fast", "fancy"]
default = "fast"                 # what the Settings editor pre-fills, NOT a
                                 # stored value: nothing reaches the config
                                 # .env until the user saves, so read it as
                                 # `setting(dir, key, "fast")`. TOML `true` /
                                 # `false` / numbers are accepted and become
                                 # "1" / no default / their decimal spelling

[[settings]]                     # `secret` masks the value everywhere it is
key = "YOU_EXAMPLE_TOKEN"        # shown, for keys the user pastes in
label = "API token"
type = "secret"

[[file_handlers]]                # claim Files-pane opens by filename pattern
pattern = "\\.(png|jpg)$"        # JS regex, case-insensitive, vs the file name
action = "greet"                 # your action, invoked with the absolute path

[[engines]]                      # contribute a coding-CLI engine
id = "aider"                     # VendorId; may not shadow a built-in (claude/codex/copilot/kimi/pi/omp/bob) or shipped engine (gemini/opencode/cursor/grok/droid/amp/devin/qodercli/cline/kiro/maki/antigravity/hermes/kilo/mastracode)
name = "Aider"                   # display name in the selector and Settings
command = ["aider"]              # launch argv; argv[0] is the binary
# process_names = ["aider-core"] # extra ps basenames (post-launch renames)
# first_message_delivery = "paste"  # argv (default) | paste — see below
# model_flag = "--model"         # lets a session pin a model: `<flag> <model>` is appended
# models_command = ["aider", "--list-models"]  # Rove runs it to suggest models — see below
# permission_bypass_flag = "--yes-always"  # appended while Settings → Engines → Skip permission prompts is on
# protocol = "acp"                 # speak Agent Client Protocol over stdio; structured history and activity without screen rules

[engines.identity]               # optional product identity for UI labels
short_name = "Aider"             # falls back to `name`

[[engines.rules]]                # screen-state rules, first match wins;
state = "blocked"                # declare blocked before working
all = ["(y)es/(n)o"]             # every string must appear (case-insensitive)

[[engines.rules]]
state = "working"                # working | blocked | idle
any = ["ctrl-c to interrupt"]    # at least one must appear
# line_regex = ["^\\s*⠋"]        # or: one screen line matches a regex
# bottom_lines = 12              # trailing non-empty lines examined (default 12)

An [[engines]] edit is not picked up by a running TUI. The engine table is process-level state, built once at Rove start from the enabled plugins' manifests, so rove plugin install / link / enable from another terminal registers the engine on disk without any running TUI seeing it. Restart the TUI, or toggle the plugin off and on again in Settings → Plugins, which reloads the table in place. The same applies to the same-session dev loop: edit the [[engines]] table, then restart.

command is argv, never a shell, for events, startup, shutdown and actions: no expansion, no pipes, no globs. Panes are the exception — a pane runs through the user's interactive login shell (sh -ilc, the same launch path as an engine tab), expands $ROVE_PLUGIN_ROOT, and therefore inherits the rc-file environment: your command[0] must resolve on the PATH the user's .zshrc/.bashrc builds, not the daemon's, and anything those files print (version-manager chatter, MOTDs, banners) reaches the terminal before your first draw. The pane kit's start() handles that for you — it enters the alternate screen and clears it, so rc output stays on the primary screen; a pane that does not use the kit should clear the screen itself before its first frame. Unknown event names are warnings (forward compat); invalid types/patterns are install-time errors.

first_message_delivery says how the CLI takes a session's first message. The default "argv" appends the prompt as a positional argument. Declare "paste" when argv[1] means something else — a subcommand, or a project directory — or the launch dies on the prompt text instead of running it (opencode "Run ls -la" exits with Failed to change directory to …). With "paste" the message is typed into the running pane instead.

model_flag is what lets a session pin a model (rove api add --model, the New session model menu). Without it Rove refuses a pinned model for your engine. models_command is argv (no shell) that Rove runs to fill the model menu and rove api engine-list: one model per stdout line, id or id<TAB>label. Lines whose first column contains a space are skipped, and stderr is ignored. The list is cached for 15 minutes, or until the binary changes. It is shown in the install preview, since Rove runs it without asking.

The accepted platform tokens are exactly macos, linux, and windows. A top-level list applies to the whole plugin; platforms on an individual build, startup, shutdown, action, event, or pane replaces that list for that item. With no declaration, Rove assumes the command is portable and allows it everywhere.

A plugin whose top-level platforms excludes the current machine stays in the registry but never runs; Settings → Plugins marks that row not supported on this platform rather than showing it as healthy.

Event catalog

Declare [[events]] hooks; each fire runs your command with the envelope in ROVE_PLUGIN_EVENT_JSON. Events are asynchronous observers. Your exit code and output never block or change what happened. Support: C = Claude Code, X = Codex, K = Kimi Code.

This table is the one-line index. Per-event trigger semantics, exact detail fields, and envelope samples live in PLUGIN-EVENTS.md.

EventFires whenDetail highlights
task.created / task.deletedtask appears/disappears in the indextask context
task.changedany watched task field changed (title/branch/status/pin/vendor/…), fired off the snapshot diff, so EVERY mutation path countsfields, from, to
task.landeda task's branch merged back into its base repostrategy, landedOn, commit
task.pr-changedthe task's PR status changed (open/merged/closed, checks)from, to (TaskPRStatus)
worktree.createda task's worktree materialized: lazy ensure or adopttask context
issue.changeda daemon-tracker issue mutated (create/edit/status)repo, op
note.fileda session filed a field note (rove api note)repo, author, text, persisted
message.deliveredtext was dispatched into a task's live session (dispatch/note relay)source, tabId, length
attention.handledthe human resolved an inbox episodehow: dismissed|read, tabId
automation.dispatched / automation.skipped / automation.failedone scheduled-automation run finished with that outcomeautomationId, name, repo (absent for a routine with no project), status, trigger, scheduledFor, tabId, error
quota.exhausted / quota.resumedrate-limit auto-resume armed / delivered its continue promptvendor, resumeAt / delivered
session.exiteda hosted PTY child died abnormally (the crash signal; the engine's own session.end hook never fires on a crash)tabId, pid, code, signal, exitedAt, tail
plugin.enabled / plugin.disabledYOUR plugin was enabled/disabled in the registry (delivered only to the affected plugin). Registry membership only — a manifest that stops parsing does not fire teardownpluginId
task.openedthe user selects/enters a task row (project.opened stays in the contract but never fires)
file.will-open / file.opened / file.closedFiles-pane open, before/after; editor tab closedpath, via: plugin|editor|external
tab.opened / tab.closeda workspace tab appeared/went away (restores don't fire)tabId, kind, title, vendor, purpose
agent.running / agent.idle / agent.turn-complete / agent.permission-needed / agent.rate-limited / agent.erroractivity-STATE transitions, deduped per task+tabtabId when the source state identifies a tab
agent.rate-limit-recoveredthe first completed turn after that task+tab was rate-limitedlimitedAt, limitedForMs; tabId as above
session.start / session.endengine session lifecycle (C, K; X start only)
turn.prompt / turn.complete / turn.failed / turn.interruptedone event per turn edge (C, X, K; failed: C, K; interrupted is a native hook on K only — on C and X the attached TUI emulates it, so it never fires with no TUI attached)failure class on failed; turn (id/model/usage/startedAt/endedAt) on complete when the transcript yielded one
tool.pre / tool.post / tool.failedevery tool call (C, X, K; failed: C, K); installed into engine config only while some enabled plugin subscribestool.name, tool.id
attention.permission / attention.questionthe engine blocked on a human (permission: C, K; question: C)waiting
context.pre-compact / context.post-compactcontext compaction (C, X, K)compact.trigger: manual|auto
subagent.start / subagent.stopnested agent lifecycle (C, K)subagent.type/id

Envelope (ROVE_PLUGIN_EVENT_JSON):

{
  "event": "tool.post",
  "taskId": "…",                 // when the event mapped to a task
  "task": { "id", "title", "repo", "branch", "worktreePath", "vendor", "status" },
  "vendor": "claude",            // agent-layer events
  "tabId": "…", "sessionId": "…",// when known
  "detail": { /* per-event, see table */ },
  "at": 1690000000000
}

The principle: any observable product moment is a candidate event. The catalog grows as subsystems expose their edges. Threshold policies stay OUT: "worktree dirtier than N" is a plugin's own judgment. Subscribe to the worktree.changes channel over the raw socket and decide yourself. If your plugin needs a moment that isn't fired yet, ask via rove feedback or a GitHub issue; the plumbing (ui.reportEvent → plugin sink) makes additions cheap.

Environment contract

Every plugin command gets, on top of the user's environment:

VariableMeaning
ROVE_BIN_PATHexec this to call back into Rove — the absolute path of the running install when that is a runnable file (an npm install, a compiled binary), otherwise the bare rove name resolved on PATH, which is what a dev checkout run through bun falls back to. In that fallback your callbacks run a different build than the daemon that launched you, so a verb or flag the daemon has can still fail as a usage error: compare $ROVE_BIN_PATH --version against the daemon's own roveVersion (see Which host am I talking to) before blaming your own arguments
ROVE_SOCKET_PATHdaemon unix socket, for raw JSON requests
ROVE_HOME_DIRset when Rove runs against a non-default home (keep passing it through)
ROVE_PLUGIN_ID, ROVE_PLUGIN_ROOTwho you are, where your files are
ROVE_PLUGIN_CONFIG_DIRuser-editable config (.env etc.); survives reinstall
ROVE_PLUGIN_STATE_DIRyour durable state; survives reinstall
eventsROVE_PLUGIN_EVENT, ROVE_PLUGIN_EVENT_JSON, ROVE_PLUGIN_TASK_ID, ROVE_PLUGIN_TASK_TITLE
startupROVE_PLUGIN_EVENT=startup
shutdownROVE_PLUGIN_EVENT=shutdown
actionsROVE_PLUGIN_ACTION_ID, ROVE_PLUGIN_INVOKE_CWD (where the user invoked, usually "the repo I mean")
panesROVE_PLUGIN_ENTRYPOINT_ID, ROVE_PLUGIN_TASK_ID; cwd is the task worktree. Panes get no _TASK_TITLE — read it with "$ROVE_BIN_PATH" api get-task --task-id "$ROVE_PLUGIN_TASK_ID"

Only the ROVE_* namespace, rove-plugin.toml, min_rove_version, and @sma1lboy/rove-plugin-sdk are supported. Update plugins using retired aliases.

Never write durable state under ROVE_PLUGIN_ROOT. GitHub installs are managed checkouts replaced on reinstall. Settings you declare in [[settings]] arrive as plain vars in your config .env; source it (. "$ROVE_PLUGIN_CONFIG_DIR/.env") or read it yourself.

Because that file is sourced, a settings key must be a plain env var name (^[A-Za-z_][A-Za-z0-9_]*$), and a small set of names is refused outright: those that change how a process runs rather than what it reads — PATH, HOME, SHELL, the LD_*/DYLD_* loader vars, NODE_OPTIONS and its per-language siblings, BASH_ENV, GIT_SSH_COMMAND, EDITOR/PAGER. A rejected key fails the whole manifest at parse time, so fix it before publishing. Asking for an API key is fine and expected — use type = "secret" so the value is masked in Settings. Your config .env, state directory, and log.jsonl are all owner-only (0600/0700).

Calling back into Rove

CLI (recommended, portable): exec $ROVE_BIN_PATH with any command. The high-value verbs live under rove api: machine-readable list via rove api schema, human list via rove api help. Highlights:

"$ROVE_BIN_PATH" api add --repo <dir> --title T --prompt "…"   # create task + start engine
"$ROVE_BIN_PATH" api dispatch --task-id ID --prompt "…"        # text into a live session
"$ROVE_BIN_PATH" api list                                      # all tasks (JSON)
"$ROVE_BIN_PATH" api notify --title "done"                     # toast in every attached UI
"$ROVE_BIN_PATH" api issue-create --repo <dir> --title "…"     # daemon issue tracker
"$ROVE_BIN_PATH" api prompt --title "URL?"                     # host input dialog → {value}|{cancelled}
"$ROVE_BIN_PATH" api read-output --task-id ID                  # structured session reads
"$ROVE_BIN_PATH" plugin pane open you.example.board            # qualified-id form
"$ROVE_BIN_PATH" plugin pane open --plugin you.example \
  --entrypoint board                                           # equivalent flag form
"$ROVE_BIN_PATH" plugin pane open you.example.board --task ID  # a specific task, not the active one

plugin pane open prints JSON: {"ok":true,"clients":N,"pane":…,"taskId":…,"title":…}. Branch on clients, not the exit code — the open is a broadcast, and 0 means no attached UI performed the split. Without --task the host uses the active task and fails when there is none, so an event hook should pass its own $ROVE_PLUGIN_TASK_ID.

Socket (advanced): newline-delimited JSON frames on ROVE_SOCKET_PATH ({"type":"request","id":"1","name":"task.list","payload":{}}); request names and payloads in packages/rove-daemon/src/daemon/protocol.ts. Prefer the CLI unless you need push channels.

Which host am I talking to

The hello request answers it, and it is the only thing that can: your SDK version describes what YOU were built against, not what the running daemon knows. Send {"type":"request","id":"1","name":"hello","payload":{}} (the SDK wraps it as RoveSocket.hello()) and read back:

  • roveVersion — the daemon's build version. The SDK also surfaces it as roveVersion; the wire field keeps its original spelling.
  • capabilities — the broadcast channels this daemon has. A channel name it does not know is dropped from a subscribe filter silently, so this is how you tell "the host is too old for that channel" from "nothing has happened yet".
  • protocolVersion / minProtocolVersion — the wire range it accepts.
  • homeDir — its state root. A different home means you reached a foreign daemon (a sandbox one on the production socket path).

Pages (experimental)

A [[pages]] entry adds a row to the sidebar rail (beside Kanban, Routines and Issues) that opens a React page in the content pane, rendered by the TUI itself rather than in a terminal. The module runs inside the TUI process, with the trust your plugin's commands already have.

The entry's default export is a factory. Rove calls it once with the host API and renders what it returns:

/** @jsxRuntime classic */
/** @jsx h */
import { createElement as h, useState } from "react"

export default function page(host) {
  host.i18n.registerMessages("board", { en: { empty: "Nothing yet" }, zh: { empty: "还没有内容" } })
  return function BoardPage(props) {
    const { theme } = host.theme.useTheme()
    const t = host.i18n.useT()
    host.keymap.useBindings(() => ({
      enabled: props.focused,
      bindings: [...host.keymap.pageCloseBindings(props.onClose)],
    }))
    return <text fg={theme.textMuted}>{t("board.empty")}</text>
  }
}
  • Imports. react, @opentui/react and @opentui/core resolve to the TUI's own copies, so hooks work. Everything else of Rove's comes through host (apiVersion 1): i18n, theme, keymap, notifications, dialog, ui, layout, text, paths, projects, tasks, engines, attachments, issues. The authoritative list is packages/rove/src/tui-react/pages/host-api.ts. Keep the shared runtime external if you bundle.
  • JSX. Use the classic transform (the two pragma lines above) or plain createElement calls. The automatic runtime injects an import Bun resolves before any plugin hook, so a page outside node_modules cannot load it.
  • Props. orchestrator (the TUI's daemon client), focused (gate your bare keys on it), onClose, onOpenTask(taskId), selectedTask and engineStates.
  • Opening it. A click on its rail row always works. action can claim one of the page-open chords, kanban.open, automations.open or workItems.open, and the page with the lowest order keeps a chord that two pages claim. Any other action is refused; the page still loads.
  • Failures. A page whose module fails to load contributes nothing. Its reason shows under the plugin in Settings → Plugins. Toggling the plugin there adds or removes its rail rows at once; changed page code needs a TUI restart.

Interaction surfaces

  • ctrl+e picker: every enabled plugin's panes are listed by title; picking one opens it with your declared placement.
  • User keybindings: users bind chords themselves in ~/.rove/settings/keybindings.yaml: plugins: { ctrl+b: pane:you.example.board, f6: action:you.example.greet }. Ship the suggestion in your README; Rove ships no default plugin chords.
  • Rail pages: [[pages]] add React pages to the sidebar rail — see Pages.
  • Files pane: [[file_handlers]] claims opens by pattern.
  • Engines: [[engines]] contributes a coding CLI to the engine selector: identity, launch command, and screen-state rules for working / needs-input badges. For tabs attached to an open TUI, a blocked screen rule also updates the sidebar and attention inbox within one screen poll (up to six seconds). Hook claims take precedence. The screen claim clears when the dialog disappears or polling detaches; unopened tabs need hook reports. Screen reports do not emit plugin lifecycle events. Beyond screen scraping, a wrapper can report PRECISE activity itself: rove api engine-report --kind turn-complete --engine <id> drives the same badge / attention-inbox / plugin-event pipeline the built-in hook adapters use (kinds: session-start|turn-start|turn-complete|turn-failed|turn-interrupted|awaiting-input|session-end, plus the plugin-only tool-*/*-compact/subagent-* family). Account detection, history readers, and model catalogs still require a built-in adapter in Rove itself; render those surfaces yourself via [[panes]].
  • Task-row tokens: put one short label on a task's sidebar/board row — see below.
  • Mods: a [mod] process draws panes of boxes, text and buttons on the rail's Mods page, natively in both the TUI and the web — see below.
  • Host input dialog: rove api prompt --title "…" (SDK: promptUser()) pops the standard input dialog in every attached TUI and web page and blocks for the first answer: {value} on submit, {cancelled, reason} on esc/timeout. Use it instead of hand-rolling in-pane prompts.
  • Settings → Plugins: enable/disable, declared surfaces, last run, and your [[settings]] editors. Rove's first-party mods (Kanban, Issues) are listed first, not installed until you install them there or with rove plugin install kanban.
  • Settings → Marketplace: your repo's rove-plugin topic listing, its description, and the install preview built from your manifest's build, startup, action and event commands.
  • CLI: rove plugin action invoke, rove plugin pane open, rove plugin log, rove plugin config-dir (prints the plugin's config directory).

Task-row tokens

The row is where the human already looks, and until now nothing a plugin knew could reach it. That is the single reason a coordination plugin could not be built on Rove: the point of one is to say, on the row, who claimed this, what queue it is in, what your own system thinks of it.

"$ROVE_BIN_PATH" api row-token --task-id ID --text "@ana" --tone info --ttl 600
"$ROVE_BIN_PATH" api row-token --task-id ID --clear
import { setRowToken, clearRowToken } from "@sma1lboy/rove-plugin-sdk"

await setRowToken(taskId, "@ana", { key: "claim", ttlSeconds: 600, tone: "info" })

A token expires unless it is kept

Expiry is the default and it is the point. A token carries a TTL (default 60s, max 1h); readers drop it when it lapses, and the host republishes at each expiry so a label fades on its own. Keep a label by re-writing it — the same --key replaces the token and renews its deadline.

So the label on screen is evidence that your plugin is alive and still believes what it says, not a record that something once wrote it. Disable your plugin, kill it, let it crash: every label it painted is gone within its TTL, with nothing to clean up. These tokens are in memory only — a daemon restart clears them, deliberately, because restoring a claim whose author is gone is exactly the stale state the TTL prevents.

rove api row-token --keep is the other kind: a label with no deadline, saved to disk, there until it is replaced, cleared or its task is deleted. It is for a fact someone set once (an agent asked to label its task), not for state your plugin must be running to vouch for. Nothing removes it when its writer dies.

clearRowToken() exists for the moment you know a label is wrong. Waiting out the TTL is the normal removal.

Yours vs host-owned

You ownThe host owns
your label text, in your own slotthe derived task group (waiting-on-you / landing / …)
which of your two slots per task it lands in (--key)the activity badge, the PR chip, the spinner
its semantic tonewhat that tone actually looks like, per theme
when to refresh it, and when to drop itthe title, the branch, the row layout and its budget

A plugin cannot address anything in the right-hand column. A plugin able to overwrite "waiting on you" could make the row lie about whether a human is blocked, and no third party should be able to do that. tone names a role (info / success / warning / error / muted), never a colour, so the user's active theme still decides how your label is drawn — and no vendor or engine name belongs in one: the engine adapter owns that vocabulary (see AGENTS.md).

Limits

  • 24 characters, whitespace collapsed. A row shares ~2 lines with its title and branch; past that a token stops being a label and becomes the row.
  • 2 slots per plugin per task. How many plugins are installed is the user's own decision; one plugin filling the row is not.
  • TTL 1s…1h, clamped. "Forever" is --keep, never a long TTL.
  • source is your ROVE_PLUGIN_ID, carried for attribution and the quota above. It is not authenticated — a plugin already runs arbitrary code as the user — so treat it as a label, not a permission.
  • The write returns { ok: false, reason: "UNSUPPORTED" } on a host with no row-token surface; the SDK helpers answer false rather than throwing, so you never have to version-gate the call.

Runnable example: examples/row-tokens/.

Mods

A [mod] is one process that keeps running while the daemon does and draws element trees instead of terminal bytes. Rove validates each tree and every attached client draws it with its own widgets: the TUI with OpenTUI boxes, the web with DOM elements. A press in either one reaches the same process, and every client redraws, so the TUI and the browser always show the same state. Design: design/mods.md.

Mods or pages? A page is a React module inside the TUI with the whole host API, and draws only in the TUI. A mod is its own process with a small fixed vocabulary, and draws the same thing in the TUI and the web. Pick a mod when the UI must work in the browser too.

import { Box, Button, Text, runMod } from "@sma1lboy/rove-plugin-sdk"

const mod = runMod()
let count = 0
function draw(): void {
  mod.pane("main", "Counter", Box({
    direction: "row",
    gap: 2,
    children: [
      Text({ text: `Count: ${count}`, bold: true }),
      Button({ key: "inc", label: "+1", tone: "success", onPress: () => { count++; draw() } }),
    ],
  }))
}
draw()

Call mod.pane(id, title, tree) whenever your state changes and mod.close(id) to remove a pane. The rail shows a Mods row while any mod has a pane open; the page lists every pane with its title and plugin id.

Elements (the whole vocabulary, so every client can draw every tree):

elementprops
boxdirection "row"/"column" (default column), gap, padding (steps 0–3: cells in the TUI, a px scale in the web), border, children
texttext, tone, bold
buttonkey (unique in the tree), label (≤40 chars), tone
inputkey (unique, shared with buttons), placeholder, value — one line; Enter submits its text

tone is a role — info, success, warning, error, muted — and the client's theme picks the colour. A tree with an unknown element or prop, a duplicate key, more than 400 elements or deeper than 12 levels is refused whole: the last good tree stays on screen and the reason goes to rove plugin log <id>. A mod holds at most 8 panes.

An input keeps what the user types until they press Enter; then its text reaches the field's onSubmit (SDK: Input({ key, placeholder, onSubmit })) and the field empties. Draw it with a new value to replace what it holds. On the Mods page, while a field has focus, letters are typing: only ↑/↓, tab and esc stay page keys.

Plugin events reach a running mod directly, with the same envelope an [[events]] hook gets: mod.on("task.created", (e) => …). A mod receives only the events it subscribed to; the tool.* family still needs some plugin's [[events]] hook to switch the engine hooks on (see the volume gate in the event reference).

Without the SDK the wire is JSON lines on stdio, in any language:

mod → Rove  {"type":"pane","id":"main","title":"Counter","tree":{…}}
mod → Rove  {"type":"close","id":"main"}
mod → Rove  {"type":"subscribe","events":["task.created"]}
Rove → mod  {"type":"press","pane":"main","key":"inc"}
Rove → mod  {"type":"submit","pane":"main","key":"note","value":"buy milk"}
Rove → mod  {"type":"event","event":{"event":"task.created","taskId":"…",…}}

subscribe replaces the previous list; a restarted mod starts with none.

Stdout is the protocol, so log to stderr (it lands in log.jsonl). A mod that exits loses its panes and is restarted after 1s, backing off to 30s; a run longer than a minute resets the backoff. Editing the [mod] command in the manifest restarts it, and so does saving a file that command names inside the plugin root (mod.ts in ["bun", "mod.ts"]): the mod comes back on the new code within a second. A file it only imports does not: save the entry too, or disable and re-enable the plugin. The mod gets the usual environment contract with ROVE_PLUGIN_EVENT=mod; read live state the events do not carry from the daemon socket (RoveSocket), as the example does.

Runnable example: examples/counter-mod/.

Ground rules

  • Hooks must be fast and silent. Event hooks run on real product moments; do your slow work detached. Exit non-zero only for real failures; output is capped at 8 KB per run in log.jsonl.
  • Every hook has a deadline. 30s for [[startup]] and [[events]], 3s for [[shutdown]], or whatever timeout_ms you declare. At the deadline the host kills the hook's process tree (SIGKILL to the process group on POSIX, taskkill /pid <pid> /T /F on Windows), so a curl with no --max-time on a tool.post hook stops one process short of leaking one per tool call. A hook still running after ~2s gets a phase: "running" record in log.jsonl, ahead of the record its exit will write.
  • Never block. Events are observers; there is no veto surface. Blocking tweaks (deny a tool call) belong in engine-native hooks the user installs directly.
  • Trust model: plugins run as the user with their environment; installs first preview the [[build]], [[startup]], [[actions]] and [[events]] commands — on the CLI and in Settings → Marketplace alike — but nothing is sandboxed. [[shutdown]], [[panes]], [mod], [[pages]], [[engines]] and [[file_handlers]] are not in the preview. Keep your repo auditable. That's what gets you installed.
  • Reference implementations: the first-party plugins in Sma1lboy/rove-plugins (notifications, GitHub/Linear task starters, lazygit pane, Chromium pane, the character-cell video player).

On this page