Reference

Plugin specification

A Yapture plugin is a signed manifest plus a sandboxed WebAssembly module. The manifest declares identity, triggers, runtime entry points, and the capabilities a user must approve before install.

Overview

Plugins add command results to Launcher, desktop, and command-palette surfaces without owning user data. Hosts pass scoped input to the WASM module, render returned result items, and execute actions only after a user confirms a result.

Installed inventory

Authenticated clients read installed plugin state from GET /api/user/installed. Use InstalledExtension.key such as plugin:github-jump as the stable cache key.

Manifest

yap.plugin.toml is the canonical plugin manifest. This example includes all required identity fields, hosted artifact URLs, trigger behavior, commands, and capability declarations.

yap.plugin.toml toml
schema_version = "2026-05"

[plugin]
id = "dev.example.github-jump"
slug = "github-jump"
name = "GitHub Jump"
version = "0.3.3"
author = "Dev Tools Co"
description = "Search repositories, pull requests, and issues from Launcher."
homepage = "https://example.com/plugins/github-jump"

[runtime]
module = "./dist/github_jump.wasm"
abi = "yapture-plugin-v1"
targets = ["launcher", "desktop", "app_v2"]
manifest_url = "https://cdn.example.dev/github-jump/yap.plugin.toml"
signature_url = "https://cdn.example.dev/github-jump/yap.plugin.toml.sig"

[[triggers]]
kind = "prefix"
value = "gh"
keywords = ["github", "repo", "pull request", "issue"]
partial_match = true
accept = ["enter", "tab"]
placeholder = "Search GitHub..."

[[commands]]
name = "query"
input = "text"
output = "results"

[[commands]]
name = "execute"
input = "result"
output = "action"

[capabilities]
network.fetch = ["https://api.github.com"]
secrets.read.github = true
clipboard.write = true
yaps.read = false
yaps.write = false
filesystem.read = []
filesystem.write = []
Field Requirement
plugin.id Globally unique reverse-DNS or registry identifier.
plugin.slug Stable public slug used in market URLs and installed keys.
plugin.name Human display name.
plugin.version Semantic version for installs, updates, and rollback.
plugin.author Publisher or developer shown to users.
runtime.module Relative path to the signed WebAssembly module.
runtime.manifest_url Canonical hosted manifest URL used for updates.
runtime.signature_url Detached signature for the manifest and artifact bundle.
capabilities Deny-by-default permissions requested before install.

Trigger model

Prefixes are the fast path. Keywords and partial matches make a plugin discoverable, but they do not take over input by themselves. Launcher accepts a plugin hint only when the user presses Enter or Tab.

Concept Example Behavior
prefix gh pr 123 Typing the prefix shows a plugin hint. Enter or Tab accepts the hint and starts plugin mode.
keywords github, repo Keywords make the plugin discoverable without claiming every typed prefix.
partial_match git -> github-jump Hosts may show fuzzy or partial suggestions, but only explicit Enter/Tab acceptance routes input to the plugin.

Runtime

The runtime module is a WebAssembly artifact loaded by the host. The manifest URL tells clients where to check for updates, and the signature URL lets clients verify both the manifest and the downloaded WASM before execution.

  • The WASM module exports the declared command functions.
  • Inputs and outputs are JSON-serializable values defined by the host ABI.
  • Hosts may cache the module after signature verification.
  • Network, filesystem, clipboard, secrets, and Yapture data are unavailable unless granted by capability.

Result item schema

Query commands return result items. Hosts own ranking, keyboard navigation, and rendering details; plugins provide compact structured data and an action to run after user confirmation.

PluginResult json
{
  "id": "repo:yapture/desktop",
  "title": "yapture/desktop",
  "subtitle": "Open pull requests, issues, and releases",
  "icon": {
    "type": "url",
    "value": "https://github.com/yapture.png"
  },
  "badge": {
    "label": "repo",
    "tone": "blue"
  },
  "action": {
    "type": "open_url",
    "url": "https://github.com/yapture/desktop"
  }
}
title Primary line shown in Launcher or the command palette.
subtitle Secondary context; keep it short enough for narrow clients.
icon URL, bundled asset, emoji, or host-provided symbolic icon.
badge Optional label such as repo, issue, task, or beta.
action The user-confirmed operation: open_url, copy_text, create_yap, run_command, or show_detail.

Lifecycle

Install

Validate manifest, verify signatures, check trigger conflicts, request capability consent, then create an installed plugin record.

Enable / disable

Keep the install record and settings, but hide disabled plugins from Launcher matching and command palette execution.

Update

Fetch the manifest URL, verify the new signature, compare capability changes, and pause automatic update if new permissions are requested.

Uninstall

Remove the install record, runtime cache, trigger registration, and plugin settings. User data created by explicit plugin actions remains in Yapture.

GET /api/user/installed item json
{
  "id": "lpi_01HV7QK3KX7Z9Q9Y6RZ2Z9W3R5",
  "type": "plugin",
  "key": "plugin:github-jump",
  "slug": "github-jump",
  "name": "GitHub Jump",
  "version": "0.3.3",
  "author": "Dev Tools Co",
  "enabled": true,
  "installedAt": "2026-05-24T18:05:00.000Z",
  "clients": ["app_v2", "desktop", "launcher"],
  "source": "launcher_plugin_install"
}

Security and capabilities

Plugins run with a capability allowlist. The default grant set is empty: no ambient filesystem access, no ambient network access, no clipboard writes, no secrets, and no Yapture data access unless the manifest requests the capability and the user approves it.

Capability Grant
network.fetch HTTPS origins the plugin may call. Public submissions should list origins instead of requesting a wildcard.
clipboard.write Write clipboard contents only after a user-confirmed action.
secrets.read.<name> Read a named account secret such as secrets.read.github.
yaps.read / yaps.write Read or create Yapture records in the installed user scope.
filesystem.read / filesystem.write Empty by default. Desktop hosts may grant scoped directories only after explicit approval.

Public market submissions are expected to provide signed artifacts. Capability additions in an update require renewed user consent before the update can run.

Cross-client availability

Installed state is shared, but each client decides which runtime surfaces it can support. The canonical inventory endpoint exposes the clients array so app_v2, desktop, Launcher, browser_v2, and cli_v2 can present consistent availability.

Client Role
app_v2 Market listing, install state, and web command palette.
site_v2 Public listing and documentation only; no per-user install state.
desktop Local runtime cache, settings, and bridge to Launcher.
launcher Prefix hints, Enter/Tab acceptance, result rendering, and execution.
browser_v2 Future command-palette entries; no ambient page access without a host grant.
cli_v2 Inventory and management commands; interactive runtime support is host-dependent.