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

@moolam/contracts

v1.1.0

Published

Internal component of Sutra SDK — applications should install sutra-sdk. Pure cognitive contracts: memory, model, reasoning, planning, knowledge, tool, vision, speech, runtime, budget, and degradation interfaces. Zero dependencies, zero implementations.

Readme

@moolam/contracts

Pure cognitive contracts: the interfaces every other package is built from. Zero runtime dependencies, zero implementations. This package is the dependency root of the platform; it imports nothing and everything imports it.

Architecture

One file per contract, one export barrel. Contracts carry MUST-level obligations in their JSDoc, not just type shapes: an implementation that type-checks but violates an obligation (drops a constraint, skips a trace, lies about locality) is non-conformant.

| File | Contract | Governs | |---|---|---| | src/memory.ts | MemoryInterface | Kind-tagged long-term memory with kind-driven decay | | src/model.ts | ModelInterface | Provider-agnostic inference with locality declaration | | src/reasoning.ts | ReasoningInterface | Auditable deliberation: traces, constraints, confidence | | src/speech.ts | SpeechInterface | Streaming STT/TTS with declared language support | | src/vision.ts | VisionInterface | Visual analysis behind a single analyze seam | | src/tool.ts | ToolInterface | Risk-classed, audited action on the world | | src/planning.ts | PlanningInterface | Goal graphs with evidence-driven, cyclic-capable revision | | src/knowledge.ts | KnowledgeConnectorInterface | Citation-bearing access to authoritative corpora | | src/runtime.ts | Lifecycle, scheduler, event bus, storage driver | What any host must provide |

Public API

Everything exported from src/index.ts is public and semver-governed. There are no internal modules.

Quick start

import type { MemoryInterface, MemoryItem } from "@moolam/contracts";

class MyStore implements MemoryInterface {
  // your vector DB, graph store, or SQLite behind the same seam
}

Minimal reference implementations of every contract live in examples/_shared/mocks.mjs.

Contributing notes

  • Any change to a contract file requires an accepted RFC (rfcs/). Documentation-only changes do not.
  • This package must never gain a runtime dependency. CI treats one as a build failure.
  • Full specification with obligations tables: docs/sdk/INTERFACES.md.

Examples

Every script under examples/ implements one or more of these contracts with mocks; examples/tool-use/ and examples/voice/ are the most contract-focused.

Tests

pnpm --filter @moolam/contracts test