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

@begryp/blog-automation-core

v0.2.9

Published

Core orchestrator, Zod contracts, and hexagonal ports for the Begryp blog automation engine.

Readme

@begryp/blog-automation-core

Framework-agnostic domain engine for autonomous blog generation, quality gate evaluation, deduplication, and stage checkpointing.

Features

  • Zod Domain Contracts: Pure schema definitions for Tenants, Topics, Drafts, QA Reports, and Runs.
  • LLM Provider Adapters: OpenAIClient, AnthropicClient, GoogleGeminiClient, and OpenAICompatibleClient implementing the LLMClient port with transient-error retry (max 3, exponential backoff), Zod-validated structured output, and invalid-output retry with the validation error appended to the prompt. API keys are never logged or included in error messages.
  • LLMDrafter: Drafts and revises posts via versioned prompts from @begryp/blog-automation-prompts, validated against DraftPostSchema.
  • TopicSource Implementations: LLMTopicSource (proposes topics via LLM, hydrates full Topic objects) and StaticTopicSource (host-provided list for provided/import modes).
  • createEngineFromSettings: One-call wiring factory that selects the provider client, builds the drafter/topic source, and returns a configured AutomationEngine from a tenant profile and host adapters.
  • Pure QA Rule Registry: Deterministic SEO rules (meta limits, banned phrases, alt text, internal links), GEO rules (summary, citations, direct answers), and Risk rules (YMYL medical claims).
  • Topic Deduplication: Jaccard similarity engine with strict tenant isolation (rejection threshold) and cross-tenant duplicate flagging.
  • Stage-Checkpointing Orchestrator: Idempotent state machine with pause/resume, automatic revision loop (max 1), and YMYL safety enforcement.
  • Safety Invariants: Enforced in code and schema (1 post/day ceiling, YMYL review mandate, keyRef security).

Usage

Quick wiring (recommended)

import { createEngineFromSettings } from '@begryp/blog-automation-core';

const engine = createEngineFromSettings({
  tenant,                          // TenantProfile
  apiKey: await keyVault.resolveKey(tenant.llm.keyRef),
  publisher: payloadPublisher,     // Publisher port adapter
  runStore: payloadRunStore,       // RunStore port adapter
  keyVault: payloadKeyVault        // KeyVault port adapter
});

const run = await engine.runPipeline(tenant);

Manual wiring

import {
  AnthropicClient,
  LLMDrafter,
  LLMTopicSource,
  DefaultClock,
  DefaultIdGenerator,
  DefaultQAGate,
  AutomationEngine
} from '@begryp/blog-automation-core';

const idGen = new DefaultIdGenerator();
const llm = new AnthropicClient({ apiKey, model: 'claude-sonnet-4-20250514' });

const engine = new AutomationEngine({
  topicSource: new LLMTopicSource({ llm, idGen }),
  drafter: new LLMDrafter({ llm }),
  qaGate: new DefaultQAGate(),
  publisher,
  runStore,
  keyVault,
  clock: new DefaultClock(),
  idGen
});