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

zam-adapter-openclaw

v0.1.0

Published

Reference adapter: governs an OpenClaw-shaped agent workspace via the ZAM context plane (files -> registry -> plan() -> assembled prompt).

Readme

zam-adapter-openclaw

The first reference adapter for the ZAM context plane. It demonstrates the adapter contract (docs/37 §5) end-to-end on an OpenClaw-shaped agent workspace: take files on disk, govern them through the deterministic core, and emit a smaller, safe, assembled prompt with an auditable savings report.

Honest scope: this targets a documented synthetic OpenClaw-shaped workspace (example-workspace/), not a live ~/.openclaw integration — OpenClaw's real internals were never captured (docs/03/docs/04). The contract (files → registry → plan() → prompt) is real and reusable; the file conventions are ours and documented in docs/38.

The contract (what every adapter does)

  1. Extract workspace files → a ZAM registry (extractWorkspace).
  2. Plan — call the deterministic core plan() (no per-turn model call required).
  3. Assemble the prompt from the selected components only (assemblePrompt).

governWorkspace does all three in one call.

Usage

import { governWorkspace } from 'zam-adapter-openclaw';

const { promptFamily, prompt, stats } = governWorkspace({
  workspaceDir: './example-workspace',
  requestText: 'Help me debug the failing build.',
});
// prompt: the governed prompt (selected components only)
// stats:  { selected, omitted, deferred, baselineTokens, selectedTokens, savedPct, ... }

CLI

zam-openclaw --workspace ./example-workspace --request "Help me debug the failing build."
# prompt -> stdout; a savings line -> stderr.  Add --json for a machine-readable object.

Workspace conventions

A file becomes a governed component iff its frontmatter declares a recognized type (scaffold | skill | tool | history | memory | output_format). The frontmatter carries the ZAM governance metadata; sizes are measured from the body; hash is a real SHA-256. Missing fields fall back to documented type defaults. See docs/38 §3–§4 for the full rules.

---
id: skill.coding-guide
type: skill
title: Coding & Debugging Guide
summary: Conventions for code review, debugging, and builds.
riskLevel: low
requiredWhen: [coding_build_debug]
safeToOmitWhen: [simple_greeting, research_investigation, general_default]
defaultAction: omit
omissionPolicy: allow
retainPolicy: optional
budgetPriority: 5
tags: [skill, coding]
version: 1.0.0
---
<the component body — included verbatim when this component is selected>

Build & test

npm install   # installs context-plane from npm
npm run build
npm test