Skip to content

v0.1.2 — fix: /9router command not registered

Latest

Choose a tag to compare

@ricatix ricatix released this 18 Jun 06:15

Fix

  • Slash command /9router not registered after pi install npm:pi-9router

Root cause: package lacked the pi.extensions manifest in package.json, so Pi's
package loader only loaded dist/index.js for local:-prefixed installs via a
fallback path. npm: and git: installs resolved the package but never invoked
the factory in src/index.ts, so commands/tools/providers stayed unregistered —
even though pi list showed the package and defaultProvider/defaultModel got
written to settings.json from a side effect.

This release adds:

"pi": { "extensions": ["./dist/index.js"] }

to package.json so npm and git sources resolve dist/index.js the same way
local sources do.

Repro (before fix)

  1. pi install npm:pi-9router
  2. Start Pi, run pi listpi-9router is listed
  3. settings.json shows defaultProvider: 9router and defaultModel: ...
  4. Press / in the TUI → /9router is missing from the picker

Verification (after fix)

  1. pi install npm:pi-9router@0.1.2 (or just /reload if already installed)
  2. Press //9router appears
  3. cat ~/.pi/agent/npm/node_modules/pi-9router/package.json | grep -A2 '"pi"'
    should show the extensions array

Docs

  • README: noted the pi.extensions manifest under Installation
  • README: new Troubleshooting entry "Slash command /9router is not registered"
    with verification steps

Verification log

  • bun install --frozen-lockfile — no changes
  • bun run typecheck — clean
  • bun test — 7/7 pass
  • bun run builddist/ regenerated, dist/index.js still contains
    registerCommand("9router", ...)
  • npm OIDC trusted publish via v0.1.2 tag (Node 24, npm 11.5.1+) — success in 21s