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

@volter/twin-merge

v1.0.2

Published

The merge twin (Protocol 3).

Readme

@volter/twin-merge

The Merge Gateway twin (Protocol 3), serving what Open Autonomy's model rail calls (and through it RH2's, Volter Harness's and Substrate's workers) and what Volter Editor's Pi calls in Substrate (journeys/demand.json, journeys/decisions.json) at api-gateway.merge.dev:

  • POST /v1/chat/completions (OpenAI's chat completions, streamed and not) on the kernel's openaiWire, its usage carrying cost and the answer service_tier;
  • POST /v1/responses in Gateway's native Responses shape (an output message with finish_reason, usage with cost; streamed as response.stream snapshots and a response.done, with no [DONE]);
  • POST /v1/messages (Anthropic's Messages, streamed and not) on the kernel's anthropicWire, its usage with no cost;
  • GET /v1/models, the catalogue filtered by provider and vendor, paged by cursor/next_cursor, each model with its access_required.

With include_routing_metadata (or its header), routing names the model and vendor that served and carries cost_usd and Merge's 5% merge_fee_usd. Every call is priced from the twin's catalogue (Open Autonomy's default model at the per-token prices it measured against Gateway, spec/SOURCE.md) and drawn from the organization's credit; a used-up credit is 402 budget_exceeded before any turn. The catalogue also holds Claude Haiku 4.5 at Anthropic's list prices; a gated provider (Anthropic, for an organization made on or after 2026-09-04 21:00 UTC) is refused 403 vendor_access_required until support grants it. Every other operation is unmodeled.

The twin runs no model. A turn is the World's scenario's when it scripts one (handlers/merge.json, one vocabulary for the three surfaces), else the wires' labeled deterministic stub.

The World's doors: POST /_twin/organizations ({ name?, credit_usd?, access? }: a Pro organization and its key, mg_…, made at the World's clock) and POST /_twin/access ({ organization_id, provider }: support's grant of a gated provider). The credential door answers MODEL_GATEWAY_API_KEY and MERGE_GATEWAY_API_KEY.

Gateway's core job is routing API calls, so this pack has no screens. Its dashboard-only organization and access acts are World doors. It serves native Responses without an OpenAI wire-format or Codex originator header; stored Responses, routing policies, Management API resources, media and the other operations in unmodeled answer the gap.

A native Responses request uses an array of input messages:

const response = await fetch("https://api-gateway.merge.dev/v1/responses", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.MERGE_GATEWAY_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ model: "zai/glm-5.3-flash", input: [{ role: "user", content: "hello" }] }),
});
console.log(await response.json());

A World scenario can script a tool call in handlers/merge.json:

{
  "handlers": [{
    "id": "weather-tool",
    "on": { "hasTool": "weather", "lastMessageIsToolResult": false },
    "respond": { "toolCalls": [{ "name": "weather", "arguments": { "city": "Boston" } }] }
  }]
}