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

@techs/dsh-decision-openai

v0.2.2

Published

OpenAI Decisions API judgment provider for dsh and pi

Readme

@techs/dsh-decision-openai

English | 简体中文

An OpenAI Decisions API provider for @techs/dsh-decision. It calls POST /v1/decisions and maps the native predicate, choice and score answers to the core's binary, categorical and ordinal judgments. This implementation follows the API reference.

The API is generally available (GA) and supports gpt-6-luna. This package carries no calibration qualification for automatic approval. Jev's risk thresholds need separate evaluation on OpenAI before enforcement.

| Setting | Default | Purpose | | ----------- | --------------------------- | --------------------------------------------------------------- | | baseUrl | https://api.openai.com/v1 | Versioned API root; appends /decisions | | apiKey | None | Literal key; takes precedence over the environment | | apiKeyEnv | OPENAI_API_KEY | Environment variable holding the key | | model | gpt-6-luna | Decisions model; availability is determined by the endpoint | | timeoutMs | 8000 | Covers request and response body; align with the core's timeout |

From a checkout, build first and install the two local bundles into a dsh profile:

pnpm install
pnpm run build
export OPENAI_API_KEY=your_openai_key
dsh plugin --profile web add ./packages/decision ./packages/decision-openai
dsh web

The OpenAI bundle must follow the core bundle. It selects provider: openai, enforcement: shadow and permission: native. dsh patches replace a row's entire config; put your full custom decision configuration in the profile's later patch. Installing into an existing Jev profile leaves its Jev plugin loaded and still requiring its key; disable or remove that plugin if it is no longer used. The repository's existing example profile continues to use Jev. For registry installation, use version 0.2.1 or newer of both the core and adapter.

The ./provider and ./spec exports have no Cordis or Schemastery runtime imports:

import { createOpenAIProvider } from "@techs/dsh-decision-openai/provider";
import { resolveOpenAIConfig } from "@techs/dsh-decision-openai/spec";

const provider = createOpenAIProvider(resolveOpenAIConfig({}));
const result = await provider.evaluate({
  state: "Please cancel my subscription.",
  questions: {
    cancellation: { kind: "binary", instructions: "Does the customer request cancellation?" },
  },
});
console.log(result.answers.cancellation);

Binary criteria are appended to predicate instructions. Category descriptions become choice descriptions; ordinal rubric strings become level labels. Probability arrays are mapped to records, and fractional expected scores and separate confidence values are preserved. Missing, duplicate, unexpected or refused answers fail the whole batch, as do invalid probabilities, incomplete distributions, or scores inconsistent with their distributions. Distribution sums tolerate rounding up to 0.001; values are not normalized. Requested and actual model identities stay separate.

The current host contract supplies JSON/text state. It is sent as text, not native image parts. Host integrations apply their existing outbound redaction; standalone callers must prepare their own state. Calls use cancellation and a total timeout, without automatic retries. Errors expose status or structural diagnostics, without provider error bodies or state text.

For Pi, use the updated extension from this checkout:

export PI_DECISION_PROVIDER=openai
export OPENAI_API_KEY=your_openai_key
pi -e ./packages/pi-decision

See integration and verification for configuration and validation limits.