Skip to main content

Module packages

Module packages 

Source
Expand description

Discovery of Pi-compatible package resources.

This module resolves package manifests and static resource paths. Extension paths are handed to the Node bridge by js_extensions; the Rust cdylib loader remains a separate extension mechanism. A package is a directory containing a package.json (or a conventional skills/, prompts/, themes/ tree). The optional pi/rpi manifest object may override those resource paths.

Structs§

PackageDiagnostic
PackageResources
PackageRoot

Functions§

discover
Discover packages in settings order. Package resources are intentionally returned after project and global resources; callers append these paths last so a package cannot shadow a project-local or user-local resource.
discover_from_global_settings
Resolve only packages declared in the global settings file. Project-local package declarations are intentionally excluded when the current project has not been trusted.
discover_from_settings
Resolve package specs from the settings file and conventional local roots. Empty or missing packages means no packages are enabled, matching Pi’s explicit package list instead of silently executing every directory found under the user’s home directory.
load_theme
Load a theme from an explicit JSON path without discovering configured Pi packages. Startup code that has passed the package gate uses load_theme_with_resources to resolve package theme names.
load_theme_with_resources
Load a package theme from an already-resolved resource set. Startup callers use this variant so a disabled package configuration cannot be re-discovered indirectly from a TUI theme selector.
resolve_package
Validate and load one package spec. Used by rpi package add before the spec is persisted to settings.
run_cli
rpi package ... command for managing the enabled Pi package list. This is a local package manager; use install-pi when the package must be fetched.