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

@blackbelt-technology/pi-dashboard-flows-anthropic-bridge-plugin

v0.4.6

Published

pi-flows-aware bridge: forwards @pi/anthropic-messages into every spawned flow agent. Defers activation until both peers are present; status surfaced to dashboard UI.

Readme

@blackbelt-technology/pi-dashboard-flows-anthropic-bridge-plugin

pi-flows-aware bridge plugin for pi-dashboard. Forwards @pi/anthropic-messages hooks into every spawned pi-flows agent subprocess, and exposes per-session peer-probe state in the dashboard's Settings panel.

What it does

@pi/anthropic-messages solves a real problem for sessions targeting Claude-model anthropic-messages endpoints: it canonicalizes pi tool names to the Claude Code shape (readRead, ask_usermcp__pi__ask_user, …), translates inbound responses back, and rewrites the system prompt for identity-fingerprint compatibility.

When pi-flows spawns an isolated agent session, that agent does not inherit the parent's pi extensions. Without the bridge, agent tool calls hit Claude Code's strict canonical allowlist with un-prefixed pi names, get mangled to bash_ide / read_ide, and fail.

This plugin closes that gap by:

  1. Probing for both peers (@pi/anthropic-messages and pi-flows) in the pi process.
  2. When both are present, running @pi/anthropic-messages's default export against the main session AND emitting flow:register-agent-extension so every spawned agent gets the same hooks scoped to its own pi instance.
  3. Re-probing on every session_start so late-installed peers (after npm install … && /reload) are picked up automatically.
  4. Broadcasting per-PID peer status to the dashboard so the Settings UI shows live activation state.

The plugin does not reimplement any transforms — it is pure plumbing over @pi/anthropic-messages. Upstream fixes flow through npm update.

Activation gates (inherited from @pi/anthropic-messages)

| Condition | Behaviour | |---|---| | Either peer missing | Plugin idle. Settings panel shows ✗ for the missing peer. | | Both peers present, model api === "anthropic-messages" AND id matches /claude/i | Bridge active. | | forceCanonical = true (Settings) | Bridge active for any anthropic-messages session regardless of model id. | | disableCanonical = true (Settings) | Bridge inactive even for Claude sessions. | | Any non-anthropic-messages API | Bridge is a true no-op. |

Slot contributions

| Slot | Component | Purpose | |---|---|---| | settings-section (general tab) | FlowsAnthropicBridgeSettings | Per-PID peer status table + gate-override toggles |

Manifest

"pi-dashboard-plugin": {
  "id": "flows-anthropic-bridge",
  "displayName": "pi-flows · Anthropic Messages Bridge",
  "priority": 500,
  "client":  "./src/client.tsx",
  "server":  "./src/server/index.ts",
  "bridge":  "./src/bridge/index.ts",
  "configSchema": "./configSchema.json",
  "claims": [
    { "slot": "settings-section", "component": "FlowsAnthropicBridgeSettings", "tab": "general" }
  ]
}

State machine

stateDiagram-v2
  [*] --> probing : activate()
  probing --> waiting_peers : missing one or both peers
  probing --> active : both peers present
  waiting_peers --> waiting_peers : session_start, still missing
  waiting_peers --> active : both peers detected
  active --> degraded : peer removed (rare; defensive)

Once wired = true, hooks remain registered on the pi instance for the process lifetime. A degraded status on a subsequent probe surfaces in the UI and instructs the user to /reload.

Diagnostic log

@pi/anthropic-messages writes activation + transform events to /tmp/pi-am.log (or PI_ANTHROPIC_MESSAGES_DEBUG_LOG if set). To verify the bridge reached a flow agent:

rm -f /tmp/pi-am.log
# … trigger a flow with at least one agent step …
grep -E '"stage": "(load|activate)"' /tmp/pi-am.log | sort -u
# Expect TWO different PIDs: parent pi + spawned agent pi.

Dependencies

  • @pi/anthropic-messages — peer (must be installed in the same scope as pi)
  • pi-flows — peer (must be installed in the same scope as pi)
  • @blackbelt-technology/pi-dashboard-shared — runtime types
  • @blackbelt-technology/dashboard-plugin-runtime — provided by host

Testing

npm --workspace @blackbelt-technology/pi-dashboard-flows-anthropic-bridge-plugin test