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

@codewithkenzo/pi-dispatch

v0.1.4

Published

Queue and run Pi tasks with reusable profiles

Readme

Pi Dispatch

npm Bun Effect TypeScript

@codewithkenzo/pi-dispatch — Profile-based execution and queued task dispatch for the Pi coding agent.

Part of the Pi Rig suite.

Pi Dispatch registers execution primitives that let the agent launch tasks with named profiles, manage background jobs, inspect live work through the flow deck, and inject skills into subagent runs — without writing boilerplate for each new task type.

Quick demo

Pi Dispatch demo

Shows the flow deck, profile routing, and a background run in one short capture.

Surfaces

| Type | Name | Purpose | |------|------|---------| | Tool | flow_run | Run a single task with a named profile (foreground or background) | | Tool | flow_batch | Run multiple tasks sequentially or in parallel | | Command | /flow or /flow manage | Open the interactive flow deck | | Command | /flow status | List active and completed jobs | | Command | /flow cancel <id> | Cancel a queued or running job | | Command | /flow profiles | List available profiles and their settings |

Profiles

Built-in profiles control reasoning level, iteration cap, and toolsets:

| Profile | Reasoning | Iterations | Toolsets | |---------|-----------|------------|----------| | explore | low | 11 | terminal, file | | research | medium | 18 | terminal, file, web | | coder | medium | 35 | code_execution | | debug | high | 20 | inherits | | browser | medium | 25 | browser | | ambivalent | medium | 18 | inherits |

Custom profiles are loaded from JSON:

  • ~/.pi/agent/flow-profiles.json — global overrides
  • <cwd>/.pi/flow-profiles.json — project-local (wins ties)

Architecture

index.ts              Extension entry — wires queue, tools, commands, session events
src/
  types.ts            TypeBox schemas + tagged errors
  queue.ts            In-memory job queue (Effect Ref)
  profiles.ts         Built-in profiles + file-based overrides
  executor.ts         Subprocess runner (Effect.callback + acquireUseRelease)
  vfs.ts              Skill file staging with temp file lifecycle
  tool.ts             flow_run tool
  batch-tool.ts       flow_batch tool
  commands.ts         /flow command handler
  deck/
    index.ts          showFlowDeck() — 3-zone TUI overlay factory
    state.ts          DeckState + feed dedup and sanitization
    header.ts         Zone 1 — title, badge, clock
    columns.ts        Zone 2 — profile panel and activity feed
    summary.ts        Zone 3 — scrollable subprocess output
    footer.ts         Zone 4 — keybind pills with key-flash feedback
    layout.ts         ANSI-preserving column fit utilities
    icons.ts          Nerd Font icons with ASCII fallback (PI_ASCII_ICONS=1)

Key patterns

  • Effect at boundaries — async subprocess and tool execution stay in Effect-TS. Conversion to Promise happens only at the pi API surface via Effect.runPromise and Effect.runPromiseExit.
  • Tagged errorsProfileNotFoundError, SkillLoadError, SubprocessError, JobNotFoundError. No trailing () per Bun 1.3+ convention.
  • acquireUseRelease — skill temp files are always cleaned up, even on subprocess failure or interruption.
  • Session persistence — queue state is snapshotted on agent_end and restored on session_start.
  • Deck TUIAnimationTicker drives 4–8 fps render. withMotion() guards every animation primitive. fitAnsiColumn(text, width) handles ANSI-preserving column fit.

Install

pi install npm:@codewithkenzo/pi-dispatch

Or install all Pi Rig extensions at once:

bunx @codewithkenzo/pi-rig@latest
bun run setup
# or individually:
pi install ./extensions/flow-system

Prerequisites

Development

cd extensions/flow-system
bun install
bun run build       # runtime bundle for the Pi coding agent
bun run typecheck   # typecheck
bun test            # tests

Links