npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-widget-host

v0.3.6

Published

Host package for managing one shared Pi widget slot across multiple providers with preset policies and a built-in demo provider.

Downloads

419

Readme

Pi Widget Host

Join dotfield.xyz on Discord

CI Publish npm version npm downloads License: MIT Pi package Trusted Publishing

Shared-slot host for managing one prompt-top Pi widget across multiple providers.

What this is

pi-widget-host owns one shared widget slot in Pi and picks a single winner from registered providers.

v1 is a Host-only MVP:

  • user-global config under ~/.pi/agent/
  • preset-first time-block policy
  • globalThis registry protocol for future provider packages
  • built-in demo provider for setup and dogfooding
  • silent empty slot when nothing should render

Features

  • /widget-host:setup guided first-run flow
  • /widget-host:status, /widget-host:policy, /widget-host:providers
  • /widget-host:mute and /widget-host:unmute
  • event boost for playing-now and matchday
  • known host tags: music, sports, playing-now, matchday, idle

Install

Install the published npm package with Pi:

pi install npm:pi-widget-host

Install into the current project instead of your user Pi settings:

pi install npm:pi-widget-host -l

Or install from GitHub:

pi install git:github.com/eiei114/pi-widget-host

Try it without permanently installing:

pi -e npm:pi-widget-host

Local development from this repository:

pi -e .

Quick start

Run the host locally, then open these commands:

/widget-host:setup
/widget-host:status
/widget-host:providers

/widget-host:setup asks whether to enable the built-in demo provider and which preset policy to save.

Commands

  • /widget-host:setup — save initial preset and optionally enable the demo provider
  • /widget-host:status — report setup status, preset, and active provider
  • /widget-host:policy — show or change the saved preset
  • /widget-host:providers — inspect known provider entries and effective state
  • /widget-host:mute — mute one provider in host config
  • /widget-host:unmute — unmute one provider in host config

Commands take no inline arguments. Input is collected with Pi UI prompts.

Registry protocol

Future provider packages can publish to the host without importing this package at runtime.

  • backing: globalThis
  • symbol: Symbol.for("pi-widget-host.registry.v1")
  • required fields: providerId, available, lines, updatedAt
  • optional fields: priority, tags, mode, ttlMs

See docs/protocol.md and the copy-paste minimal provider example.

Built-in demo provider

The built-in demo provider exists to prove the host loop first:

  • setup enables it explicitly
  • it publishes through the same registry protocol as future packages
  • it renders provider-owned lines through the shared host slot
  • if muted, disabled, or filtered out by policy, the slot disappears

Package contents

| Path | Purpose | |---|---| | extensions/index.ts | Pi extension entrypoint and /widget-host:* command registration | | lib/ | config store, registry protocol, policy evaluation, and demo provider | | docs/README.md | documentation index for protocol, release, and maintenance docs | | docs/protocol.md | registry protocol reference for future provider packages | | docs/provider-example.md | minimal copy-paste provider publishing through the registry | | docs/release.md | Trusted Publishing release notes |

Development

npm install
npm run ci
npm run pack:check

npm run ci runs typecheck, tests, and pack validation. npm run pack:check runs npm pack --dry-run to confirm the shipped tarball contents.

Release

This package uses npm Trusted Publishing.

npm version patch
git push

See docs/release.md.

Security

Pi packages execute with your local permissions. Review extensions before installing third-party packages.

For vulnerability reporting, see SECURITY.md.

Links

  • npm: https://www.npmjs.com/package/pi-widget-host
  • GitHub: https://github.com/eiei114/pi-widget-host
  • Issues: https://github.com/eiei114/pi-widget-host/issues

License

MIT