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

@afps-spec/schema

v1.4.0

Published

Machine-readable representation of the AFPS specification. The specification text ([spec.md](../../spec.md)) is the normative source.

Readme

AFPS JSON Schemas

Machine-readable representation of the AFPS specification. The specification text (spec.md) is the normative source.

npm package

This directory is published as @afps-spec/schema on npm. Implementations can import the Zod schemas and extend them:

import { agentManifestSchema } from "@afps-spec/schema";

const myAgentSchema = agentManifestSchema.extend({
  "x-custom-field": z.string().optional(),
});

JSON Schema generation

When generating JSON Schema files from AFPS Zod schemas, use the exported afpsJsonSchemaOverride to ensure input.schema, output.schema, and config.schema fields reference the official JSON Schema 2020-12 meta-schema:

import { toJSONSchema } from "zod/v4/core";
import { agentManifestSchema, afpsJsonSchemaOverride } from "@afps-spec/schema";

const jsonSchema = toJSONSchema(agentManifestSchema, {
  target: "draft-2020-12",
  override: afpsJsonSchemaOverride,
});

Without the override, these fields serialize as opaque {} objects because the AJV meta-schema validation cannot be represented by Zod's toJSONSchema() alone.

Versioned schemas

Schemas are organized by major version:

schema/
├── v1/                   ← AFPS v1.x schemas
│   ├── agent.schema.json
│   ├── skill.schema.json
│   ├── tool.schema.json
│   └── provider.schema.json
├── src/
│   ├── schemas.ts        ← Zod source (generates v1/)
│   ├── generate.ts       ← Generation script
│   └── index.ts          ← npm entry point
└── package.json          ← @afps-spec/schema

URLs follow the pattern https://afps.appstrate.dev/packages/schema/v1/<type>.schema.json.

Schema validation

AFPS schema fields (input.schema, output.schema, config.schema) accept any valid JSON Schema 2020-12 document, with two AFPS-specific constraints:

  • The root type MUST be "object"
  • The root MUST have a properties key

Runtime validation is performed by AJV against the official JSON Schema 2020-12 meta-schema. The generated .schema.json files express this via allOf combining a $ref to the meta-schema with the AFPS constraints.

Regenerating

After modifying the Zod source in src/schemas.ts:

cd schema && bun install && bun run generate

Usage in manifests

Reference a schema using $schema for editor validation:

{
  "$schema": "https://afps.appstrate.dev/packages/schema/v1/agent.schema.json",
  "schemaVersion": "1.0",
  "name": "@scope/my-agent",
  "version": "1.0.0",
  "type": "agent"
}

Implementations may extend these schemas with additional fields using the x- prefix convention (see spec §10).