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-harness-model-proposer

v0.1.0

Published

Dedicated-model proposer for pi-continual-harness. Registers a /refine proposer ('model') that makes its own one-shot LLM call (via the harness's injected complete closure) to produce evidence-backed CRUD deltas directly — hidden from the transcript but a

Readme

pi-harness-model-proposer

A dedicated-model proposer companion for pi-continual-harness (repo) — the online self-improvement layer for the pi coding agent.

pi-continual-harness's /refine splits into propose then apply, with the propose stage pluggable via a registry. The built-in proposers are steering (delegates reasoning to the agent loop — visible) and dedupe (rule-based, no model). This package adds a third:

| Name | What it does | |---|---| | model | Makes its own one-shot LLM call (via the harness's injected complete closure) to propose evidence-backed CRUD deltas directly. The call is hidden from the transcript but audited — model, tokens, and latency are recorded in the harness-refinement entry (branchable via /tree). |

This is the alternate pi-continual-harness flags in its roadmap as "interface-ready, intentionally not shipped": the hidden-model-spend tradeoff is kept out of the core and resolved here by making the spend audited rather than shipping it invisible.

Install

pi install npm:pi-harness-model-proposer

Requires pi-continual-harness >= 0.6.2 (which injects the complete closure and records modelCall telemetry). Both install together.

Usage

Select the proposer per run or as the default:

/refine --proposer model          # one run
/refine 50 --proposer model       # with a lookback window

Or set it as the default in the harness config (~/.pi/agent/harness.json):

{ "proposer": "model" }

It then also drives opt-in auto-refine (autoRefine) when that is enabled.

How it works

  1. /refine (in pi-continual-harness) gathers trajectory evidence and hands it — plus the current state and a one-shot complete(prompt, opts?) closure — to this proposer.
  2. This proposer builds a strict prompt: a digest of the current state (so the model can update/delete by real id), the schema for the CRUD delta union, and the trajectory evidence. It asks for a JSON array of deltas only.
  3. It calls complete (a hidden completion built by the harness from ctx.modelRegistry), honoring the agent abort signal and a token budget.
  4. It parses, then validates + sanitizes each delta against the current state before returning it. This is the safety-critical step: the harness's applyDeltas is all-or-nothing and re-throws on an unknown id, so a single hallucinated id would otherwise abort the whole batch. Unknown-id updates/deletes, evidence-less creates, and malformed entries are dropped, never applied.
  5. It returns ProposedDelta[] + ModelCallTelemetry. The harness applies the deltas through its normal audited, branchable path and records the telemetry (model, input/output tokens, latency, ok/error) in the harness-refinement entry.

So the model call never appears in the agent transcript, but what it cost and what it proposed are visible and reviewable, and every mutation still flows through the same audited applyDeltas with /tree rollback.

Configuration

Optional config at ~/.pi/agent/harness-model.json (missing/malformed → defaults):

{
  "model": "anthropic/claude-3-5-haiku",
  "maxOutputTokens": 4096,
  "maxDeltas": 20
}
  • model — model id ("provider/id" or bare) for the proposal completion. When unset, the proposer uses the active session model.
  • maxOutputTokens — token budget for the completion (default 4096).
  • maxDeltas — cap on deltas applied per run; excess is dropped to bound spend (default 20).

Behavior on failure

This proposer has no access to ctx, so it cannot fall back to the steering proposer. Instead it degrades to an audited no-op: when there is no model, the call fails, or the output is unparseable, it returns no deltas and records a modelCall with ok: false + an error in the audit entry. Nothing throws; the harness shows "applied 0".

Scope and non-goals

  • In scope: the dedicated-model propose strategy, registered as "model".
  • Out of scope: the state store, /refine, the apply path, durable I/O, auto-refine cadence, outcome loop — all owned by pi-continual-harness. This package owns no state and makes no model calls of its own; it calls the complete closure the harness injects.

License

MIT