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

jsclaw-agent-micro

v0.0.3

Published

Zero-dependency agent runner for jsclaw containers. Pure JavaScript ESM, Anthropic API over fetch.

Readme

jsclaw-agent-micro

License: AGPL-3.0-or-later

Zero-dependency agent runner for jsclaw containers. Pure JavaScript ESM, no node_modules, talking to the Anthropic Messages API directly over fetch.

A drop-in replacement for jsclaw's default Claude Code runner: same stdin/stdout container contract, same identity files, same memory convention, same six IPC tools — in ~1,000 lines you can read in one sitting.

| | default runner (jsclaw-agent) | jsclaw-agent-micro | |--------------------|-------------------------------|--------------------------| | Agent harness | Claude Code (proprietary, 238 MB) | this repo (AGPL, ~50 kB) | | npm dependencies | claude-code, MCP SDK, cron-parser | none | | Container image | ~1.5 GB (incl. chromium) | ~150 MB | | Open source | partially | top to bottom |

Status

Experimental scaffold. The loop, tools, sessions, and jsclaw IPC integration work and are tested; it has not yet been hardened against long real-world workloads.

Usage

# Build the container
docker build -t jsclaw-agent-micro:latest -f container/Dockerfile .

# Point jsclaw at it
npx jsclaw config set containerImage jsclaw-agent-micro:latest

Or run it standalone, no container, for development:

export ANTHROPIC_API_KEY=sk-ant-...
export JSCLAW_WORKSPACE=$PWD
echo '{"prompt": "list the files here and summarize"}' | node runner.js

Output arrives as sentinel-delimited JSON on stdout (jsclaw's ContainerOutput shape):

---JSCLAW_OUTPUT_START---
{"status":"success","result":"...","newSessionId":"..."}
---JSCLAW_OUTPUT_END---

What's inside

  • runner.js — container entrypoint: ContainerInput on stdin, identity files (SOUL.md, IDENTITY.md, AGENTS.md, TOOLS.md, USER.md), memory/*.md loading, IPC input polling, close sentinel
  • src/api.js — Anthropic Messages API over fetch: retries with backoff, prompt caching via cache_control
  • src/loop.js — the agent loop: send, execute tool calls, append results, repeat; naive context trimming
  • src/tools.jsbash, read_file, write_file, edit_file, glob, grep
  • src/jsclaw-tools.js — jsclaw's six IPC tools (send_message, schedule_task, list_tasks, pause_task, resume_task, cancel_task) in-process — no MCP transport needed
  • src/session.js — sessions are the raw messages array as JSON under .jsclaw-micro/sessions/

Environment variables

| Variable | Default | Description | |----------|---------|-------------| | ANTHROPIC_API_KEY | — | Required (or ANTHROPIC_AUTH_TOKEN) | | ANTHROPIC_BASE_URL | https://api.anthropic.com | Alternate endpoint/proxy | | JSCLAW_MICRO_MODEL | claude-sonnet-4-6 | Default model (ContainerInput model wins) | | JSCLAW_WORKSPACE | /workspace/agent | Agent workspace dir | | JSCLAW_IPC_BASE | /workspace/ipc | IPC base dir | | JSCLAW_SYSTEM_PROMPT | — | Extra system prompt | | JSCLAW_ALLOWED_TOOLS | all | JSON array of allowed tool names | | JSCLAW_MEMORY_MAX_CHARS | 8000 | Memory budget for the system prompt |

Not yet supported

  • External MCP servers (ContainerInput.mcpServers is ignored with a stderr warning)
  • Web search / web fetch tools
  • Sub-agents
  • Streaming (responses arrive per-turn, which is fine for headless use)
  • Claude subscription auth — bring an API key

Development

npm test    # node --test, no network needed
npm run lint

License

AGPL-3.0-or-later. Copyright (c) 2026 Melvin Carvalho.