docs(coding-agent): document pi-package keyword for npm discoverability
This commit is contained in:
@@ -1010,6 +1010,12 @@ pi update # update all non-pinned packages
|
|||||||
|
|
||||||
Use `-l` to install into project settings (`.pi/settings.json`).
|
Use `-l` to install into project settings (`.pi/settings.json`).
|
||||||
|
|
||||||
|
**Discoverability:** Published pi packages should include the `pi-package` keyword in their `package.json` for npm search:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -s "https://registry.npmjs.org/-/v1/search?text=keywords:pi-package" | jq '.objects[].package.name'
|
||||||
|
```
|
||||||
|
|
||||||
**Package filtering:** By default, packages load all resources (extensions, skills, prompts, themes). To selectively load only certain resources, use the object form in settings.json:
|
**Package filtering:** By default, packages load all resources (extensions, skills, prompts, themes). To selectively load only certain resources, use the object form in settings.json:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
@@ -242,6 +242,18 @@ To include resources from another pi package, add it as a dependency with `bundl
|
|||||||
|
|
||||||
`bundledDependencies` embeds the package inside your tarball, preserving the `node_modules/` structure. Without it, npm's hoisting could move the dependency elsewhere, breaking the paths.
|
`bundledDependencies` embeds the package inside your tarball, preserving the `node_modules/` structure. Without it, npm's hoisting could move the dependency elsewhere, breaking the paths.
|
||||||
|
|
||||||
|
**Discoverability:** Add the `pi-package` keyword to your `package.json` so users can find your package on npm:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "my-extension-pack",
|
||||||
|
"keywords": ["pi-package", "pi-extension", "..."],
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Search for pi packages: `curl -s "https://registry.npmjs.org/-/v1/search?text=keywords:pi-package"`
|
||||||
|
|
||||||
The `package.json` approach enables:
|
The `package.json` approach enables:
|
||||||
- Multiple extensions from one package
|
- Multiple extensions from one package
|
||||||
- Skills, prompts, and themes declared alongside extensions
|
- Skills, prompts, and themes declared alongside extensions
|
||||||
|
|||||||
Reference in New Issue
Block a user