cline

command
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Command cline builds the CPA c-shared plugin library for Cline.

Both files in this directory are package main: main.go carries the exported cgo ABI and plugin.go carries the abiboot.Plugin implementation. Keeping the plugin implementation in the same package is what lets `go build -buildmode=c-shared ./plugins/cline` emit the shared object directly from this directory.

Package main is the CPA native plugin adapter for Cline.

It is the Go port of the Jet-Hub `cline` provider (a TypeScript DSH plugin), covering the whole method surface a CPA plugin can expose: WorkOS device-code login, credential refresh, the dual model catalogue, the SSE executor, the quota (balance) provider and one management page.

What makes this provider unusual, and therefore what most of the comments in this package are about:

  • the `workos:` token prefix is load-bearing. `Authorization: Bearer workos:<jwt>` answers 200; the same token without the prefix answers 401 with a body that blames the client version (`cline.ts:166-176`);
  • the device-code poll decides from the response BODY, not the HTTP status: WorkOS answers 400 for `authorization_pending`, and `slow_down` accumulates its penalty (`cline-oauth.ts:266-291`);
  • a region-restricted 403 must be recognised BEFORE any refresh attempt, because refreshing cannot help and the resulting AUTH is rendered to the user as "API key invalid" (`cline-adapter.ts:609-646`);
  • free models are a server-side marketing list, fetched from an endpoint the plugin trusts over its own static table (`cline-models.ts:85-94`).

There is no signing, no PKCE, no device fingerprint and no local callback listener anywhere in this provider: it is a plain HTTPS + bearer-token job (spec §9).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL