Skip to main content

Module plugins

Module plugins 

Source
Expand description

Signed session plugins (node-owned session environment).

A plugin is a directory with a manifest plugin.json and a detached signature plugin.sig. The manifest names the plugin, its version, the providers it applies to and every file with its SHA-256. The signature is Ed25519 over the exact manifest bytes, by a publisher key the node trusts (trusted-keys file: one hex public key per line, # comments allowed). The node verifies the signature, every file hash, and that the package holds no extra files, links or path escapes before it copies the plugin into its plugin root. Core never sees plugin contents.

Structs§

Installed
PluginManifest

Constants§

MANIFEST
SIGNATURE

Functions§

install
Verify, then copy into <root>/<name>/<version> (atomic rename). An existing identical version is replaced only after the new copy verified.
keygen
New publisher key: returns (secret seed hex, public key hex).
list
List installed plugins that still verify (tampered ones are skipped).
load_trusted_keys
provider_dir
Provider config directory (relative to the provider HOME) a plugin’s files land in.
sign
Publisher side: write plugin.json for the files in pkg and sign it. secret_hex is the 32-byte Ed25519 seed (hex); it is never printed.
sync_into_home
Load verified plugins into provider homes so new sessions see them: each file goes to <home>/<provider dir>/<path> for every provider the plugin names (all known ones when it names none). Only files this sync placed are ever replaced or removed (tracked in <home>/.hatchery-plugins.json); an existing foreign file is left alone and reported. Tampered plugins are skipped. Returns (placed, skipped-with-reason).
verify
Verify a plugin package. Returns the manifest and the hex key that signed it.