Skip to main content

Module install

Module install 

Source
Expand description

Plugin install lifecycle: plugin add / plugin remove (human review before install → write to disk → pin → uninstall).

The channels are capped at path + git + archive; this does not grow into a package manager (marketplace / central catalog deferred).

  • Human review before install: plan_install only stages + produces a ReviewDigest (full manifest + capability breakdown); only after human confirmation does commit_install write to disk (product-level gate; plugins requested by an agent are never allowed through by default);
  • Pinned values: manifest hash, each .wasm hash, run/module/server paths absolutized, resolved values for capabilities’ paths/hosts — all pinned into PluginRegistry (the authority outside the plugin directory);
  • zip-slip: reject if an archive member path escapes the extraction directory;
  • git dependency made explicit (Windows): the git URL channel depends on a git executable on PATH (may embed gix later);
  • Uninstall cleans all three places: tool table (identity_keys returned to the caller for deregistration) / ledger (RemovalReport::sweep_ledger) / registry entries.

secret rule: env/headers only flow as ${ENV:VAR} references; this module never resolves them and never writes literals.

Structs§

InstallPlan
An install plan awaiting human review: staged content + review digest + pinned values.
InstalledPlugin
Install result.
RemovalReport
Uninstall report: receipts for the three-place cleanup (tool table / ledger / registry).
StagingLayout
Staging layout (the output of plan_install, the input of commit_install).

Enums§

ArchiveFormat
Archive format (archive channel).
InstallError
Install errors. fail-closed: nothing is written to disk if any step is invalid.
PluginSource
Install source (channels capped at path + git + archive).

Functions§

commit_install
plugin add step two (after human confirmation): staging → final directory, pinned into the registry.
plan_install
plugin add step one: materialize the source into staging, validate the manifest, compute pinned values, produce the review digest.
remove_plugin
plugin remove: clean all three places (tool-table keys returned, ledger prefix sweepable, registry pins pulled), delete the install directory.