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

@kindgi/types

v0.8.1

Published

Foundational TypeScript types shared across Kindgi. Branded IDs, timestamps, hashes, refs, Result, list filter / page shapes. Zero runtime dependencies; the runtime exports are small checks such as makeEnvName and isFileValue.

Readme

@kindgi/types

Foundational TypeScript types shared across Kindgi. Almost entirely type-only: the runtime exports are small helpers with no dependencies, makeEnvName (the validated constructor for EnvName), UUID_RE (the one check of a UUID id's shape), isCredentialName, headerValueProblem and bearerValueProblem, parseCloudSecretVersion with CLOUD_SECRET_FORM, CORRECTION_ITEM, and isFileValue with FILE_NOT_SHOWN_REASONS and FILE_NOT_READ_REASONS.

Purpose

Provide the canonical, branded ID types and reference shapes used across Kindgi, preventing whole classes of bugs at compile time (you cannot pass a TenantId where a UserId is expected) with no runtime cost.

Exports

  • Branded IDs — TenantId, UserId, OrgId, TeamId, ProjectId, ThreadId, ConversationId, SessionId, RunId, FlowId, NodeId, EdgeId, AgentId, ToolId, GuardrailId, PolicyId, PackId, EventId, FactId, LogEntryId, ArtifactId, FileId, ProvenanceId, SubscriptionId, ApprovalId, ReviewerId, SupervisorId, ObservationId, SuggestedChangeId, AuditBundleId, ComplianceEvidenceId, WaitTokenId, DatasetId, ScheduleId, ProviderId, ApiTokenId, WebhookId, WebhookEndpointId, WebhookEventId, WebhookDeliveryId, DestinationId, DestinationDeliveryId, InstallationId, SigningKeyId, TriggerId.
  • Environment names — EnvName ([a-z][a-z0-9-]{0,62}) and makeEnvName(raw), which returns the branded value or null on a grammar violation.
  • UUIDs — UUID_RE, the one pattern every UUID id is checked against: 8-4-4-4-12 hex digits, any version, either case.
  • Brand utility — Brand<T, B> for constructing pack-scoped IDs (e.g. a MatterId in a pack that tracks legal matters).
  • Temporal — Timestamp (ISO 8601 UTC branded string), DurationMs, IsoDuration.
  • Hash & signature — ContentHash (sha256:<hex>), SignatureValue (base64 Ed25519), KeyId.
  • References — BlobRef (blob provider handle), DatasetRef.
  • Result — Result<T, E> discriminated union with runtime kind tag, plus OkOf<R> / ErrOf<R> extractors.
  • Version — Semver, SchemaMajor, VersionedRef<Id>.
  • Lists — Cursor (opaque pagination cursor), Filter<TStatus> (shared list-filter shape), Page<T> ({ items, nextCursor?, truncated? }).
  • Files — FileValue ({ type: 'kindgi.file', artifactId, contentType, size, sha256, … }), a stored file as a plain JSON value in a run's input, a tool's result or a conversation message; isFileValue(value) checks its shape; FileNotShownReason and FILE_NOT_SHOWN_REASONS say why a file isn't shown to a model.

Example

import type { TenantId, Result, BlobRef, ContentHash } from '@kindgi/types';

function ingest(tenantId: TenantId, ref: BlobRef): Result<void, { code: string }> {
  if (ref.tenantId !== tenantId) {
    return { kind: 'err', error: { code: 'cross-tenant-blob' } };
  }
  return { kind: 'ok', value: undefined };
}

const hash: ContentHash = 'sha256:abc123...' as ContentHash;

Non-goals

  • No runtime validation. Branded types are compile-time only. Validation of wire payloads lives in @kindgi/schema; the runtime exports above (makeEnvName, UUID_RE, isFileValue and the rest) are the exceptions: small helpers with no dependency.
  • No constructors. Construction is by as cast, except makeEnvName for EnvName.
  • No business logic. Only types that are used by two or more packages belong here. Package-scoped types stay in that package.