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

replicas-engine

v0.1.73

Published

Lightweight API server for Replicas workspaces

Readme

Replicas Engine (V1)

Replicas Engine is the workspace runtime that powers coding agents.

Authorization Header: X-Replicas-Engine-Secret: <REPLICAS_ENGINE_SECRET>

Core Flow:

  1. Fetch snapshots (/status, /chats, /repos, /hooks/status).
  2. Open GET /events for deltas.
  3. Send messages via POST /chats/:chatId/messages.

Engine API surface (v1)

System:

  • GET /health
  • GET /status
  • GET /token-refresh/health

Stream:

  • GET /events (SSE)

Chats:

  • POST /chats
  • GET /chats
  • GET /chats/:chatId
  • DELETE /chats/:chatId
  • GET /chats/:chatId/history
  • POST /chats/:chatId/messages
  • POST /chats/:chatId/interrupt

Plans:

  • GET /plans
  • GET /plans/:filename

Repos and hooks:

  • GET /repos
  • GET /repos?includeDiffs=true (includes gitDiff.fullDiff)
  • GET /hooks/status

SSE envelope:

  • id: stable event id
  • event: engine event type
  • data: JSON-serialized EngineEvent

VM/runtime contract

The engine is expected to run in a VM/sandbox with:

  • OS user with writable home (default /home/ubuntu)
  • Workspace root at ~/workspaces
  • Git available in PATH
  • gh CLI available in PATH (for PR URL discovery)
  • Claude and Codex CLIs installed/configurable

Provisioning contract (what monolith injects before engine start)

From monolith/src/lib/daytona.ts + monolith/src/lib/workspaces.ts, the VM is expected to be prepped with:

  • Git identity (optional but expected for commits):
    • git config --global user.name <bot-or-user-name>
    • git config --global user.email <bot-or-user-email>
  • Git credential helper setup when GitHub token is available:
    • git config --global credential.helper store
    • ~/.git-credentials with https://x-access-token:<token>@github.com
  • Repository materialization:
    • clone repositories into /home/ubuntu/workspaces/<repo-name>
    • if no repository URL is provided, create empty /home/ubuntu/workspaces/<repo-name>
  • Claude credentials (optional):
    • file: ~/.claude/.credentials.json
    • source: OAuth credential object provisioned by monolith
  • Bedrock credentials (optional):
    • file: ~/.claude/.bedrock-credentials.json
    • env: CLAUDE_CODE_USE_BEDROCK=1, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION
  • Codex credentials (optional):
    • file: ~/.codex/auth.json
    • format includes tokens.id_token, tokens.access_token, tokens.refresh_token, tokens.account_id

Token refresh managers may later overwrite credential files in place:

  • ~/.git-credentials
  • ~/.claude/.credentials.json
  • ~/.codex/auth.json

Engine persistence locations:

  • ~/.replicas/engine/chats.json
  • ~/.replicas/engine/events.jsonl
  • ~/.replicas/engine-state.json
  • ~/.replicas/startHooks.log
  • Plan read locations (for /plans endpoints):
    • ~/.claude/plans
    • ~/.replicas/plans
  • Health endpoint readiness signal file:
    • /var/log/cloud-init-output.log (if missing, /health reports initializing)

Environment contract

src/engine-env.ts is the source of truth for engine runtime environment variables.

Use that file to understand:

  • required vars (boot-time validated)
  • optional vars used by engine code
  • ambient/runtime vars captured for SDK/CLI/agent compatibility

Engine env vars are injected by monolith when the engine is started inside sandboxes.

Credential files expected/used by provider CLIs:

  • ~/.git-credentials (git/gh auth)
  • ~/.claude/.credentials.json (Claude OAuth auth)
  • ~/.claude/.bedrock-credentials.json (Claude Bedrock config)
  • ~/.codex/auth.json (Codex auth)

What the engine sends upstream

The engine calls monolith with:

  • Authorization: Bearer <REPLICAS_ENGINE_SECRET>
  • X-Workspace-Id: <WORKSPACE_ID>

Outgoing endpoints:

  • POST /v1/engine/webhook
  • POST /v1/engine/github/refresh-token
  • POST /v1/engine/claude/refresh-credentials
  • POST /v1/engine/codex/refresh-credentials