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

@rayspec/adapter-codex

v1.8.0

Published

The OpenAI **Codex** adapter — the fourth backend, with full parity to the openai/anthropic/pi adapters. Maps the neutral `Backend` interface onto `@openai/codex-sdk` (pinned).

Readme

@rayspec/adapter-codex

The OpenAI Codex adapter — the fourth backend, with full parity to the openai/anthropic/pi adapters. Maps the neutral Backend interface onto @openai/codex-sdk (pinned).

Part of RaySpecfile-deployable AI infrastructure: describe a product's backend in one declarative YAML file, and RaySpec stands up accounts and authentication, in-process agents, an HTTP API, a Postgres-backed data layer, durable background jobs, and the supporting tooling — deployed GitOps-style from that single file.

Most projects consume this package indirectly — start with npx rayspec init or @rayspec/server rather than depending on it directly.

Cancellation

Cancelling a run aborts the signal on the run context. This adapter links that signal to the AbortController it hands to the SDK's streamed turn, so the streamed turn is aborted and the spawned codex child is signalled. Once that turn ends, the teardown of the in-process MCP tool bridge is bounded: it no longer waits on connections that outlive the turn. What that does not cover:

  • The child is signalled, not killed — and if it does not die, the run does not end. The SDK spawns with { signal } and no killSignal, so aborting sends a single SIGTERM and nothing escalates; it then drives the turn with a readline loop over the child's stdout. A child that ignores SIGTERM keeps that stdout open, so the loop never ends, backend.run() never returns, and its teardown — the bounded bridge close included — never runs at all. This is measured, not assumed: src/cancel.integration.test.ts pins it with a stand-in executable that installs an empty SIGTERM handler. The bounded teardown fixes a hang after the turn ends; it cannot rescue a run whose child refuses to exit.
  • Processes the codex child itself spawned are not signalled and can be left orphaned.
  • Whether the real codex CLI exits on that signal and reaps its own children is not verified here. The cancellation tests drive the real SDK against a stand-in executable, so the points above are stated as limits rather than measured against the shipped CLI.
  • A run already executing in a separate worker process receives no in-process signal by default; setting RAYSPEC_RUN_CANCEL_POLL_MS makes that process re-read the cancellation record and raise the abort itself, which is the signal this adapter acts on. Both behaviours are shared by all four backends.
  • A tool call already in flight is not interrupted, and work already committed upstream is not undone.

Links

License

Source-available under the Functional Source License (FSL-1.1-ALv2) — each release converts to Apache-2.0 two years after publication. See LICENSE.