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

@mporenta/pi-trading-quant-chain

v0.1.7

Published

Pi extension package for a sequential ML/algo-trading quant agent chain.

Readme

@mporenta/pi-trading-quant-chain

Pi package for a sequential machine-learning / algo-trading agent pipeline:

trading-quant-researcher ──▶ trading-quant-architect ──▶ trading-quant-planner ──▶ trading-quant-developer ──▶ trading-quant-reviewer

The extension registers the --trading-quant-chain flag, /trading-quant-chain commands, a status widget, and the run_trading_quant_chain tool.

Install

pi install npm:@mporenta/pi-trading-quant-chain

Or run for one session without installing:

pi -e npm:@mporenta/pi-trading-quant-chain --trading-quant-chain

After installing, launch Pi with:

pi --trading-quant-chain

What's included

  • trading-quant-chain.ts — extension entrypoint and chain runner.
  • themeMap.ts — optional theme compatibility helper.
  • agents/agent-chain.yaml — bundled trading-quant chain definition.
  • agents/trading-quant-*.md — bundled researcher, architect, planner, developer, and reviewer definitions.
  • fixtures/fake-pi-child.mjs — deterministic fake child Pi for local no-provider smoke tests.

Project-local .pi/agents definitions take precedence when present; the bundled definitions are the fallback that makes the npm package self-contained.

Current behavior

  • The researcher runs before the architect so architecture follows concrete repo evidence.
  • The widget shows a full-width Current Agent activity panel above the chain cards.
  • Chain cards use distinct pending, running, complete, and error status colors.
  • Debug logging can capture step prompts, handoffs, child events, tool calls, token counts, lags, and developer delta metadata.
  • The reviewer receives a programmatic developer delta and should not fail solely on unrelated pre-existing dirty files.
  • If the reviewer returns CHAIN_RETRY_REQUIRED, the orchestrator automatically reruns the developer once, then reruns the reviewer. The retry limit is hard-coded to 1.

See trading-quant-chain.README.md for local development and debugging details.

Safety defaults

The chain defaults to research, simulation, dry-run, and paper-trading behavior. It reviews for leakage, look-ahead bias, backtest realism, transaction costs, slippage, timezones, calendars, broker/live-order safety, secrets, and operational risk.

Environment variables

| Variable | Default | Purpose | | ------------------------------------------------- | ----------------- | --------------------------------------------------- | | TRADING_QUANT_CHAIN_PROGRESS_INTERVAL_MS | 15000 | User-visible progress throttle. | | TRADING_QUANT_CHAIN_IDLE_TIMEOUT_MS | 900000 | Child idle timeout. | | TRADING_QUANT_CHAIN_STEP_TIMEOUT_MS | 2700000 | Per-step max runtime. | | TRADING_QUANT_CHAIN_DEBUG / ..._VERBOSE | off | Enable JSONL debug logs. | | TRADING_QUANT_CHAIN_DEBUG_MAX_CHARS | 20000 | Max characters stored for any single logged string. | | TRADING_QUANT_CHAIN_DEBUG_HEARTBEAT_INTERVAL_MS | progress interval | Frequency for idle/lag heartbeat records. | | TRADING_QUANT_CHAIN_DEBUG_RAW_CHILD_EVENTS | off | Log raw child event type records. | | TRADING_QUANT_CHAIN_DEBUG_STREAM_DELTAS | off | Log every streamed assistant text delta. |