Expand description
Packages: npm, git and local sources that bring extensions, skills,
prompt templates and themes. Port of pi’s package manager
(core/package-manager.ts in pi v1.0.0), with a built-in npm client.
Packages live under the scope’s directory: <agent>/npm and
<agent>/git/<host>/<path> for the user, <cwd>/.yapi/... for a project.
Settings list them in packages.
Re-exports§
Modules§
- npm
- A built-in npm client, so packages install without Node: it resolves
versions from the registry, verifies and unpacks tarballs into
node_modulesand installs dependencies, hoisting them where Node’s resolution allows. It runs no lifecycle scripts, so native addons stay unbuilt, and an extension that loads one fails then. Installs return the tree they unpacked as pins, whichreplayreproduces without the registry. - resolve
- Every resource that settings, packages and the agent and project directories provide, each enabled or not, in load precedence order.
- source
- Package sources:
npm:specs, git repositories and local paths, as pi’sparseSourcereads them (core/package-manager.ts,utils/git.ts).
Structs§
- Configured
- A configured package, as
listshows it. - Package
Manager - Installs, removes and resolves packages for a working directory.
Enums§
- Package
Error - Why a package operation failed, with pi’s message where pi has one.
Functions§
- entry_
source - A settings entry: a source string or a filtered package.
- install_
location - Where
source, written in settings whose directory isbase, is or would be installed. - resolve_
resources - pi’s
DefaultPackageManager.resolvefor the settings of the project inproject_rootand ofagent_dir: every resource of installed packages, settings entries and the discovered directories, each enabled or not, withbuiltinsas the built-in extensions. Packages that are not installed are left out.extrapackages, such as chest’s, follow the settings’ packages, andskillsare skill folders placed for them. - scope_
dir - The directory a scope’s packages and relative settings paths use: the agent directory for the user, the project’s config directory otherwise.
- settings_
packages - The
packagesentries ofscope’s settings.