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

@hlos-ai/schemas

v0.4.2

Published

HLOS Kernel v2 API contract types: responses, errors, receipts, IDs

Readme

@hlos-ai/schemas

HLOS Kernel v2 API contract types.

Source of Truth: This package in hlos/packages/hlos-schemas is the canonical source. The standalone hlos-ai/schemas repo is deprecated and will not receive updates.

Published to npm (public) on tag: schemas-v*

Installation

pnpm add @hlos-ai/schemas

Exports

import {
  // Surface enum
  type Surface, SurfaceSchema, SURFACES,

  // Error codes
  type KernelErrorCode, KernelErrorCodeSchema, ERROR_CODE_STATUS,

  // Response envelopes
  type SuccessResponse, type ErrorResponse, success, error,
  type KernelOk, KernelOkSchema, type KernelError, KernelErrorSchema,
  kernelOk, kernelError, type ApiResponse,

  // Receipt
  type SignedReceiptV0, SignedReceiptV0Schema,
  RECEIPT_TYPE_URI, RECEIPT_VERSION, isSignedReceiptV0,

  // Branded IDs
  type WalletId, type PassportId, type ReceiptId,
  type CorrelationId, type IdempotencyKey, type CrossingId,
  generateReceiptId, generateCrossingId,

  // ID format validators
  CrossingIdFormatSchema, ReceiptIdFormatSchema,
  PassportIdFormatSchema, WalletIdFormatSchema,

  // Attribution
  type FundingSource, FundingSourceSchema,
  type CredentialSource, CredentialSourceSchema,
  deriveFundingSource,

  // Crossing hash
  type CrossingSnapshotV0, CrossingSnapshotV0Schema,
  type CrossingHashInputV0, CrossingHashInputV0Schema,

  // Settlement receipt
  SETTLEMENT_AUTHORITY,
  type CrossingSettledReceipt, CrossingSettledReceiptSchema,

  // Family W — Privacy-Preserving Proofs
  W_RPID_DOMAIN, W_TXCTX_DOMAIN,
  type RPID, RPIDSchema,
  type TransactionContext, TransactionContextSchema,
  type TransactionContextHash, TransactionContextHashSchema,
  encodeEpoch, validateTimeWindow,
  W_GOLDEN_FIXTURES,

  // Agents contracts
  type AgentsListResponse, AgentsListResponseSchema,
  type AgentPassportStubResponse, AgentPassportStubResponseSchema,
  type AgentStatus, AgentStatusSchema,
  type AgentType, AgentTypeSchema,

  // Encoding utilities (zero dependencies)
  bytesToBase64url, base64urlToBytes,
  Base64urlSha256Schema, Base64urlEd25519SigSchema,

  // Receipt hash computation (requires @noble/hashes)
  jcsCanonicalize,
  computeReceiptHash, computeContentHash,
  RECEIPT_HASH_GOLDEN_FIXTURE,

  // Finality — Notary Attestation
  type NotaryAttestation, NotaryAttestationSchema,
  type NotarizeResponse, NotarizeResponseSchema,
  type LogInclusionProof, LogInclusionProofSchema,
  FinalityLevel,

  // Golden fixtures
  GOLDEN_FIXTURES,
  FINALITY_GOLDEN_FIXTURES,
} from '@hlos-ai/schemas';

Response Patterns

Reads → SuccessResponse<T>

// GET /api/v2/wallets/:id
const response: SuccessResponse<WalletBalance> = {
  success: true,
  data: { wallet_id: 'wallet_...', balance_cents: 5000 },
  meta: { correlation_id: 'corr-123' },
};

Mutations → SignedReceiptV0<T>

// POST /api/v2/wallets/:id/spend
const receipt: SignedReceiptV0<SpendResult> = {
  '@type': 'https://hlos.ai/schema/SignedReceiptV0',
  version: 0,
  receipt_id: 'rcpt_...',
  content: { type: 'spend', amount_cents: 100 },
  content_hash: 'base64url...',  // SHA-256, base64url
  signature: 'base64url...',     // Ed25519, base64url
  key_id: 'hlos-v2-1',
  issued_at: '2026-01-23T...',
};

Required Headers

| Header | Reads | Mutations | |--------|-------|-----------| | Authorization | ✅ | ✅ | | X-HLOS-Correlation-ID | ✅ | ✅ | | X-HLOS-Surface | ✅ | ✅ | | X-HLOS-Idempotency-Key | ❌ | ✅ |

Encoding (Frozen)

| Field | Encoding | |-------|----------| | content_hash | base64url of raw 32-byte SHA-256 | | signature | base64url of Ed25519 signature | | version | Number (0), not semver string |

Surface Enum

type Surface = 'mcp' | 'x402' | 'events' | 'cli' | 'web' | 'acp' | 'api';

All v2 requests must include X-HLOS-Surface header.

Links