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

@objectstack/spec

v17.2.0

Published

ObjectStack Protocol & Specification - TypeScript Interfaces, JSON Schemas, and Convention Configurations

Readme

@objectstack/spec

Try Online

The Source of Truth for the ObjectStack Protocol. Contains strictly typed Zod schemas that define every aspect of the system.

Protocols

  • System: Manifests, Datasources, APIs.
  • Data: Objects, Fields, Validation Rules.
  • UI: Views, Layouts, Dashboards.
  • Automation: Flows, Workflows, Triggers.
  • AI: Agents, RAG Pipelines, Models, MCP Servers.

Export surfaces

The package publishes one entry per protocol domain (@objectstack/spec/data, /ui, /kernel, …) plus fine-grained vocabulary entries (@objectstack/spec/meta-spelling — the /meta/:type URL-spelling contract). Each entry is a self-contained bundle: what an entry's module graph reaches is what every consumer of that entry pays for.

Standing principle (maintainer ruling 2026-08-20, recorded verbatim on objectstack#10096):

浏览器可达的 spec 导出面必须 schema-free。 A @objectstack/spec export surface that browser/client consumers reach must carry vocabulary — maps, folds, enums, pure predicates — without linking the zod schema/validation machinery. The schema graph is the server/publish side's dependency, never the price of spelling a URL segment or reading a posture predicate.

Adding an export that browser/client code will import? Either place it on a schema-free entry (/meta-spelling is the reference pattern: derivation from the schema graph happens at build time via gen:meta-url-spelling, gated by check:meta-url-spelling), or verify the entry it lands on keeps a schema-free module graph. The package declares sideEffects: false, so bundlers may drop what a consumer does not reach — module-scope side effects in any published module are therefore also a defect (measured, not assumed; see objectstack#10031).

Node-only imports are refused everywhere a browser bundler resolves (#11072). Every entry is loadable from a browser build by construction — schema-bearing entries included — so no published bundle may link a Node builtin or a server-only package. The one sanctioned exception is the pg-grammar arm of the postgres url refinement (pg-connection-string, whose parse statically resolves require('fs')): the entries that reach it carry a browser export condition pointing at dist/browser/** bundles in which that arm is swapped for a dependency-free twin (src/data/driver/pg-url-grammar.*, tsup.config.tsswapServerOnlyGrammarArm), and Node consumers keep the full DSN refusal unchanged. check:browser-reachable-entries enforces both halves — a browser-conditioned bundle that still links the parser, and a non-conditioned bundle that links anything Node-only, are each a red — with a positive control on the Node side. Need Node-only work in a schema? Route it through a seam module the browser pass swaps, never import it directly.

Usage

Recommended: Use ObjectSchema.create() with Field.* helpers for strict TypeScript validation:

import { ObjectSchema, Field } from '@objectstack/spec/data';

// Create a validated object definition with type checking
export const Task = ObjectSchema.create({
  name: 'task',
  label: 'Task',
  icon: 'check-square',
  
  fields: {
    title: Field.text({
      label: 'Title',
      required: true,
      maxLength: 200,
    }),
    
    status: Field.select({
      label: 'Status',
      options: [
        { label: 'To Do', value: 'todo', default: true },
        { label: 'In Progress', value: 'in_progress' },
        { label: 'Done', value: 'done' },
      ],
    }),
  },
  
  enable: {
    trackHistory: true,
    apiEnabled: true,
  },
});

Alternative: Runtime validation of existing objects:

import { ObjectSchema } from '@objectstack/spec/data';

// Validate a JSON object against the schema
const result = ObjectSchema.parse(myObjectDefinition);
if (result.success) {
  console.log('Valid object:', result.data);
}

MCP (Model Context Protocol) Integration

Declare the MCP servers your agents may reach. MCPServerRefSchema is a reference to a server — where it lives and how to authenticate — not a description of what it serves:

import { MCPServerRefSchema } from '@objectstack/spec/ai';

// A reference to an MCP server an agent may call
export const objectStackMCP = MCPServerRefSchema.parse({
  name: 'objectstack_mcp',
  label: 'ObjectStack MCP Server',
  transport: 'http',                      // 'stdio' | 'http' | 'websocket'
  endpoint: 'https://api.objectstack.ai/mcp',
  secretRef: 'system:mcp_api_key',        // optional
  active: true,                           // defaults to true
});

The tools, resources and prompts an ObjectStack server exposes are not authored here — they are derived from your metadata at runtime by the MCPServerPlugin in @objectstack/mcp, which bridges the metadata and data engines to any connected MCP client.