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

@avocadostudio-ai/orchestrator-core

v0.21.1

Published

Core Avocado Studio orchestrator — session state, AI planning, operations engine, publishing

Readme

@avocadostudio-ai/orchestrator-core

The Avocado Studio orchestrator as a library: session state, AI planning, the operations engine, and publishing, behind one Web-standard (Request) => Promise<Response>.

This is the package library mode is built on. If you are integrating a Next.js site you almost certainly want @avocadostudio-ai/site-sdk instead — it re-exports everything below from @avocadostudio-ai/site-sdk/server and adds the Next-specific pieces (draft mode, the page factory, the editor API route). Reach for this package directly only when your host is not Next.

Install

npm install @avocadostudio-ai/orchestrator-core

better-sqlite3 is a real dependency, not optional: session state — draft pages, undo/redo, the version log, chat history — lives in SQLite. Prebuilt binaries ship for linux-x64 (glibc 2.28+), darwin-arm64 and darwin-x64 on Node 22.

Two peers are optional: googleapis and @google/genai. They are reached through await import(...) so a deployment that uses neither need not install them — but a bundler resolves dynamic imports statically and will fail the build over a package that is deliberately absent. Mark them external. On Next, withAvocado from @avocadostudio-ai/site-sdk/next-config does it for you.

Mount it

import { createOrchestrator } from "@avocadostudio-ai/orchestrator-core"

const handler = createOrchestrator({
  basePath: "/api/avocado",
  adapter: myAdapter,
  auth: async (request) => Boolean(await getSession(request)),
})

// Any host that speaks Request/Response
export { handler as GET, handler as POST, handler as OPTIONS }

createOrchestrator gates every route. With neither an auth hook nor a credential (ACCESS_PASSWORD_HASH or ORCHESTRATOR_ACCESS_TOKEN) it refuses all requests under NODE_ENV=production rather than serving your content openly. Only /auth/status and /auth/verify are public.

The adapter

adapter is your content store. SQLite is the working copy; the adapter is the source of truth, read on a cold session and written on publish.

import type { CmsAdapter } from "@avocadostudio-ai/orchestrator-core/cms"

const myAdapter: CmsAdapter = {
  id: "my-cms",
  perspectives: true,                       // does getPages honour options.perspective?
  getPages: (options) => fetchPages(options),
  onPublish: (pages, config, context) => writeBack(pages, context?.published),
  capabilities: { createPage: false },      // static — /whoami answers it offline
}

jsonFileAdapter and editorApiAdapter are bundled from the same subpath. The full contract — including why perspectives defaults to no while capabilities default to yes, and why onPublish has to diff rather than overwrite — is documented in the site-sdk README.

What it does not do

It serves the API. It does not serve the editor UI — that is @avocadostudio-ai/cli or your own deployment of the Studio — and it does not render your pages.

/health is not a route, so a client that probes it to check compatibility gets a 405. The body lists every route that does exist.

Persistence

| variable | meaning | |---|---| | ORCHESTRATOR_DB_FILE | Path to the SQLite file. Empty for the default; :memory: to force ephemeral. Auto-:memory: under NODE_ENV=test | | ORCHESTRATOR_DB_BACKUP_INTERVAL_HOURS | Periodic VACUUM INTO snapshot interval (default 24) | | ORCHESTRATOR_DB_BACKUP_LIMIT | Rolling snapshots to keep (default 14) |

Undo/redo is capped at 50 entries per slug per direction, the version log at 100, recent edits at 10, chat history at 6 messages.

Providers

At least one of ANTHROPIC_API_KEY, OPENAI_API_KEY or GOOGLE_GENAI_API_KEY is required for planning. Keys never leave the process that holds them.

License

Apache-2.0