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

opencode-cursor-inference

v0.0.1

Published

Unofficial Cursor managed inference provider for OpenCode over InferenceService/RunInference.

Readme

OpenCode Cursor Inference

Unofficial OpenCode plugin and AI SDK provider for Cursor managed inference over aiserver.v1.InferenceService/RunInference.

Cursor supplies model inference and routing. OpenCode remains the agent host: it owns the complete message history, arbitrary tool schemas, tool execution, continuation, sessions, branching, compaction, and transcript.

[!WARNING] This project is not affiliated with or endorsed by Cursor, Anysphere, or OpenCode. It uses an undocumented Cursor service reconstructed from public product evidence. The service can change without notice. Review Cursor's terms and your subscription before use.

Status

Source is public at victor-software-house/opencode-cursor-inference. The package is released through a Changesets-managed public npm pipeline with OIDC trusted publishing.

Verified compatibility target: OpenCode 1.18.27, Node.js 24 or later, and Bun 1.4 for development.

Architecture

OpenCode transcript + tools
          |
          v
AI SDK LanguageModelV3 provider
          |
          v
Cursor RunInference over HTTP/2 Connect
          |
          v
text · reasoning · tool-call · usage stream
          |
          v
OpenCode executes tools and continues with results

The provider does not execute Cursor-native tools, project MCP servers, shell commands, or an agent loop. Unsupported request controls and response capabilities fail closed.

Installation

Add the plugin to opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-cursor-inference"]
}

Then authenticate:

opencode auth login

Select Cursor and complete browser sign-in. OpenCode stores the OAuth credential through its own auth contract. This package does not maintain a credential database or secret store.

Restart OpenCode after first sign-in so the provider can load the newly discovered model catalog. Select a model with /models or configure it as cursor/<model-id>.

Behavior

  • Discovers models by joining Cursor's AvailableModels, GetUsableModels, and GetDefaultModelForCli responses.
  • Advertises reasoning, images, context limits, and Max mode only when catalog metadata supports them.
  • Caches only non-secret model metadata under OpenCode's cache directory for ten minutes.
  • Derives Cursor's machine identity from the host. A random UUID is persisted in OpenCode's cache directory only when host derivation fails.
  • Uses OpenCode's x-session-affinity or X-Session-Id request header as the stable managed-run conversation identity.
  • Preserves reasoning signatures in AI SDK provider metadata for stateless transcript replay.
  • Reuses account-scoped HTTP/2 sessions and closes them when OpenCode disposes the plugin.

Development

bun install --frozen-lockfile
mise install --locked
mise run verify

mise run verify runs generation checks, strict type checking, Biome, oxlint, deterministic unit and protocol tests, a build, package checks, and an isolated OpenCode 1.18.27 smoke test.

The smoke test:

  • creates temporary HOME and XDG directories and removes them automatically;
  • loads the built Cursor plugin and a seeded non-secret model cache;
  • verifies that OpenCode lists the Cursor fixture model;
  • uses a deterministic local fixture provider to emit a read tool call;
  • proves OpenCode executes the tool and continues with the tool result; and
  • never contacts Cursor's inference endpoint.

No live Cursor call is part of the default test suite. Do not add paid or authenticated live calls to CI.

Security and privacy

The package sends the complete provider prompt, declared tool schemas, tool results, and supported image inputs to Cursor for inference. OpenCode executes tool calls locally according to its permission configuration. Treat both your OpenCode permissions and Cursor account as security boundaries.

Credentials remain in OpenCode's auth store. Tests and fixtures must never contain credentials, account identifiers, machine identifiers from a real host, billing data, or private source material.

Scope

The first slice intentionally excludes Cursor AgentService/Run, Cursor-native tool execution, MCP projection, usage dashboards, and host-specific UI. See decisions for the durable boundary and research for evidence classes.

License

MIT.

See LICENSE.