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

ankr-forja

v0.2.2

Published

AnkrForja v0.2 — STATE + TRUST + SENSE + ANNOUNCE. codexAgent() one-liner wires all four layers from codex.json.

Readme

ankr-forja

AnkrForja v0.2 — The knowledge exchange protocol for AI-native services.

STATE + TRUST + SENSE + ANNOUNCE. One codexAgent() call wires all four layers from your codex.json.

Install

npm install ankr-forja

What It Is

AnkrForja is an open protocol (Apache 2.0) that lets AI-native services declare exactly what they know, what they can do, and who is authorised to do it — without documentation, without interpretation, without hallucination.

GET  /api/v2/forja/state         — what this service knows and can do
GET  /api/v2/forja/trust/:userId — what this user/role is authorised to do
POST /api/v2/forja/sense/emit    — fire a real-time event to subscribers
GET  /api/v2/forja/proof         — what % of rules are annotated and verified

Quick Start

import Fastify from 'fastify'
import { codexAgent } from 'ankr-forja'

const app = Fastify()
await app.register(codexAgent())   // reads codex.json, wires all four endpoints
await app.listen({ port: 4000 })

Your service is now discoverable by any AnkrCodex crawler — no docs needed.

The Four Layers

| Endpoint | Purpose | |---|---| | STATE | Capability manifest — can_answer, can_do, emits. Machine-readable. | | TRUST | Role-based permission matrix. Returns what this user/agent tier can do. | | SENSE | Real-time event emission. Push events to subscribers on state changes. | | PROOF | Rule annotation coverage. coverage_pct = % of code decisions traced to domain rules. |

Why Not MCP?

MCP tool schemas consume ~55,000 tokens to load. A Forja STATE response is ~800 bytes. A trust bitmask check is one bitwise AND: (mask & BOOK) !== 0. Binary truth — no interpretation, no parsing, no hallucination possible.

At 200+ services, interpretation equals hallucination. The only solution is binary truth.

Trust Bitmask

Pair with ankr-trust-constants for zero-interpretation capability checks:

import { BOOK, MANIFEST, hasPerm } from 'ankr-trust-constants'

const trust = await fetch('/api/v2/forja/trust/user123').then(r => r.json())
if (hasPerm(trust.trust_mask, BOOK)) {
  // this user can create bookings — binary truth, no string matching
}

The 32-bit Allocation

Bits 0-7   — Universal Forja       (READ, QUERY, WRITE, EXECUTE, APPROVE, AUDIT, ADMIN, SUPER)
Bits 8-15  — Maritime block        (BOOK, MANIFEST, BL_ISSUE, RATE_DESK, FEEDER_OPS, ...)
Bits 16-23 — Logistics block       (GATE_IN, TRACK, FTA_CHECK, ALERT_ACK, PORT_OPS, ...)
Bits 24-31 — AGI autonomy tier     (AI_READ, AI_QUERY, AI_SUGGEST, AI_EXECUTE, AI_APPROVE, ...)

One integer encodes the full permission surface of any service. No string arrays. No parsing.

codex.json

Forja reads your service's codex.json at startup:

{
  "service": "portwatch-backend",
  "port": 4080,
  "domain": "maritime-port",
  "can_answer": ["vessel.ukc-status", "vessel.cpa-alert"],
  "can_do": ["MOVEMENT_AUTHORITY", "ALERT_ACK"],
  "emits": ["ukc-breach", "cpa-alert"],
  "forja_state": "/api/v2/forja/state",
  "forja_trust": "/api/v2/forja/trust",
  "forja_sense": "/api/v2/forja/sense/emit",
  "forja_proof": "/api/v2/forja/proof",
  "forja_version": "2.0"
}

can_answer in codex.json = can_answer in Forja STATE. They must stay in sync.

Used In Production

205+ services across the ANKR maritime platform run on this protocol — VTS systems, electronic Bill of Lading, charter party management, voyage intelligence, port congestion analytics.

Protocol Spec

Full specification: FORJA-SPEC-v0.1

Related

License

Apache 2.0 — open protocol, anyone implements it.


Built by ANKR Labs | PowerPbox IT Solutions Pvt Ltd