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

@agenticprimitives/types

v1.0.0-alpha.10

Published

Cross-cutting branded types and chain primitives shared across @agenticprimitives/* packages.

Downloads

2,106

Readme

@agenticprimitives/types

The shared type vocabulary that keeps thirty packages pointing at one identity.

A trust substrate lives or dies on agreement about what an identity is. types is where that agreement is written down as the compiler's problem: branded primitives (Address, Hex, ChainId, Caip10Address) and the cross-cutting identity shapes (CanonicalAgentIdentity, AgentType, AgentSession, CredentialPrincipal, Assurance) that every @agenticprimitives/* package shares. Because the brands are phantom types, a raw string cannot masquerade as an address and a CAIP-10 subject cannot be confused with a bare EVM address — across package boundaries, at compile time, with zero runtime cost.

It is also where the doctrine becomes a type. CanonicalAgentIdentity is the ADR-0010 rule — the agent's identity IS its Smart Agent address — as an alias of Address, and AgentSession deliberately has no owner field (ADR-0016): the SSO session names the agent itself, never a vendor-side owner. Types-only, zero dependencies, no runtime code; it is the leaf every other package depends on and the reason the dependency graph has no back-edges.

Part of agenticprimitives — the trust substrate for the agent economy: one canonical Smart Agent identity with custody, delegation, naming, credentials, and audit evidence designed as one system.

Install

pnpm add @agenticprimitives/types

Exports

import type { Address, Hex, ChainId, BrandedId } from '@agenticprimitives/types';

type SessionId = BrandedId<'SessionId'>;
const chain: ChainId = 1 as ChainId;
const account: Address = '0x...';

Also exported: CanonicalAgentIdentity (ADR-0010 alias of Address); Caip10Address, CanonicalAgentId, Caip10Parts (CAIP-10 brand — the type lives here, the runtime builder lives in agent-profile); AgentType ('person' | 'org' | 'service') and NameContext (display-only injection shape); and the SSO/session shapes AgentSession, CredentialPrincipal, Assurance, CredentialKind, CredentialRole (specs 223/224).

How it's different from a typical types package

Most monorepo types packages are junk drawers that grow until everything depends on everything. This one is governed:

  • Admission rule: a type lands here only when ≥ 2 packages consume it and it cannot live anywhere lower. Single-consumer types stay in their package.
  • No runtime, ever. No functions, no constants with behavior, no side effects. Even the CAIP-10 builder is excluded — only the brand lives here.
  • Shared shapes without runtime coupling. AgentSession lives here precisely so identity-directory, connect, and relying-site SDKs can agree on the token shape without importing each other.

The result is a leaf package small enough to audit in one sitting, strong enough to make identity confusion a compile error.

Status

Minimal by design — adding a type requires ≥ 2 consuming packages. Testnet/pilot-ready. Production launch is gated on the public checklist in the root README.md Status section — including third-party contract audit and governance key rotation. Track every security finding live in docs/audits/findings.yaml.

Validate

pnpm --filter @agenticprimitives/types typecheck
pnpm check:forbidden-terms