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

@kontourai/surface

v0.5.2

Published

Shared transparency foundation under Kontour's products. Claims, evidence, freshness, and gaps in one inspectable shape.

Readme

Kontour Surface

Show your work. Earn trust.

npm CI License: Apache-2.0

Every product makes claims: this record is current, this number came from a verified source, this code change passed the required checks. AI makes those claims faster, more polished, and harder to review — and lets agents act on them at a speed no human review layer can match.

Surface is the shared foundation under Kontour's products — and any product that needs to show its work. Surface connects evidence provenance to the claims products ask users and agents to trust. It gives products a portable way to expose material claims, evidence traces, freshness, conflicts, and transparency gaps without collapsing them into a trust score.

The result is a point-in-time Trust Snapshot that a person, another system, or an AI agent can inspect before relying on a claim: what is asserted, what supports it, how current that support is, and what is still missing or in dispute.

Who builds with it

  • AI code governanceVeritas authors claims about repo areas, collects evidence per run, and lets reviewers (and agents) see exactly which claims this run's evidence supports — and which went stale when the code changed.
  • Field-attested public records — a data directory maps crawled fields and human attestations into per-field claims, so "verified" means this field, this source, this date instead of a badge on the whole record.
  • Fact resolution — a financial workflow keeps user-verified facts and document-imported values in the same report, with conflicts visibly disputed instead of averaged into a confidence score.
  • Dependency auditsnpm audit output becomes evidence behind a "safe to install" claim with a freshness window and a trace to the exact run.
  • Agent guardrails — agents query stale claims, missing evidence, and policy gaps through the CLI, the JSON report, or the built-in MCP server, and apply the discipline the kernel derives: act on verified, reverify stale, escalate disputed.

Each of these ships as a runnable fixture in examples/. The deeper narratives are in Use Cases.

What Surface is not

Surface is not a promise of perfect truth, a certification business, or a hosted-only evidence collector. Producers collect domain evidence and make domain decisions. Surface defines the open trust format, derives portable trust state, and makes that state inspectable through reports, a Trust Panel, the Surface Console, APIs, and agent-readable resources. If a claim is weak, stale, or disputed, Surface makes that obvious instead of papering over it.


Quickstart

npm install -D @kontourai/surface
npx surface report --input examples/surface-fixtures.json --format summary

The command reads a Surface trust input, derives claim statuses, and emits a local trust report — the basis for a point-in-time Trust Snapshot. In this repo the fixture ships at examples/surface-fixtures.json; after installing the package in another project, pass --input pointing at your own trust input file.

The output from the shipped fixture looks like this:

Kontour Surface report surface-1779196544815
Source: kontour-surface-validation-fixtures
Claims: 4 (unknown: 1, verified: 2, stale: 1)
Surfaces: repo-governance.developer-evidence: 1, field-attested-records.public-data: 1, fact-resolution.financial-facts: 1, surface.roadmap: 1
High-impact unsupported: none
Stale: claim.field-attested-records.registration-status
Recompute needed: none
Disputed: none
Claim groups: 0
Transparency gaps: 3

Each line answers a different question: Claims gives the total and derived status breakdown. Surfaces shows where claims live by producer namespace. High-impact unsupported flags claims where impact is high but evidence is missing or weak — the first thing to look at. Stale lists claims whose verification has expired. Disputed lists claims contradicted by an event or another claim. Transparency gaps counts discoverable conflicts, missing support, and supersede chains across the input.

For a step-by-step tour, see the Walkthrough.

Emit your first claims

Any system that can emit a TrustInput is a producer. The fluent SDK keeps the shape honest:

import { TrustInputBuilder, buildTrustReport } from "@kontourai/surface";

const input = new TrustInputBuilder({ source: "my-producer:local" })
  .addClaim({
    id: "claim.api.rate-limit",
    subjectType: "api",
    subjectId: "public-api",
    claimType: "software-evidence",
    surface: "api",
    fieldOrBehavior: "rate limit is enforced",
    value: "100 requests/minute",
    currentIntegrityRef: "commit:abc123",
  })
  .addEvidence({
    id: "evidence.api.rate-limit.test",
    claimId: "claim.api.rate-limit",
    evidenceType: "test_output",
    method: "validation",
    sourceRef: "ci:1847",
    excerptOrSummary: "Rate-limit tests passed.",
    integrityRef: "commit:abc123",
  })
  .addEvent({
    id: "event.api.rate-limit.verified",
    claimId: "claim.api.rate-limit",
    status: "verified",
    actor: "ci",
    method: "npm test",
    evidenceIds: ["evidence.api.rate-limit.test"],
  })
  .build();

const report = buildTrustReport(input);

console.log(report.summary);

The derived report for this input looks like:

{
  totalClaims: 1,
  byStatus: { verified: 1, unknown: 0, ... },
  highImpactUnsupported: [],
  staleClaims: [],
  disputedClaims: [],
  transparencyGapsByType: { ... }
}

The claim is verified because the verification event and its policy-required evidence support it at the current integrity ref. If that integrity ref changed — say a new commit landed — the claim would surface as changed-since-verified instead of silently staying green. See the Consumer SDK guide.

Query trust state

npx surface report --input my-export.json --format summary   # human-readable rollup
npx surface report --input my-export.json --format analytics # provenance-aware analytics projection
npx surface stale  --input my-export.json                    # claims whose verification aged out
npx surface missing --input my-export.json                   # claims missing required evidence
npx surface get --claim-id claim.api.rate-limit --input my-export.json
npx surface policy --claim-id claim.api.rate-limit --input my-export.json
npx surface console                                          # local operator workspace, no cloud, no login
npx surface mcp --input my-export.json                       # serve trust state to agents over MCP (stdio)

The full command surface, flags, and output contracts are in the CLI reference; the local Console is documented in the Surface Console reference and the agent tools in Agents and MCP.

The Surface Console reviewing a producer run: verified claims, an attention band, and a stale rate-limit claim flagged for refresh

Show it to your users

A product listing with the Built with Surface badge and an embedded trust panel disclosing a stale registration-status claim, its evidence, and the freshness gap

  • Trust Panel embed — ship the dependency-free <surface-trust-panel> element so viewers can inspect claims, evidence, freshness, and gaps inside your product.
  • Snapshot Viewer — paste any derived report into the hosted viewer; parsing happens entirely in the browser.
  • Built with Surface badge — the inspectability signal: your product exposes inspectable trust state, with no certification implied.
  • Conformance — alternate implementations of the Open Trust Format can verify they derive the same trust state with the conformance suite.

Public package surface

The npm package exposes one stable module entrypoint:

import {
  TrustInputBuilder,
  buildTrustReport,
  validateTrustInput,
} from "@kontourai/surface";

The package also ships the surface CLI, JSON schemas under schemas/, examples, docs, and TypeScript declarations. Internal files under dist/src/ are included so the exported module graph can run, but consumers should import from @kontourai/surface rather than deep dist/ paths. The package contents guard in scripts/check-package-contents.mjs keeps generated test output, local docs-site output, scripts, and source files out of the published tarball.

What sits on top

Surface is a foundation product. Anything that needs to answer "what claims are visible, what supports them, and what gaps remain?" can build with it.

Veritas — a repo-local governance product built with Surface for AI-assisted code changes. Veritas authors and projects claims, collects evidence per run, and maps repo standards into Surface claim groups so a reviewer can start from a framework/requirement view and drill into the exact claim and evidence. See Use Cases.

Custom producers — any system that emits TrustInput can use Surface for report generation, status derivation, and the Surface Console. Product artifacts may embed surface.input directly; Surface remains responsible for generated report fields. Start with the external adapter example.

The dependency direction is one-way: producers depend on Surface; Surface does not depend on any producer's runtime.

Local development

npm install
npm run setup:repo-hooks
npm run validate:repo-hooks
npm run verify
npm run surface:summary

npm run setup:repo-hooks configures this clone's local Git config with core.hooksPath=.githooks. The repo-owned pre-push hook is contributor tooling: it runs local verification before push, can be repaired by rerunning setup, and does not define Surface Console, projection, Trust Snapshot, runtime adapter, producer, or product behavior. See Repo Hooks.

Repository layout

  • bin/ — package CLI launcher; surface resolves here before loading built code from dist/.
  • src/ — TypeScript Surface library, CLI implementation, derivation kernel, reporting, adapters, and Console runtime.
  • src/adapters/ — built-in adapter registry and native surface passthrough adapter.
  • src/console/ — local Surface Console server, read-model projection, editable dependency-free UI assets, and generated asset constants.
  • schemas/ — JSON schema contracts for Surface inputs, reports, policies, evidence, and events.
  • examples/ — sample Surface inputs and package-shaped producer examples.
  • examples/external-adapter/ — canonical external adapter example for product-owned producer logic.
  • tests/ — Node test coverage for library, CLI, adapter, Console, and docs behavior.
  • tests/browser/ — Playwright coverage for the generated docs site and the standalone Surface Console.
  • docs/ — source documentation. Some pages publish to the generated site; repo-only references stay here.
  • scripts/ — repo maintenance, docs build, package-boundary, content-boundary, and hook setup scripts.
  • .github/workflows/ — CI and GitHub Pages publishing workflow definitions.
  • .githooks/ — repo-owned local Git hooks installed by npm run setup:repo-hooks.
  • dist/ — generated TypeScript build output from npm run build; do not edit directly.
  • docs-site/ — generated GitHub Pages output from npm run docs:build; curated public subset, not source.
  • test-results/ — local Playwright/test artifacts; ignored and safe to regenerate.

Ignored local/generated directories such as node_modules/, .surface/, .flow-agents/, dist/, docs-site/, test-results/, and playwright-report/ should be regenerated from source commands rather than reviewed as product source.

Documentation

The published docs site is generated from these sources by npm run docs:build; see docs/README.md for the full maintainer index.

License

Apache-2.0