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

v3.0.6

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.

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

Define MCP servers to connect AI agents to your ObjectStack data and tools:

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

// Define an MCP server exposing ObjectStack data
export const objectStackMCP = MCPServerConfigSchema.parse({
  name: 'objectstack_mcp',
  label: 'ObjectStack MCP Server',
  description: 'Connects AI agents to ObjectStack data and workflows',
  
  serverInfo: {
    name: 'ObjectStack MCP',
    version: '1.0.0',
    capabilities: {
      resources: true,
      resourceTemplates: true,
      tools: true,
      prompts: true,
    },
  },
  
  transport: {
    type: 'http',
    url: 'https://api.objectstack.ai/mcp',
    auth: {
      type: 'bearer',
      secretRef: 'system:mcp_api_key',
    },
  },
  
  // Expose data as resources
  resourceTemplates: [
    {
      uriPattern: 'objectstack://objects/{objectName}',
      name: 'Object Data',
      description: 'Access object records',
      parameters: [
        {
          name: 'objectName',
          type: 'string',
          required: true,
          description: 'Name of the object to access',
        },
      ],
      handler: 'resources.getObjectData',
    },
  ],
  
  // Expose workflows as tools
  tools: [
    {
      name: 'create_record',
      description: 'Create a new record in any object',
      parameters: [
        {
          name: 'object',
          type: 'string',
          description: 'Object name (e.g., "account", "contact")',
          required: true,
        },
        {
          name: 'data',
          type: 'object',
          description: 'Record data as key-value pairs',
          required: true,
        },
      ],
      handler: 'flows.create_record',
      sideEffects: 'write',
      requiresConfirmation: true,
    },
    {
      name: 'search_records',
      description: 'Search for records using natural language or filters',
      parameters: [
        {
          name: 'object',
          type: 'string',
          description: 'Object to search in',
          required: true,
        },
        {
          name: 'query',
          type: 'string',
          description: 'Search query',
          required: true,
        },
      ],
      handler: 'data.search',
      sideEffects: 'read',
    },
  ],
  
  // Provide prompt templates
  prompts: [
    {
      name: 'analyze_customer_data',
      description: 'Analyze customer data and generate insights',
      messages: [
        {
          role: 'system',
          content: 'You are a data analyst specializing in customer insights.',
        },
        {
          role: 'user',
          content: 'Analyze the following customer data and provide insights: {{customer_data}}',
        },
      ],
      arguments: [
        {
          name: 'customer_data',
          type: 'string',
          required: true,
          description: 'Customer data in JSON format',
        },
      ],
    },
  ],
  
  autoStart: true,
  healthCheck: {
    enabled: true,
    interval: 60000,
  },
});