Expand description
Every resource that settings, packages and the agent and project directories provide, each enabled or not, in load precedence order.
Port of DefaultPackageManager.resolve and its pattern rules in
core/package-manager.ts in pi v1.0.0. yapi also loads .wasm native
extensions wherever pi loads .ts and .js ones.
Structs§
- Package
Input - A package to collect from, after pi’s deduplication.
- Resolve
Input - What
resolvereads. - Resolved
- A resource and whether it loads.
- Resolved
Paths - pi’s
ResolvedPaths: resolved resources by kind.
Enums§
- Resource
Type - A kind of resource.
Constants§
- BUILTIN_
PREFIX - The path prefix naming a built-in extension.
Functions§
- apply_
patterns - pi’s
applyPatterns: plain globs select (all when there are none),!globs remove,+paths add back and-paths remove. - dedupe_
packages - pi’s
dedupePackages: thepackagesentries of the project, then the user, with their scopes,projectoruser. A project entry wins over the user’s for the same package, asidentitynames it for a source and scope, unless it setsautoload: false: then both stay. - is_
enabled_ by_ overrides - pi’s
isEnabledByOverrides:!globs disable, then+paths enable, then-paths disable. - locate_
packages - pi’s
dedupePackageswithfindAutoloadDeltaBase: each entry thatdedupe_packageskeeps, with its scope, then the source and scope its package is installed under, pi’sresolvedSourceandresolvedScope. A project entry withautoload: falsetakes the user’s entry for the same package, when there is one. - package_
inputs - The packages of
locate_packagesthat are installed, asinstall_pathplaces a source written in a scope’s settings. A project entry withautoload: falseonly overrides the resources it names, on top of the user’s entry. - package_
resources - The resources of the package installed at
root, asresolvefinds them for a settings entry withfilter, each enabled or not.localsays whether its source is a local path. - resolve
- pi’s
resolve: packages, then settings entries, then discovered files, then built-in extensions, ordered by precedence without repeats. - settings_
lists - The
extensions,skills,promptsandthemeslists of a settings document. - string_
list - The strings in list
keyof a settings document or package entry, skipping entries of other types.