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

@tepa/core

v0.1.1

Published

Core pipeline engine for the Tepa autonomous agent

Readme

@tepa/core

Core pipeline engine for the Tepa autonomous agent framework. Contains the orchestrator, Planner, Executor, Evaluator, event bus, configuration, and prompt parsing.

Install

npm install @tepa/core

Usage

import { Tepa } from "@tepa/core";
import type { LLMProvider, ToolDefinition } from "@tepa/types";

const tepa = new Tepa({
  tools: [
    /* ToolDefinition objects */
  ],
  provider: myLLMProvider, // implements LLMProvider interface
  config: {
    limits: { maxCycles: 3, maxTokens: 20_000 },
  },
});

const result = await tepa.run({
  goal: "Create a TypeScript utility",
  context: { projectDir: "./src" },
  expectedOutput: "A working utility file with tests",
});

API

Tepa

The main orchestrator class.

new Tepa(options: TepaOptions)

TepaOptions:

  • tools: ToolDefinition[] — Tools available to the pipeline
  • provider: LLMProvider — LLM provider for all components
  • config?: DeepPartial<TepaConfig> — Configuration (merged with defaults)
  • events?: EventMap — Event hook callbacks

tepa.run(prompt: TepaPrompt): Promise<TepaResult>

Runs the full pipeline loop. Returns when the evaluator passes, max cycles are reached, or the token budget is exhausted.

defineConfig

Merges a partial config with sensible defaults:

import { defineConfig } from "@tepa/core";

const config = defineConfig({
  limits: { maxCycles: 10 },
  logging: { level: "verbose" },
});

parsePromptFile

Loads a prompt from a YAML or JSON file:

import { parsePromptFile } from "@tepa/core";

const prompt = await parsePromptFile("./prompts/task.yaml");

EventBus

The internal event execution engine (exposed for advanced usage):

import { EventBus } from "@tepa/core";
import type { EventMap } from "@tepa/types";

const bus = new EventBus(events);
const result = await bus.run("prePlanner", data, cycleMetadata);

Core Components

Individual components are exported for advanced usage (most users only need Tepa):

  • Planner — Generates execution plans from prompts
  • Executor — Executes plan steps using native tool calling and LLM reasoning
  • Evaluator — Judges execution results against expected output
  • Scratchpad — In-memory key-value store for cross-step state

Error Types

  • TepaError — Base error class
  • TepaConfigError — Invalid configuration
  • TepaPromptError — Invalid prompt
  • TepaToolError — Tool execution failure
  • TepaCycleError — Pipeline cycle failure
  • TepaTokenBudgetExceeded — Token budget exhausted

Configuration Defaults

{
  model: {
    planner: "claude-sonnet-4-20250514",
    executor: "claude-sonnet-4-20250514",
    evaluator: "claude-sonnet-4-20250514",
  },
  limits: {
    maxCycles: 5,
    maxTokens: 10_000,
    toolTimeout: 30_000,
    retryAttempts: 1,
  },
  logging: {
    level: "standard",
  },
}