Skip to content

Plugin manifest

The slopvac-plugin.toml file at the root of a plugin. A data plugin holds rules, styles, genres, terms, taggers and prime snippets, and no code. A code plugin adds one [plugin] table with the command to run and the embedded plugin declaration. The manifest of a code plugin is part of the content hash that slopvac plugins trust records. Semantics are specified in docs/contract/plugins.md.

Field Type Required Constraints Description
description string no minimum length 1 One-line description.
homepage string no format uri Home page URI.
id string (PluginId) yes pattern ^(?!core(?![\s\S]))[a-z][a-z0-9-]*(?![\s\S]) Plugin id. It prefixes every rule id the plugin provides. core is reserved for the built-in plugin.
kind one of "data", "code" yes data: a data plugin, which holds declarative files only and forbids a plugin table. code: a code plugin, which requires the plugin table and runs as a subprocess. Either kind may provide data files.
license string no minimum length 1 SPDX license expression.
plugin object (Plugin) no The plugin table; present exactly when kind is [PackKind::Code].
provides object (Provides) no Files the pack contributes.
requires array of object (Requirement) no Plugins this plugin needs. The host resolves them before it loads this one.
schema_version 3 (SchemaVersion) yes Root artifact schema version.
slopvac_api integer (ApiVersion) yes minimum 1 Plugin extension API the plugin was written for. A host that implements a lower version refuses the plugin.
version string (Semver) yes Pack version.
  • When kind is code, the manifest requires plugin.
  • For any other kind, the manifest forbids plugin.

Keys that start with x- are extensions and readers ignore them. Every other undeclared key is an error.

The plugin table; present exactly when kind is [PackKind::Code].

Field Type Required Constraints Description
network boolean yes
hooks array of object (HookDecl) yes
features object yes
features.required array of string (FeatureName) yes unique items
features.optional array of string (FeatureName) yes unique items
args array of string no
command string yes minimum length 1 Executable inside the plugin, or a bare name that the plugin’s own environment provides. With runtime python it is a script inside the plugin (PackPath, no leading dash).
env array of string no unique items Names of environment variables the plugin may receive when the user allows them. Nothing else passes through.
python string (VersionReq) no The Python version request for the managed environment, for example 3.12. Required with runtime python and invalid otherwise. It is a VersionReq without whitespace, so it can never start with a dash that uv would read as an option.
runtime one of "native", "python" no How the host runs the command. native (the default) runs it as a program from the plugin. python runs it as a script of the plugin in a managed Python environment that sync builds from the plugin’s pylock.toml (threat-model.md section 6.6).

Files the pack contributes.

Field Type Required Constraints Description
blocklists array of string (PackPath) no unique items Word blocklist files (blocklist.schema.json).
categories array of string (PackPath) no unique items Category files (category.schema.json).
configs array of string (PackPath) no unique items Config files that a project may extend as <plugin>:<name> (config.schema.json).
genres array of string (PackPath) no unique items Genre files (genre.schema.json).
prime array of string (PackPath) no unique items Markdown snippets that slopvac prime appends to a topic.
styles array of string (PackPath) no unique items Style files (style.schema.json).
taggers array of string (PackPath) no unique items Declarative tagger files (tagger.schema.json).
terms array of string (PackPath) no unique items Terms files (terms.schema.json).

Keys that start with x- are extensions and readers ignore them. Every other undeclared key is an error.

Plugins this plugin needs. The host resolves them before it loads this one.

Field Type Required Constraints Description
id string (PackId) yes pattern ^[a-z][a-z0-9-]*(?![\s\S]) The required pack.
version string (VersionReq) yes The versions that satisfy the requirement.

Keys that start with x- are extensions and readers ignore them. Every other undeclared key is an error.