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

@tally-evals/core

v0.1.0

Published

Core types, configuration, and utilities for the Tally evaluation framework

Readme

@tally-evals/core

Core types, configuration, and utilities for the Tally evaluation framework.

Overview

This package provides the foundational building blocks for the tally ecosystem:

  • Shared Types — Canonical type definitions for the entire evaluation system
  • Configuration — Load tally.config.ts with type-safe defineConfig() helper
  • Storage — Unified IStorage interface with Local, S2, and Redis adapters
  • Codecs — Zod-based serialization for Conversation (JSONL) and Tally run artifacts (JSON)
  • Message Utilities — Tool call extraction and text extraction from ModelMessage
  • Conversion — Transform StepTrace[]Conversation for interop

Installation

bun add @tally-evals/core

Usage

Types

The core package exports all canonical type definitions:

import type {
  // Primitives
  MetricScalar,
  Score,
  DatasetItem,
  
  // Conversation types
  Conversation,
  ConversationStep,
  ModelMessage,
  
  // Trajectory types
  StepTrace,
  TrajectoryMeta,
  
  // Metric types
  MetricDef,
  SingleTurnMetricDef,
  MultiTurnMetricDef,
  Metric,
  
  // Aggregator types
  NumericAggregatorDef,
  BooleanAggregatorDef,
  CategoricalAggregatorDef,
  Aggregator,
  
  // Eval types
  Eval,
  SingleTurnEval,
  MultiTurnEval,
  ScorerEval,
  VerdictPolicy,
  
  // Run outputs
  TallyRunReport,
  TargetRunView,
  TallyRunArtifact,
  
  // Utility types
  ExtractedToolCall,
  NormalizerSpec,
  NormalizationContextFor,
} from '@tally-evals/core';

// Helper function
import { toScore } from '@tally-evals/core';

Configuration

// tally.config.ts
import { defineConfig } from '@tally-evals/core';

export default defineConfig({
  storage: {
    backend: 'local',
    path: '.tally',
  },
});

Storage

import { createStorage, LocalStorage } from '@tally-evals/core';

// Create from config
const storage = await createStorage(config);

// Or use directly
const localStorage = new LocalStorage();
await localStorage.write('path/to/file.json', JSON.stringify(data));

Message Utilities

import {
  extractToolCallsFromStep,
  extractTextFromMessage,
  hasToolCalls,
  getToolNames,
} from '@tally-evals/core';

const toolCalls = extractToolCallsFromStep(step);
const text = extractTextFromMessage(message);
const hasTools = hasToolCalls(step);
const toolNames = getToolNames(step);

Conversion

import {
  stepTracesToConversation,
  conversationToStepTraces,
} from '@tally-evals/core';

const conversation = stepTracesToConversation(stepTraces, 'conv-123');
const traces = conversationToStepTraces(conversation);

Storage Structure

Tally uses a unified storage structure under the .tally directory (or your configured path). Everything related to a conversation is stored in a single folder:

.tally/
└── conversations/
    └── <conversation-id>/
        ├── meta.json             # Basic conversation metadata
        ├── conversation.jsonl    # Canonical conversation history
        ├── trajectory.meta.json  # (Optional) Trajectory definition snapshot
        ├── stepTraces.json       # (Optional) Rich step-by-step traces
        └── runs/                 # Evaluation and run results
            ├── tally/            # Tally evaluation reports (.json)
            └── trajectory/       # Trajectory run metadata (.json)

Dependencies

  • Required: zod, ai (peer)
  • Optional: @s2-dev/streamstore (for S2 storage), ioredis (for Redis storage)

License

MIT