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

@endevre/entry-on-kitchen

v0.3.2

Published

Official JavaScript/TypeScript library for Entry on Kitchen API

Downloads

18

Readme

@endevre/entry-on-kitchen

Official JavaScript/TypeScript library for executing recipes on the Entry on Kitchen API. Supports both synchronous execution and real-time HTTP streaming.

npm version

Installation

npm install @endevre/entry-on-kitchen
yarn add @endevre/entry-on-kitchen
pnpm add @endevre/entry-on-kitchen

Quick Start

import { KitchenClient } from "@endevre/entry-on-kitchen";

// Initialize the client
const client = new KitchenClient({
  authCode: "your-auth-code-here",
  entryPoint: "entry", // or "beta", "raydev", etc.
});

// Synchronous execution
const result = await client.sync({
  recipeId: "your-recipe-id",
  entryId: "your-entry-id",
  body: { message: "Hello, Kitchen!" },
});

console.log(result);

KitchenClient Class

Constructor

new KitchenClient(config: KitchenClientConfig)

Parameters:

  • authCode (string, required): Your X-Entry-Auth-Code for authentication
  • entryPoint (string, optional): Entry point environment. Defaults to "entry" (production)

Throws:

  • Error if authCode is not provided

Methods

sync(params)

Execute a recipe synchronously and wait for the complete result.

Parameters:

  • recipeId (string): The ID of the pipeline/recipe
  • entryId (string): The ID of the entry block
  • body (unknown): Request body data (object or JSON string)
  • useKitchenBilling (boolean, optional): Enable Kitchen billing
  • llmOverride (string, optional): Override the LLM model (e.g., "gpt-4", "claude-3")
  • apiKeyOverride (object, optional): Override API keys for external services

Returns: Promise<KitchenResponse>

const result = await client.sync({
  recipeId: "abc123",
  entryId: "def456",
  body: {
    message: "Hello!",
    provider: "google_genai",
    model: "gemini-2.5-flash",
  },
});

if (result._statusCode && result._statusCode !== 200) {
  console.error("Error:", result.error);
} else {
  console.log("Success:", result.result);
}

stream(params)

Execute a recipe with real-time streaming. Yields events as they arrive.

Parameters:

  • recipeId (string): The ID of the pipeline/recipe
  • entryId (string): The ID of the entry block
  • body (unknown): Request body data
  • useKitchenBilling (boolean, optional): Enable Kitchen billing
  • llmOverride (string, optional): Override the LLM model (e.g., "gpt-4", "claude-3")
  • apiKeyOverride (object, optional): Override API keys for external services

Returns: AsyncIterable<StreamEvent>

Event Types:

  • "progress": Execution progress updates
  • "result": Output data from blocks
  • "delta": Incremental content updates (for streaming LLM responses)
  • "info": Informational messages
  • "end": Final result (marks completion)
for await (const event of client.stream({
  recipeId: "abc123",
  entryId: "def456",
  body: { message: "Tell me a joke" },
})) {
  const { type, data, socket } = event;

  if (type === "progress") {
    console.log(`Progress: ${data.blockPosition}/${data.blocksToExitBlock}`);
  } else if (type === "result") {
    console.log(`Result from ${socket}:`, data);
  } else if (type === "delta") {
    console.log(`Delta update for ${socket}:`, data);
  } else if (type === "end") {
    console.log("Complete!", data);
  }
}

Environment Configuration

Production

const client = new KitchenClient({
  authCode: "your-auth-code",
  entryPoint: "entry", // Uses https://entry.entry.on.kitchen
});

Beta

const client = new KitchenClient({
  authCode: "your-auth-code",
  entryPoint: "beta", // Uses https://beta.entry.on.kitchen
});

Custom Environment

const client = new KitchenClient({
  authCode: "your-auth-code",
  entryPoint: "raydev", // Uses https://raydev.entry.on.kitchen
});

Optional Features

Kitchen Billing

Enable Kitchen billing for your recipe execution:

const result = await client.sync({
  recipeId: "abc123",
  entryId: "def456",
  body: { message: "Hello!" },
  useKitchenBilling: true,
});

LLM Model Override

Override the LLM model used in your recipe:

const result = await client.sync({
  recipeId: "abc123",
  entryId: "def456",
  body: { message: "Write a poem" },
  llmOverride: "gpt-4",
});

// Or with streaming
for await (const event of client.stream({
  recipeId: "abc123",
  entryId: "def456",
  body: { message: "Write a poem" },
  llmOverride: "claude-3",
})) {
  // Handle events
}

Combining Options

You can use both options together:

const result = await client.sync({
  recipeId: "abc123",
  entryId: "def456",
  body: { message: "Hello!" },
  useKitchenBilling: true,
  llmOverride: "gpt-4",
});

TypeScript Support

This library is written in TypeScript and includes full type definitions:

import type {
  KitchenClientConfig,
  KitchenResponse,
  SyncParams,
  StreamParams,
  StreamEvent,
  StreamEventType,
} from "@endevre/entry-on-kitchen";

Error Handling

import { KitchenClient } from "@endevre/entry-on-kitchen";

const client = new KitchenClient({
  authCode: "your-auth-code",
});

try {
  const result = await client.sync({
    recipeId: "abc123",
    entryId: "def456",
    body: { message: "Hello!" },
  });

  // Check for error response
  if (result._statusCode && result._statusCode !== 200) {
    console.error("Request failed:", result.error);
    return;
  }

  console.log("Success:", result.result);
} catch (error) {
  console.error("Unexpected error:", error);
}

Migration from v0.2.x

Version 0.3.0 is a breaking change from v0.2.x. See MIGRATION.md for detailed migration instructions.

Quick Migration

Before (v0.2.x):

import { EntryBlock } from "entry-on-kitchen";

const entry = new EntryBlock({
  pipelineId: "abc123",
  entryBlockId: "def456",
  entryAuthCode: "your-auth-code",
  entryPoint: "beta",
});

const result = entry.runSync({ message: "Hello!" });
const result = await entry.runAsync({ message: "Hello!" });

After (v0.3.0):

import { KitchenClient } from "@endevre/entry-on-kitchen";

const client = new KitchenClient({
  authCode: "your-auth-code",
  entryPoint: "beta",
});

const result = await client.sync({
  recipeId: "abc123",
  entryId: "def456",
  body: { message: "Hello!" },
});

// Or with streaming
for await (const event of client.stream({
  recipeId: "abc123",
  entryId: "def456",
  body: { message: "Hello!" },
})) {
  // Handle events
}

Requirements

  • Node.js 18 or higher
  • Browser with native fetch support (or use a polyfill)

License

ISC

Support

For issues and questions: [email protected]