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

@ngotrnghia1811/opencode-windsurf-auth

v0.1.2

Published

OpenCode plugin — Level-2 Connect-RPC provider for Windsurf/Cascade models via Devin CLI credentials

Readme

opencode-windsurf-auth

OpenCode plugin providing a Level-2 Connect-RPC provider for Windsurf/Cascade models (Claude, GPT, Gemini, Grok, DeepSeek, and more) via the Devin CLI credentials flow.

Warning: This plugin comes with no guarantees. You might be banned for breaking the Windsurf/Devin Terms of Service. Use at your own risk.

What This Plugin Does

  1. Reads the Windsurf JWT from ~/.local/share/devin/credentials.toml (stored by the Devin CLI after devin /login).
  2. Authenticates against Codeium's HTTP/2 Connect-RPC endpoint (server.codeium.com/exa.api_server_pb.ApiServerService/GetChatMessage).
  3. Provides a full LanguageModelV3 implementation (createWindsurf) so opencode can use Windsurf models through its standard provider SDK.
  4. Registers ~130+ models (Claude Opus/Sonnet/Haiku, GPT-5.x, Gemini 3.x, Grok, DeepSeek, Kimi, GLM, MiniMax, SWE, and Windsurf-native models).

Prerequisites

  • Devin CLI installed and authenticated:
    devin /login
  • mitmproxy (specifically mitmdump) for the thinking-proxy fallback path. Install via pip/brew:
    pip install mitmproxy
  • Bun >= 1.3.14
  • OpenCode with plugin support

Configuration

Add the plugin to your opencode.json:

{
  "plugin": ["file:///path/to/opencode-windsurf-auth/dist/index.js"]
}

Or for npm (once published):

{
  "plugin": ["opencode-windsurf-auth"]
}

Provider Registration

The provider SDK uses the providerID windsurf-devin-provider. The model entries in models.ts expose api.npm pointing to this package (via file:// for local dev, or the package name for published use).

The package exports both:

  • createWindsurf (named) — consumed by the provider SDK loader's create* key scan.
  • default export (V1 plugin){ id: "windsurf-auth", server: WindsurfPlugin } consumed by the plugin loader's readV1Plugin path.

These two consumers look at different slots on the module namespace and do not conflict.

Architecture

src/
├── index.ts              # Entry point: createWindsurf + V1 plugin default
├── windsurf-provider.ts  # LanguageModelV3 impl (doGenerate / doStream)
├── chat-client.ts        # HTTP/2 Connect-RPC streaming client
├── chat-request.ts       # Protobuf GetChatMessageRequest encoder
├── proto.ts              # Low-level varint/field/Connect-frame helpers
├── credentials.ts        # JWT loader from Devin CLI credentials.toml
├── models.ts             # ~130+ model definitions
└── thinking-proxy.ts     # mitmproxy-based fallback for reasoning/thinking

Transport

  • Primary path: Direct HTTP/2 to server.codeium.com via Bun's built-in ALPN-aware fetch().
  • Fallback path (thinking-aware): thinking-proxy.ts spawns mitmdump + devin -p and tails a JSONLines sink.

Development

bun install
bun typecheck       # type-check the source
bun run build       # compile to dist/
bun test            # run unit tests
bun run dev         # build + symlink into .opencode/plugins/ + watch

The bun run dev script creates a symlink at .opencode/plugins/windsurf-auth.jsdist/index.js so opencode can load the plugin via file:// while you iterate.

License

MIT