
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
Pi-native workflow baton runner with per-step model switching and isolated step context.
Run YAML-defined review loops in Pi with per-step model switching and isolated step context.
Pi Baton is a Pi-native workflow baton runner. Define implement → review → fix loops in YAML, and let Pi Baton execute them with automatic baton handoff between isolated subagent steps.
accept/reject with mandatory findings or acceptance notesInstall the published npm package with Pi:
pi install npm:pi-baton
Pin a specific version when you want reproducible installs:
pi install npm:pi-baton@0.7.1
Install into the current project instead of your user Pi settings:
pi install npm:pi-baton -l
Or install from GitHub:
pi install git:github.com/eiei114/pi-baton
Try it without permanently installing:
pi -e npm:pi-baton
Try this package locally from a clone of this repository:
pi -e .
Then run:
/baton:new create a workflow scaffold
/baton:start choose workflow + task brief → idle run
/baton:run execute run to terminal state (with live widget)
/baton:status show the active run summary
The builtin Default Review Loop workflow (implement → review → fix) works out of the box — no agent setup required.
Pi Baton ships builtin worker and reviewer subagents under agents/. They work with your current Pi model.
To override with custom agents, place .md files under:
.pi/agents/worker.md
.pi/agents/reviewer.md
Discovery order: project .pi/agents/ → user ~/.pi/agent/agents/ → pi-baton builtin.
/baton:new
Pick a name and a scaffold from default-review-loop is written to .pi/baton/workflows/ and opened in editor. The scaffold includes <your-fast-model> / <your-strong-model> placeholders for step-level model overrides.
name: My Review Loop
iteration_cap: 5
steps:
implement:
agent: worker
model: openai/gpt-5.4 # optional: fast model
prompt: work prompt
next: review
review:
agent: reviewer
model: anthropic/claude-opus-4-5 # optional: strong model
prompt: review prompt
on_accept: _complete # or a step name
on_reject: fix
fix:
agent: worker
model: openai/gpt-5.4
prompt: fix prompt
next: review
on_accept: _complete ends the run.iteration_cap prevents infinite review loops — the run fails at the cap.accept/reject with findings or acceptance notes.| Path | Purpose |
|---|---|
extensions/ | Slash-command entrypoints (/baton:new, /baton:start, /baton:run, /baton:status) |
lib/ | Workflow parser, run engine, subagent runner, review contract, UI widget |
agents/ | Builtin worker and reviewer subagent definitions |
workflows/ | Builtin default-review-loop.yaml |
assets/ | README / package branding assets |
docs/ | Release and maintainer documentation |
npm install
npm run ci
This package uses npm Trusted Publishing with GitHub Actions OIDC — no NPM_TOKEN is required.
npm version patch
git push
On main, version bumps trigger auto-release and publish workflows. See docs/release.md for setup details.
Pi packages can execute code with your local permissions. Review extensions before installing third-party packages.
For vulnerability reporting, see SECURITY.md.
MIT
FAQs
Pi-native workflow baton runner with per-step model switching and isolated step context.
We found that pi-baton demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.