Skip to main content

Module installer

Module installer 

Source
Expand description

Install a validated .muragent archive onto the local host.

Single source of truth for the .muragent install flow, shared by every surface (CLI, Hub, Commander). The flow is:

  1. Run the full 11-step validation pipeline (validator::validate).
  2. Validate the agent slug shape — prevents agents/../../etc.
  3. Check the trust store: a key change without a rotation manifest is a hard refuse (§7.1.1).
  4. Detect collision vs update by matching agent.original_uuid against any existing agent at the same slug. Same UUID → update (preserves data/); different UUID → error.
  5. Extract the payload to <mur_home>/agents/<slug>/.
  6. Upsert the trust store entry, marking surface and timestamps.

UI/print decisions belong to the caller; this module returns a structured InstallOutcome describing what happened.

Structs§

InstallOutcome
Result of a successful install or update.

Functions§

install
Install or update a .muragent archive. See module docs for the flow.