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

@agentproto/corpus-presets

v0.1.1

Published

@agentproto/corpus-presets — catalog of starter workspaces for the AIP-10 corpus runtime. Subpath exports per vertical (marketing, sales, …). Each preset is pure TS data — host iterates `files` and writes via FsPort. Mirrors @agentproto/role-catalog.

Readme

@agentproto/corpus-presets

Catalog of starter workspaces for the AIP-10 corpus runtime. Subpath exports per vertical — pure TS data, no filesystem dependency. Host iterates files and writes via FsPort.

Discovery

The corpus CLI discovers presets via the agentproto/corpus-preset/v1 manifest declared in this package's package.json#agentproto-corpus-preset. Third-party packages following the same convention can be added to the discovery set via corpusPresetPackages[] in ~/.agentproto/config.json.

Direct usage

import { MarketingCorpusPreset } from "@agentproto/corpus-presets/marketing"

for (const [rel, content] of Object.entries(MarketingCorpusPreset.files)) {
  await fs.writeFile(path.join(workspaceRoot, rel), content)
}

Or via the CLI, which uses the manifest to resolve the slug:

corpus init marketing ./my-corpus
corpus init --list                  # show every discoverable preset

Source of truth

The fixture dir at @agentproto/corpus/test/fixtures/<slug>/ is the single source of truth. The TS file src/<slug>/files.ts is a build artifact — gitignored, regenerated by this package's prebuild / precheck-types / pretest / predev hooks. The conformance test enforces those .md files validate against the actual AgentProto JSON Schemas, so what ships here is always AIP-conformant by construction.

To edit a preset:

  1. Edit packages/corpus/test/fixtures/<vertical>/...
  2. Run pnpm --filter @agentproto/corpus test to confirm conformance still holds
  3. Build (or check-types, or test) the preset — the regen runs automatically: pnpm --filter @agentproto/corpus-presets build

The standalone pnpm gen:marketing script still exists for explicit regen but isn't needed in the normal flow.

Adding a new vertical to this package

  1. Add fixtures: packages/corpus/test/fixtures/<slug>/
  2. Extend packages/corpus/src/__tests__/conformance.test.ts to cover them
  3. Copy scripts/gen-marketing.mjsscripts/gen-<slug>.mjs
  4. Add gen-<slug> to each pre-hook in package.json (or fold it into a single bootstrap script that runs all generators)
  5. Add src/<slug>/index.ts exporting <Slug>CorpusPreset: CorpusPreset
  6. Add ./<slug> subpath to package.json#exports
  7. Add "<slug>/index" entry to tsup.config.ts
  8. Append an entry to package.json#agentproto-corpus-preset.presets[] with the slug + entry + export
  9. Add the generated file to the root .gitignore

Shipping a preset from a third-party package

Create your own npm package (@vendor/corpus-presets, <name>-corpus-presets, …) and add the same manifest block to its package.json:

{
  "agentproto-corpus-preset": {
    "schema": "agentproto/corpus-preset/v1",
    "presets": [
      { "slug": "<your-slug>", "entry": "./dist/index.mjs", "export": "<YourPreset>" }
    ]
  }
}

Then point the CLI at it:

// ~/.agentproto/config.json
{
  "corpusPresetPackages": [
    "@agentproto/corpus-presets",
    "@vendor/corpus-presets"
  ]
}

corpus init --list will show every discovered preset.