repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

pi/AGENTS.md

Raw

Pi Extensions Workspace

New extension

  1. extensions/{name}/package.json — template below
  2. extensions/{name}/index.ts
  3. bun install

package.json

{
  "name": "@bugabinga/pi-ext-{name}",
  "version": "0.0.0",
  "private": true,
  "type": "module",
  "main": "index.ts",
  "peerDependencies": {
    "@earendil-works/pi-coding-agent": "*"
  }
}

Add only deps actually imported by the extension. Prefer peerDependencies for Pi packages (@earendil-works/*). Run bun install after any structural change.

Imports

Package Provides Use
@earendil-works/pi-coding-agent SDK — ExtensionAPI, types, ctx Always (peer dep)
@earendil-works/pi-tui TUI components, truncateToWidth, Key Rendering
@bugabinga/pi-ext-* — **Never
                                                                         import
                                                                         from
                                                                         other
                                                                         extensions** |
Markdown source
File outline
# Pi Extensions Workspace

## New extension

1. `extensions/{name}/package.json` — template below
2. `extensions/{name}/index.ts`
3. `bun install`

## package.json

```json
{
  "name": "@bugabinga/pi-ext-{name}",
  "version": "0.0.0",
  "private": true,
  "type": "module",
  "main": "index.ts",
  "peerDependencies": {
    "@earendil-works/pi-coding-agent": "*"
  }
}
```

Add only deps actually imported by the extension.
Prefer `peerDependencies` for Pi packages (`@earendil-works/*`).
Run `bun install` after any structural change.

## Imports

| Package                         | Provides                             | Use                                    |
| ------------------------------- | ------------------------------------ | -------------------------------------- |
| `@earendil-works/pi-coding-agent` | SDK — ExtensionAPI, types, ctx       | Always (peer dep)                      |
| `@earendil-works/pi-tui`          | TUI components, truncateToWidth, Key | Rendering                              |
| `@bugabinga/pi-ext-*`           | —                                    | **Never
                                                                             import
                                                                             from
                                                                             other
                                                                             extensions** |