-
Notifications
You must be signed in to change notification settings - Fork 0
Extending Building Registry Entries
Prev: Testing Lua Plugins | Up: Extending ReqPack | Next: Building rqp Packages and Repositories
The registry tells ReqPack where plugin wrappers come from and what trust metadata they carry. It is distribution and trust layer, not plugin implementation layer.
You can define plugin sources in two ways:
- local Lua source maps such as
registry.luaorconfig.registry.sources, - Git-backed registry JSON files tracked in a registry repository.
Built-in rqp plugin does not come from registry. Registry primarily describes wrapper-style plugins and aliases.
ReqPack merges registry sources in this order:
- downloader plugin sources from
downloader.pluginSources, -
config.registry.sources, -
registry.luaunderregistry.databasePath, -
config.registry.overlayPath.
Later layers win. That makes overlays useful for local overrides during development.
When registry.databasePath points to a directory, ReqPack reads <databasePath>/registry.lua.
Example:
return {
sources = {
dnf = "https://example.test/dnf.lua",
maven = {
source = "central-maven",
alias = true,
},
},
}Each source entry can be a simple string or a table.
- string form means direct source reference for plugin payload
- table form is used when you need aliases or extra trust metadata
- when
alias = true,sourceshould be canonical plugin name, not URL
Useful fields:
sourcealiasdescriptionrolecapabilitiesecosystemScopeswriteScopesnetworkScopesprivilegeLevelscriptSha256bootstrapSha256
When registry.remoteUrl points at a Git repository, ReqPack can sync registry JSON files from the configured registry.remotePluginsPath.
Current default main registry URL in app startup:
https://github.com/Coditary/rqp-registry.git
Each plugin entry is stored in a JSON file whose filename must match the plugin name.
Example: registry/d/dnf.json
{
"schemaVersion": 1,
"name": "dnf",
"source": "git+https://github.com/your-org/reqpack-dnf-plugin.git@v2.0.0",
"description": "Fedora DNF wrapper",
"role": "package-manager",
"capabilities": ["exec", "network"],
"ecosystemScopes": ["rpm", "fedora"],
"writeScopes": [
{ "kind": "temp" },
{ "kind": "user-home-subpath", "value": ".cache/dnf" }
],
"networkScopes": [
{ "host": "api.osv.dev", "scheme": "https", "pathPrefix": "/v1" }
],
"privilegeLevel": "sudo",
"scriptSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"bootstrapSha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"aliases": [
{ "name": "yum", "description": "Alias for dnf" },
"fedora-dnf"
]
}Rules enforced by parser and runtime:
-
schemaVersionmust be1 -
namemust match the JSON filename stem -
sourceis required for main records - hashes are strongly recommended and validated when present
- alias records point to the canonical plugin name
rqp update <system> and rqp update --all can refresh plugin wrappers.
Flow:
- registry DB resolves the record,
- if alias, it resolves the target record,
- refreshed payload is fetched from source,
- hashes are validated,
- script or bundle is materialized under
registry.pluginDirectory/<plugin>/, - plugin is reloaded.
For Git-backed registries, ReqPack also tracks the last synced commit and can update incrementally by diffing changed JSON files.
Registry records can reference:
- a plain script source,
- a bundle source that materializes a directory,
- an alias to another plugin.
Bundle source means ReqPack copies whole plugin directory, not only single .lua file. This is how metadata.json, reqpack.lua, run.lua, helper files, and scripts/ travel with plugin.
Thin wrapper trust matters when security.requireThinLayer = true.
In that mode, ReqPack compares runtime plugin metadata against the registry trust record.
- Always ship
scriptSha256andbootstrapSha256when possible. - Keep names lowercase and stable.
- Use aliases only for naming compatibility, not as a substitute for proxy logic.
- Fill
role,capabilities, scopes, and privilege metadata honestly. - Prefer Git tags for versioned plugin refresh behavior.
- Keep
descriptionhuman-readable because it can surface in list/info outputs.
Prev: Testing Lua Plugins | Up: Extending ReqPack | Next: Building rqp Packages and Repositories
- User Guide
- Getting Started
- Command Reference
- Configuration
- Configuration Reference
- Security, Audit, and SBOM
- Output and Report Formats
- Remote Mode
- Remote Protocol Reference
- Using Native
rqpPackages - Troubleshooting