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

@fdekit/core

v0.5.3

Published

Core types and helper functions for FDEKit

Readme

@fdekit/core

Purpose

@fdekit/core is the authoring contract for FDEKit deployments. It contains the TypeScript helpers and types used in fde.config.ts: deployments, agents, tools, connectors, providers, governance, evals, harnesses, recipes, workflow metadata, rollout metadata, schema helpers, policy helpers, provider-planner contracts, and the review findings contract (spec).

Use core when you are describing what a deployment is. Do not put runtime file I/O, artifact persistence, CLI behavior, or provider HTTP calls here.

Who should use this package

  • Deployment authors writing fde.config.ts.
  • Connector and provider authors who need shared FDEKit contracts.
  • Contributors changing public config shapes, policy helpers, eval assertions, or tool schema helpers.

Choose @fdekit/runtime instead when you need to load configs, run agents, write artifacts, or inspect traces. Choose @fdekit/cli when you only need the command-line workflow.

5-minute quick example

import {
  defineAgent,
  defineDeployment,
  defineEval,
  expectedApprovalOutcome,
  expectedFinalAnswer,
  expectedToolCall,
  providerFromEnv,
} from '@fdekit/core';

const provider = providerFromEnv();

export default defineDeployment({
  name: 'support-triage',
  environment: 'local',
  providers: {
    [provider.name]: provider,
  },
  agents: {
    supportTriage: defineAgent({
      provider: provider.name,
      instructions: './agents/support-triage.md',
    }),
  },
  evals: [
    defineEval({
      name: 'answers-support-request',
      agent: 'supportTriage',
      dataset: './evals/support-triage.json',
      assertions: [
        expectedToolCall('ticket.get'),
        expectedFinalAnswer(/support|ticket/i),
      ],
    }),
  ],
});

Approval feedback assertions

expectedApprovalOutcome() consumes the expected.toolName and expected.shouldProceed fields written by fdekit feedback export. It passes when an approved tool is observed, or when a rejected tool is absent:

defineEval({
  name: 'approval-feedback',
  agent: 'supportTriage',
  dataset: './artifacts/feedback/eval-cases.json',
  assertions: [expectedApprovalOutcome()],
})

Rubric judges

judgeRubric is a bring-your-own-judge assertion. FDEKit does not automatically call the deployment provider or ship a built-in LLM judge. Pass a judge function that returns an EvalAssertionResult; fdekit validate reports an error when the function is missing.

import { judgeRubric } from '@fdekit/core';

const answerQuality = judgeRubric({
  rubric: 'The answer is accurate, polite, and complete.',
  async judge(context, rubric) {
    // Call the model or deterministic judge selected for your eval environment.
    const passed = Boolean(context.finalAnswer?.includes('please'));

    return {
      passed,
      score: passed ? 1 : 0,
      message: passed ? `Passed: ${rubric}` : `Failed: ${rubric}`,
    };
  },
});

S3 artifact storage

S3 storage uses an injected client so FDEKit does not require the AWS SDK. The client field is required and must implement putObject, getObject, and listObjectsV2. @fdekit/core exports S3ArtifactClient and the related input/output types for custom AWS, MinIO, LocalStack, or enterprise adapters.

import { defineDeployment, type S3ArtifactClient } from '@fdekit/core';
import {
  GetObjectCommand,
  ListObjectsV2Command,
  PutObjectCommand,
  S3Client,
} from '@aws-sdk/client-s3';

const s3 = new S3Client({ region: process.env.AWS_REGION });

const artifactsClient: S3ArtifactClient = {
  putObject: (input) => s3.send(new PutObjectCommand(input)),
  getObject: (input) => s3.send(new GetObjectCommand(input)),
  listObjectsV2: (input) => s3.send(new ListObjectsV2Command(input)),
};

export default defineDeployment({
  // providers and agents...
  artifacts: {
    kind: 's3',
    bucket: 'fdekit-artifacts',
    client: artifactsClient,
  },
});

Public API surface

Import from the package root:

import { defineDeployment, defineTool, objectArgs } from '@fdekit/core';

The API reference documents all public root exports, including defineDeployment, defineAgent, providerFromEnv, defineConnector, defineTool, defineEval, objectArgs, policy helpers, eval assertions, and public config/provider/tool types: Core API Reference.

Stability/backward-compat notes

@fdekit/core is public but pre-1.0. Package-root exports are the compatibility boundary. Subpath imports from src, dist, helpers, or interfaces are internal and may change without a public migration note.

Breaking changes to core types or helper behavior should update the API reference and relevant cookbooks because deployment configs depend on this package.

See also