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

@org.ai/types

v2.4.0

Published

Shared type definitions for AI primitives packages

Readme

@org.ai/types

Stability: Experimental

Foundation type definitions for the AI primitives ecosystem.

Note for Consumers: This is an internal foundation package. For application development, use org.ai instead, which re-exports all types from this package plus additional organizational types (Role, Team, Goal, KPI, OKR).

Package Relationship

@org.ai/types (foundation - internal)
└── Provides base types used by all packages

org.ai (consumer-facing)
├── Re-exports ALL of @org.ai/types
└── Adds organizational types (Role, Team, Goal, KPI, OKR)

Consumers should:
  import { Thing, Agent, Role, Team } from 'org.ai'  // Correct

NOT:
  import { Thing, Agent } from '@org.ai/types'       // Internal use only

When to Use This Package

  • Internal packages in the monorepo that need foundation types
  • Building new packages that extend the type system

For application development, always use org.ai:

// Recommended for applications
import type { Thing, Agent, Human, Role, Team, Goal } from 'org.ai'

Foundation Types

This package provides the core type definitions:

Entity Types

  • Thing, ThingDO - Base entity types with URL-based identity
  • Things, ThingsDO, Collection - Collection types
  • Noun, Verb, StandardVerbs - Schema types

Worker Types

  • WorkerType - Base worker interface
  • AgentType - AI agent with model, autonomy settings
  • HumanType - Human worker with role, department, availability

Event Types (5W+H)

  • Event - Full event with all dimensions
  • EventWhat, EventWho, EventWhen, EventWhere, EventWhy, EventHow

Tool Types

  • ToolType - Tool definition
  • ToolParameterType, ToolInputType, ToolOutputType
  • ExecutableToolType, ValidatableToolType
  • ToolsType, ToolboxType

Business Framework Types

  • LeanCanvasType - 9-box business model canvas
  • StoryBrandType - 7-part narrative framework
  • FounderType - Founding team member
  • StartupType - Startup with lifecycle stages
  • ICPType - Ideal Customer Profile

Utility Types

  • AIFunctionType<TOutput, TInput, TConfig> - Generic AI function
  • EventHandlerType<TOutput, TInput> - Workflow event handlers
  • WorkflowContextType - Workflow execution context
  • RelationshipOperatorType - Database relationship operators
  • ParsedFieldType - Schema field definitions
  • ListOptions, ListResult, PaginationInfo - Pagination types

Type Guards

  • isWorker, isAgent, isHuman
  • isTool, isToolParameter, isToolExecutionResult
  • isStartup, isICP
  • isLeanCanvas, isStoryBrand, isFounder

Factory Functions

  • createAgent(opts) - Create an AI agent
  • createHuman(opts) - Create a human worker

Installation (for internal packages)

pnpm add @org.ai/types

Usage (for internal packages)

import type {
  Thing,
  AgentType,
  HumanType,
  WorkflowContextType,
} from '@org.ai/types'

import { isAgent, createAgent } from '@org.ai/types'

Type Reference

| Type | Purpose | |------|---------| | AIFunctionType<TOutput, TInput, TConfig> | Generic AI function with output-first parameter order | | EventHandlerType<TOutput, TInput> | Workflow event handlers with typed context | | WorkflowContextType | The $ workflow proxy with send, try, do, on, every | | RelationshipOperatorType | Database relationship operators (->, ~>, <-, <~) | | ParsedFieldType | Schema field definitions with relationship metadata |

Why Output-First Generics?

Just like Promise<T> puts the important part first, AIFunctionType<TOutput> leads with what matters most:

// Natural reading order: "an AI function that returns a Summary"
type Summarizer = AIFunctionType<Summary>

// vs the awkward alternative
type Summarizer = AIFunctionType<Document, Summary>  // Wait, which is which?

License

MIT