Skip to main content
This section provides a high-level overview of the Palyra skill system and the secure WebAssembly (WASM) runtime used to execute them. The system is designed to allow the daemon to extend its capabilities through portable, signed, and sandboxed artifacts. The skill lifecycle transitions from a packaged .palyra-skill ZIP archive to a verified installation, and finally to a constrained execution environment where capabilities (like HTTP egress or secret access) are strictly enforced by the host.

System Architecture Overview

The following diagram illustrates the relationship between the skill management subsystem in the daemon and the plugin runtime. Skill Execution Flow Sources: crates/palyra-daemon/src/transport/http/handlers/console/skills.rs#9-42, crates/palyra-daemon/src/wasm_plugin_runner.rs#124-154, crates/palyra-skills/src/lib.rs#11-25, crates/palyra-daemon/src/plugins.rs#15-52

Skill Packaging and Trust

Skills are packaged as ZIP archives containing a manifest.toml, the WASM modules, and security metadata including an Ed25519 signature crates/palyra-skills/src/lib.rs#13-17. The daemon maintains an index of installed skills and their trust states (e.g., Quarantined, Verified) apps/web/src/console/sections/SkillsSection.tsx#113-117. Key concepts in the packaging system include: For details on artifact formats and signing, see Skill Packaging, Manifests, and Trust. Sources: crates/palyra-skills/src/lib.rs#1-25, crates/palyra-daemon/src/transport/http/handlers/console/skills.rs#166-185, apps/web/src/console/sections/SkillsSection.tsx#73-92

WASM Plugin Runtime

The execution of skill tools is handled by the palyra-plugins-runtime crate, which leverages wasmtime to provide a high-performance, sandboxed environment crates/palyra-daemon/src/wasm_plugin_runner.rs#8-13. The runtime enforces multi-dimensional limits and capability grants: For details on the execution environment and SDK, see WASM Plugin Runtime. Sources: crates/palyra-daemon/src/wasm_plugin_runner.rs#17-30, crates/palyra-daemon/src/wasm_plugin_runner.rs#124-154, crates/palyra-daemon/src/plugins.rs#54-65

Integration and Lifecycle

The daemon bridges the gap between the static skill artifacts and the active runtime. It resolves skill modules from the filesystem, validates them against the WasmPluginRunnerPolicy, and dispatches execution requests crates/palyra-daemon/src/wasm_plugin_runner.rs#113-122. Skill Registry and Execution Map
ComponentCode EntityResponsibility
RegistryPluginBindingsIndexTracks which skills are bound to specific plugin IDs crates/palyra-daemon/src/plugins.rs#15-20
Runnerrun_wasm_pluginEntry point for executing a plugin with a given policy crates/palyra-daemon/src/wasm_plugin_runner.rs#124
PolicyWasmPluginRunnerPolicyDefines global constraints like fuel_budget and max_memory_bytes crates/palyra-daemon/src/wasm_plugin_runner.rs#18-25
StateSkillExecutionStatusTracks if a skill is Quarantined, Enabled, or Disabled crates/palyra-daemon/src/transport/http/handlers/console/skills.rs#169
Sources: crates/palyra-daemon/src/plugins.rs#13-52, crates/palyra-daemon/src/wasm_plugin_runner.rs#17-30, crates/palyra-daemon/src/transport/http/handlers/console/skills.rs#164-179

Child Pages