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

@veyorhq/openai

v0.2.0

Published

OpenAI API and Codex CLI workers for Veyor actors.

Downloads

418

Readme

@veyorhq/openai

@veyorhq/openai provides OpenAI-backed implementations for Veyor actors.

It exposes two separate adapters:

  • @veyorhq/openai/openai creates an Effect AI model layer for @veyorhq/ai-effect.
  • @veyorhq/openai/codex runs a Veyor actor through the local Codex CLI.

[!IMPORTANT] This package is under active development. It is private, remains at 0.0.0, and is not published to a package registry.

OpenAI API

Use openai(model) with agent(...) when the actor should call the OpenAI API through Effect AI.

import { agent } from "@veyorhq/ai-effect";
import { openai } from "@veyorhq/openai/openai";
import { Writer } from "./actors.js";

const WriterImpl = agent(Writer, openai("gpt-4o-mini"), {
  prompt: "Return a concise implementation plan.",
});

The adapter reads OPENAI_API_KEY through Effect Config. Missing or invalid configuration fails when the model layer is used.

Codex CLI

Use codex(actor, model, options) when a Codex task should implement the actor.

import { codex } from "@veyorhq/openai/codex";
import { Planner } from "./actors.js";

const PlannerImpl = codex(Planner, "gpt-5.6-sol", {
  effort: "xhigh",
  cwd: process.cwd(),
  sandbox: "workspace-write",
  instructions: "Plan the assignment. Do not edit files.",
});

The adapter:

  1. converts the actor output contract to JSON Schema;
  2. writes that schema to a scoped temporary directory;
  3. runs codex exec with structured output enabled;
  4. parses and validates the final JSON value;
  5. passes the Veyor task's abort signal into the Effect runtime.

Options

| Option | Purpose | | -------------- | ------------------------------------------------------------------- | | effort | Sets Codex model reasoning effort. | | verbosity | Sets model verbosity. | | instructions | Adds package- or actor-specific instructions before the assignment. | | cwd | Sets the Codex working directory. | | sandbox | Selects read-only, workspace-write, or danger-full-access. |

The Codex executable must be installed, authenticated, and available on PATH. The adapter defaults to the workspace-write sandbox; choose a narrower sandbox when the actor does not need writes.

When several actors share the same model and effort, capture that once with codex.preset(...) instead of repeating it per actor:

import { codex } from "@veyorhq/openai/codex";
import { Planner } from "./actors.js";

const planWorker = codex.preset({
  model: "gpt-5.6-sol",
  effort: "xhigh",
  sandbox: "workspace-write",
});

const PlannerImpl = planWorker(Planner, {
  instructions: "Plan the assignment. Do not edit files.",
});

codex.preset is sugar over codex — per-call options (including model) shallow-merge over the preset, with the per-call value winning.

Current limits

  • Both adapters require output contracts that can produce JSON Schema.
  • Codex aggregation currently returns an empty placeholder.
  • The OpenAI model adapter inherits the unfinished aggregation support from @veyorhq/ai-effect.
  • Retry, fallback, and budget policy belong to the workflow and are not added by this package.

See @veyorhq/ai-effect, @veyorhq/core, and the software factory example.