A magpie plugin for Codar (科搭), the research desktop app by SpeedAI. It adds Codar's models to magpie as a provider, handles the daily check-in, and reports the account's points on the usage card.
- Provider — registers a
codarprovider with Codar's model list (20 models as the vendor lists them today: theautorouter plus the DeepSeek, GLM, Gemini, GPT and Claude families; the count is the vendor's, not a promise). The list is embedded inlib/catalog.mjsand refreshed fromGET /v1/codar/modelswhen signed in. Chat goes from magpie straight to Codar's gateway (https://api.claw.speedai.com/v1) — OpenAI-compatible for most models, Anthropic Messages for the Claude ones. - Sign-in — three methods: “科搭令牌(留空读本机)” (one optional token field: leave it empty and the plugin reads the desktop app's own token file itself — read-only, never written — or paste a Codar access token and that is the one used; either way the token is checked for an account name and an unexpired exp before saving), “科搭OAuth登录” (one page the plugin serves on
127.0.0.1, with the two ways in the vendor's own login dialog offers as tabs: 扫码登录, where the plugin draws the code the vendor issued and polls its own status endpoint every two to three seconds, and 手机号登录, where you enter the phone number, solve the vendor's own Aliyun captcha and type the SMS code; every vendor call is made by the plugin, and the page never sees the token), and signing in with the Codar account's own name and password (POST /v1/loginonapi.kuaipaper.com; the password is sent once and kept nowhere; it sits after the page because magpie draws its own methods in that order and the password is typed into magpie's own dialog). A sign-in is kept with the token's own expiry when the token states one (a token that states none is kept asexpires: 0, not invented one), and magpie renews it throughPOST /v1/token/refreshat magpie's own lead (five minutes) before it runs out; a token that has already expired cannot be renewed (the vendor refuses it with 401) and asks to sign in again. The vendor refuses to send an SMS code without a solved captcha (measured:{"code":400,"message":"请完成人机验证"}), which is why the SMS tab is a page rather than a prompt. When a password sign-in comes backcode 201/ip_verify_required— the vendor's IP risk check — the plugin keeps nothing: the temp token that answer carries is good for that one check only, and a plugin-level handover could be spent by another account's page and saved under the wrong account (the host names an account slot to itself, not to the plugin — magpie 0.1.4824 and 0.1.4940). The card says the check is finished in Codar's own app, and the person signs in again with the password afterwards. - Daily check-in —
POST /v1/daily-sign, once per rolling 24 hours. The answer reports the claim (including the points it added) or that the day was already claimed. It carriesuntil(magpie ≥ 0.1.1795) whenever a wait is known — always on an already-claimed answer, and on a claim when the vendor states the next window — so magpie re-asks exactly when the next claim opens. - Usage — points (general + agent), today's check-in state, and any free-model activity still running. The general points are also reported as a wallet reading (magpie #3950) so routing has a figure for the account; if the first balance endpoint fails, the card still shows what the second one answered.
magpie plugin add magpie-plugin-codar # from npm
# magpie plugin add github:MisonL/magpie-plugin-codar # or from GitHub
# magpie plugin add "$PWD" # or from a checkout
magpie plugin login codar # press Enter to read this machine's Codar login, or paste a tokenIf magpie is not on your PATH, use the app's own binary — for example
/Applications/magpie.app/Contents/MacOS/magpie on macOS — with the same
arguments. The plugin row also installs from magpie's Discover page (插件 →
发现), which is the same npm package.
Then select a codar model in magpie, and turn on its check-in under
Settings (设置) → 额度 (Quota) → 预热与签到 (warm-up & check-in) → 插件 (Plugins).
Codar keeps its JWT in its own config file:
- macOS / Linux:
~/.codar/config.json - Windows:
%USERPROFILE%\.codar\config.json $CODAR_HOME/config.jsonwhenCODAR_HOMEis set (the app honours it, and so does this plugin)
The value is provider.speedai.token. The “科搭令牌(留空读本机)” method reads it for you when its field is left empty — read-only, never written — and checks it has an account name and has not expired before saving it; a token pasted into that same field gets the same checks. To copy the value to your clipboard yourself instead:
# macOS / Linux — honours CODAR_HOME the way the app does. The config is read
# as utf-8-sig: a file Codar wrote on Windows carries a BOM, and plain UTF-8
# makes JSON refuse the whole file (the same reason the plugin strips one).
python3 -c 'import json,os,sys,subprocess;h=os.environ.get("CODAR_HOME") or os.path.expanduser("~/.codar");t=json.load(open(os.path.join(h,"config.json"), encoding="utf-8-sig"))["provider"]["speedai"]["token"];subprocess.run(["pbcopy"] if sys.platform=="darwin" else ["xclip","-selection","clipboard"],input=t,text=True)'# Windows - honours CODAR_HOME the way the app does
$p = if ($env:CODAR_HOME) { Join-Path $env:CODAR_HOME "config.json" } else { "$env:USERPROFILE\.codar\config.json" }
(Get-Content $p | ConvertFrom-Json).provider.speedai.token | Set-Clipboard(The first command puts the token on the clipboard; pbcopy on macOS, xclip on Linux. Linux needs xclip installed and a display — on a headless box there is no clipboard to fill, so read the same value another way. If your python3 lacks subprocess.run with input, pipe the print(...) output into your clipboard tool instead — the point is to avoid the token scrolling through your shell's history or visible output.)
The token carries the account name and an expiry (7 days after the app's last login). When it runs out the plugin says so instead of calling the API — open Codar once to refresh it there, then sign in again.
The account's name and password are sent in one request, POST /v1/login {username, password} on api.kuaipaper.com — the same endpoint the vendor's own client signs in through — and nowhere else. The password is not written to disk, to magpie's saved account, or to a log line: what comes back from it is the token, and the token is what is kept. It is held in memory only while a request is in flight and for as long as it takes to redact it from that request's own error message (a bounded scrub cache, not a stored credential): the vendor never sees it again, and nothing serialises it. If the vendor stops that sign-in with its IP check (code 201), the plugin keeps nothing: the temp token that answer carries is good for one vendor call (/v1/user/verify_ip), and a plugin-level handover could be spent by another account's page and saved under the wrong one — the host names an account slot to itself, not to the plugin (magpie 0.1.4824 and 0.1.4940). The card says the check is finished in Codar's own app, and the person signs in again with the password afterwards. A message about a failed sign-in is scrubbed of both the account and the password before it is shown.
A sign-in page lives at a loopback URL carrying a 128-bit path token
(http://127.0.0.1:<port>/s/<token>). Treat that link as a password: whoever
holds it can drive the page's endpoints — request an SMS, submit the five
codes its budget allows, poll the QR status — until the page closes, and the
host puts the link on a command line when it opens a browser (so ps on the
same machine can see it). The page itself never holds the account's token; it
calls the plugin, and the plugin calls the vendor.
The SMS tab runs the vendor's own captcha (https://codar-web.speedai.com/ct4.js),
and that script does execute inside the page: what it can see is the path
token above and the phone number typed into the form — not the account's
token, which never enters the page. The script is loaded without an integrity
hash on purpose (its content changes with every vendor deploy, and a pinned
hash turns that into a silent sign-in outage). The page does send the four
directives that depend on nothing the widget loads — frame-ancestors 'none',
base-uri 'none', form-action 'none', object-src 'none' — plus
Referrer-Policy: no-referrer, so the page cannot be framed, re-based, or leak
its path token in a Referer. script-src/connect-src are deliberately absent:
the captcha widget loads its own resources from hosts this plugin does not
control, and those two directives are the right next step once they can be
checked against a live widget.
- An installed plugin is not a listed provider until it is signed in.
magpie plugin list(and Plugins → Installed) shows this plugin and its models as soon as it loads, andmagpie plugin list --jsonshows thecodarprovider record it registers.magpie providersonly lists providers that can actually serve a request, socodarappears there after a successful sign-in, not before. If a sign-in was removed from magpie earlier, the next successful sign-in brings the provider back on its own (magpie clears the “removed” mark on sign-in); there is nothing to edit by hand. - Prices stay as magpie sets them. Codar lists prices in CNY and magpie's cost column is USD, so the plugin reports no price of its own rather than inventing an exchange rate. magpie still prices models by what models.dev says their makers charge, and a per-model price you set in magpie overrides everything. What each model does carry is the vendor's own credit multiple (
rate_badge, e.g.0.20x), shown by magpie beside the model; a model the vendor does not badge carries none. - Reasoning levels are not mapped to variants. The vendor's
reasoning.levelsdescribe request-body rewrites (set/omit) the desktop app applies itself; magpie's variants only name levels, so the models carryreasoning: trueand no variants. - Free-model activities are reported, and the one-time campaign is claimed. The card shows the activities still running; beside the check-in, the plugin also claims the vendor's one-time free-model campaign (
GET/POST /api/codar/activities/free-model[/claim]on the gateway) when its status isavailable, and says so in the check-in line. It is best-effort: a campaign already claimed, none open, or a refused call changes nothing about the check-in. It rides on the check-in, so it only happens for an account whose check-in is switched on in magpie. - The vendor fields read here are measured shapes, not a published schema.
user_quota_limit(an activity's total),remaining_quota(a null means unlimited; an unreadable value hides the activity instead of being drawn as unlimited),free_until,isSigned/signed/hasSignedandretry_after(check-in and status) are the spellings the app's answers have carried. If the vendor renames one, the card drops that row or field rather than inventing a value. - The plugin declares no concurrency limit. magpie reads the number a plugin states (the auth hook's
maxConcurrency, elsepackage.json's) as a queue; nothing stated is no limit at all (internal/provider/concurrency.go: 0 takes no slot and never waits). The vendor's ownconcurrent_limit_exceededwas met once (measured 2026-10-27: a fourth request at once answered 429), and that reading cannot tell whether the vendor counts per model or per account; an account-wide number risks throttling idle models beside the busy one. Most of the other community plugins in magpie's registry state none either (measured 2026-11-21 against the installed set: devin, qoder, trae and workbuddy declare nothing; zcode declares 3). The vendor's 429 then reaches magpie as the vendor's own refusal, and a person who knows their account can set a queue in the provider settings. The catalog'smax_concurrencyis not read for one, for the same reason. - The check-in is a text row, not a percentage — a check-in is not an allowance that runs out. A wait it cannot use (missing, zero, past year 9999, or over a week) is left off the answer rather than guessed (an already-claimed answer is the exception: it holds 30 minutes when the vendor states none, since "no until" there would re-ask a settled day), so magpie asks again at its own 30-minute retry instead of waiting out a wrong window — a rolling 24-hour window cannot lose the next claim either way.
- Fallback list. If
GET /v1/codar/modelscannot be reached, the plugin hands back the model table magpie gave it, marked as the fallback, so magpie keeps the list it had and says it fell back; the embeddedlib/catalog.mjsis what the provider starts from, and its sizes may trail the live list — the live list wins whenever it can be fetched. A model's reply ceiling is the vendor's own (max_tokens.maximum→limit.output), so magpie lowers over-asking requests instead of letting the vendor refuse them. - Models you add to this provider yourself survive list refreshes; the vendor's entries follow the vendor. A provider name or
apiyou set in magpie survives restarts. - The plugin follows the vendor client's own reading rules (field spellings, body codes, the “already claimed” wording in both Chinese and English), omits times it cannot write down rather than guessing, and never prints credentials — every vendor string is cut where it echoes the token (folded, split, spelled in fullwidth, base64 or hex) or a credential shape, and an oversized vendor answer is refused while it is read, counted over the decoded body (a gzip answer is read like any other: every transport used here hands back decoded bytes).
- The card's requests go out through the desktop's own transport when it can. The catalog, check-in, account and activity requests are made by a small Go proxy (
native/cmd/codar-proxy) that rebuilds the Codar desktop sidecar's provider client from the 0.3.13 binaries: the sidecar'shttp.DefaultTransport.Clone()— TLS left to net/http — with its last-known-addressDialContext, and its direct connection to the gateway withHTTP(S)_PROXYignored — built with Go 1.24.3 where the macOS and Linux sidecars are, and with Go 1.26.7 over a go 1.24 module where the Windows one is, which reproduces that sidecar's ownDefaultGODEBUG(tlssecpmlkem=0among them) — so the TLS ClientHello and HTTP headers are the sidecar's rather than Bun's. The plugin talks to the proxy over a private socket in the temp directory; the proxy forwards only the four hosts the desktop's own cloud-network controller accepts, and sends only the headers the plugin listed —AuthorizationandContent-Typefor a card request, plusX-Api-KeyandAnthropic-Versionfor a chat one — while Host (the vendor's name alone — the sidecar builds every URL from a barehttps://<host>base, so no:443ever appears),User-Agent,Accept-Encodingand everything else are Go's, as on the sidecar's requests. The User-Agent is Go's automatic one and follows the ALPN choice the server makes (Go-http-client/1.1where the server selects http/1.1, asapi.claw.speedai.comdoes today;Go-http-client/2.0where it selects h2, asapi.kuaipaper.comdoes), which is also what the sidecar's own client would send. The binaries are built per platform bynode scripts/build-native.mjsand ship as per-platform packages (see The native proxy binaries). Without a binary for the platform, or if it cannot start, those requests fall back to the plugin's ordinary fetch — the old fingerprint — and nothing pretends otherwise. How the shipped binaries are made, and what a review of them can check, is in The native proxy binaries below. - Chat goes through it too. The loader answers a
fetch(host.js runstypeof o.fetch === "function" ? o.fetch : fetch), so a conversation to the gateway leaves with the same transport instead of Bun's, and the answer is streamed back as it arrives — the proxy flushes every piece and bounds silence rather than total length, so a long answer is not cut at a deadline meant for short ones. A provider the user re-pointed elsewhere, a platform without a binary, or a proxy that did not start falls back to the ordinary fetch; chat never fails because the native path is missing.chat.headersstill sets the Go client'sUser-Agentfor the host's own outbound requests, which is a separate path from the loader's fetch. - A vendor-side account restriction is not a sign-in problem. Chat can answer
403 {"detail":{"code":"account_restricted"}}while the card is healthy: the card reads the account endpoints (points, check-in), which need no chat access. That refusal is the vendor restricting the account, so the plugin saysaccount_restrictedand points at Codar support instead of asking you to sign in again. A429withRetry-Afteris passed through with the wait the vendor named. - A login credential the vendor restricts to its own client is not a sign-in problem either. Some accounts are refused at the chat gateway with
403 {"detail":{"code":"client_not_supported","message":"This login credential is restricted to Codar. Use an API key for other clients."}}— the vendor is telling third-party clients to use an API key rather than the desktop login token. Signing in again does not change it, and this plugin does not pass itself off as the vendor's client to get through it: every request is the plugin's own — none carries the desktop'scodar-web-v1content type, and no conversation gets the Codar runtime system prompt injected into it. What the plugin does mirror is the transport the desktop uses for these same endpoints (the TLS client, headers and Host described above), which is what makes its login-token requests ordinary; it does not claim to be a Codar runtime in the conversation itself. The vendor documents no client API key for third-party clients today (its docs cover third-party keys going into Codar, the other direction); if Codar support issues one for your account, say so in an issue and a way to use it can be added. Otherwise the fix is on the vendor's side. The balance reads and the check-in line name this refusal and stop at it, instead of asking for a sign-in that cannot help.
- A custom
apigains/v1. Since 0.3.1 the plugin writes the address it asks ashttps://…/v1(lib/internal.mjs'sbaseURL): a value you set without that suffix —https://gw.example.com/custom— becomeshttps://gw.example.com/custom/v1on the next start, and a gateway that does not serve under/v1stops answering. Set the address with the path it really serves (https://gw.example.com/v1) and the rewrite is a no-op. - Your models, renames and address survive. The provider's name,
npmandapiare kept as you set them, models you added are kept by id across every catalog refresh, and a model whose price or limit you changed keeps your value. What the vendor adds appears; what it drops goes, unless you added it yourself. - A saved sign-in keeps working. Nothing in 0.3.x invalidates a saved token — only its own
expdoes. One that has expired asks for a sign-in again, which is the same answer it has always given. - The platform package is pinned to the version. An upgrade swaps
magpie-plugin-codar-<os>-<cpu>to the new version by name. If that install fails, the plugin still loads and answers through the ordinary fetch — chat never fails because the native path is missing — but it says nothing on the card about why;CODAR_PLUGIN_DISABLE_NATIVE=1is what it looks like on purpose. - Going back is reinstalling the older version. Nothing here writes state a previous version cannot read: the provider entry's shape has been the same since 0.1.0, the catalog hold is in memory, and the only file written is
plugins.jsonthrough magpie's config hook.
node --test # the whole suite (installs packages from a
# registry served on 127.0.0.1; no vendor calls;
# one preflight reads registry.npmjs.org for
# what is already published — CODAR_OFFLINE=1
# skips it)
bun test # the runtime magpie actually loads plugins on
node scripts/catalog.mjs --check # is lib/catalog.mjs still what the vendor says?
node scripts/catalog.mjs # regenerate it from the signed-in app
node scripts/build-native.mjs # rebuild native/bin (this machine's OS; needs Go)
node scripts/build-native.mjs --all # ...every platform, for a release
node scripts/native-packages.mjs # stage the platform packages (native/packages)
(cd native && go test ./...) # the proxy's own testsThe proxy needs a Go toolchain to build (scripts/build-native.mjs fetches the 1.24.3 and 1.26.7 toolchains through GOTOOLCHAIN), but nothing in the suite invokes that toolchain: it runs a real built proxy in two places — one test kills the host of the checkout's own build, and the install check below starts the proxy a package manager installed from the platform packages — and everywhere else test/native.test.mjs drives the client against a socket of its own, native/cmd/codar-proxy/main_test.go pins what the proxy sends and how it decides, and the tests that need a running proxy start a scripted stand-in through CODAR_PROXY_BIN instead (it speaks unix sockets only, and skips where that does not exist). On Windows the proxy itself listens on loopback TCP rather than a unix socket. The built binaries are not committed (.gitignore keeps native/bin out), so a checkout without a build simply uses fetch.
Two environment variables exist for troubleshooting the native transport:
CODAR_PLUGIN_DISABLE_NATIVE=1 turns the proxy off (every request takes the
plain fetch, and the tests that need a proxy skip), and CODAR_PROXY_RETRY_MS
sets the pause before a failed proxy start is tried again (default 20 000).
CODAR_NATIVE_OUT is a build-time hook: it moves where native:all writes and
where the release scripts check and stage, but the plugin itself still looks in
native/bin (and in the platform package). A build made elsewhere is named to
it with CODAR_PROXY_BIN.
CODAR_PROXY_BIN names a different executable — the tests use it for their
scripted stand-in.
lib/catalog.mjs is generated with the plugin's own reader (catalogOf), so the fallback and the live list are built by the same rules. Its exit codes keep failures apart: 0 the run succeeded (--check: nothing moved), 1 a record moved (--check only), 2 the run could not finish — the vendor's answer was a refusal or its shape had moved (no list, a record with no context window), the local file could not be read or written, or an argument was not one it knows (only --check is). A failed run writes nothing and never empties the fallback. It needs a signed-in app, so it is a local command, not a CI step.
The suite also pins the formatting in .editorconfig (LF for every shipped text file, one final newline for .mjs/.md, no trailing whitespace and two-space indent for .mjs) — test/style.test.mjs walks the tree for .mjs, .md, .json, .yml and .yaml files (dot-directories such as .git are skipped; .github is scanned), so a new one of those is covered the moment it lands. CONTRIBUTING.md has the invariants the tests defend.
CI runs the suite on Node 20–24, on Bun across Linux / macOS / Windows, and on Node on Windows and macOS — the plugin reads a file under the home directory, and that is where per-platform differences show up. A separate job tests the Go proxy on Linux with Go 1.24.3 and then cross-builds all five targets, checking each finished binary's DefaultGODEBUG against the platform sidecar's; the proxy's behaviour is the same code on every platform, so it is tested once rather than five times. A separate job packs the npm tarball and runs the suite inside it on both runtimes (node scripts/tarball.mjs --require-bun), because files decides what ships and a test that references something outside it only fails for users; it also installs the packed main package against the platform packages staged from the same builds with both bun and npm, and requires each install to land that machine's package and the plugin to start it — on Linux, so linux-x64 is the package that install path is proven for; the macOS job does the same with the builds it downloads, for whatever darwin architecture its runner is (arm64 on the current images), and the Windows job for win32-x64. The Windows job runs the gate on the builds the native job made: it downloads that artifact into native/bin-win, points CODAR_NATIVE_OUT at it, and runs scripts/check-packed-install.mjs, which installs the packed main package and the staged win32-x64 platform package through npm and requires the plugin to start the proxy it landed. Its tarball step runs without --require-bun or --require-builds (the registry install check needs native/bin), so that half is a skip there rather than a check; scripts/check-proxy-start.mjs covers the Windows TCP listener. The optional-dependency selection itself — a registry deciding which platform package an install gets — is covered on Linux by the tarball gate.
Each platform's build ships in its own npm package, and the main package names
all five in optionalDependencies:
| package | os | cpu |
|---|---|---|
magpie-plugin-codar-darwin-arm64 |
darwin |
arm64 |
magpie-plugin-codar-darwin-x64 |
darwin |
x64 |
magpie-plugin-codar-linux-arm64 |
linux |
arm64 |
magpie-plugin-codar-linux-x64 |
linux |
x64 |
magpie-plugin-codar-win32-x64 |
win32 |
x64 |
The proxy lives in a private (0700) directory under the temp root, made for it
by the plugin and holding its socket and ready file. On Windows those modes
are the read-only bit and nothing more: the ready file's access token is
protected by a per-user directory rather than by an ACL. The runtime's %TEMP%
is already per user in the ordinary case; when it is not — a service whose
TEMP is unset falls back to the shared %windir%\temp — the plugin makes
its directory under %LOCALAPPDATA%\codar-plugin instead, which is per user by
construction. Should %LOCALAPPDATA% be missing too, it falls back to
%USERPROFILE%\AppData\Local. A machine where the only directory left is the
shared %windir%\temp does not start the proxy at all — the request takes the
plain fetch — rather than leaving a live token in a directory other users can
read. The plugin removes that
directory when the proxy exits, and so does the proxy itself on its way out —
so a plugin process killed outright, whose own cleanup never runs, still
leaves nothing behind once the proxy it started sees its stdin close. When
both die without a handler, the next start sweeps such a directory away, and
only on proof: the ready file records the proxy's pid, and a shell is dropped
only when that process is gone. A directory the sweep cannot judge (an older
build's ready with no pid, no ready at all) is left standing rather than
guessed at; an empty one with no ready file is removed once it is a day old,
since nothing is ever going to appear in it.
A package manager installs the one whose os/cpu match the machine and skips
the other four, so an install is one 5.8–6.6 MB build (2.4–2.8 MB of tarball,
plus the main package's 0.4 MB) instead of all five: 32.0 MB unpacked became
about 7 MB on disk and a 13.3 MB download became about 3 MB. The cpu field is
npm's spelling — x64, never Go's amd64, which npm refuses outright with
EBADPLATFORM — while the binary inside keeps the Go-flavoured file name
(codar-proxy-darwin-amd64), which is the name the plugin looks for.
The plugin finds the build by resolving the platform package it was given
(lib/native.mjs, binaryPath), not by computing a path from process.arch:
what landed was the package manager's decision, and on Apple Silicon an x64
runtime under Rosetta reports x64 and needs the x64 build. A working tree
without those packages falls back to native/bin, and an install with no
platform package at all (an npm install --omit=optional, say) falls back to
the plugin's ordinary fetch — the old fingerprint, see Notes.
Nothing runs at install time: there is no postinstall script. That is deliberate — Bun blocks postinstall scripts of packages it does not trust (measured on Bun 1.4.4), so a package that placed its build in an install script would silently have no proxy on the runtime magpie actually uses.
Where the builds come from:
- Built locally, not in a release workflow.
npm run native:all(the first release step inCONTRIBUTING.md) builds every target on the machine running the release, withCGO_ENABLED=0,GOOS/GOARCHper target, andGOTOOLCHAIN=go1.24.3(darwin, linux) orGOTOOLCHAIN=go1.26.7(win32) — the exact toolchains the Codar 0.3.13 desktop sidecars use — with-trimpathand-buildvcs=false.npm versiondoes not run it, andprepublishOnlydoes not build: it refuses to publish unless four checks pass — every build is there, is what its header and machine say it is, is not older than the proxy's own source, and carries this tree's fingerprint (build-native.mjs --check --strict); each build's own Go record names this repo, its platform, its toolchain and the sidecar'sDefaultGODEBUG, and its bytes match the sha256 the build wrote (--buildinfo); the packed tarball runs its suite on both runtimes and installs into a scratch project (tarball.mjs --require-bun --require-builds); and the staged platform packages hold exactly these builds (native-packages.mjs --check). - The binaries in the published platform packages are reproducible from the tag, and that is now a checkable claim.
native/binis not committed, so a fresh checkout ofvX.Y.Zhas no binaries — but a rebuild with the same toolchains and a clean environment gives the same bytes, andbuilds.jsonrecords the sha256 of each one. (Measured 2026-11-29: five targets rebuilt in another directory, twice, one with a coldGOCACHE, matched the shipped digests exactly.) The build pins what it reads:-trimpath,-buildvcs=false,GOOS/GOARCH/CGO_ENABLED,GOEXPERIMENT=none,GOAMD64=v1/GOARM64=v8.0, the toolchain per target,GOENV=offandGOWORK=off— the last two matter because an emptyGOFLAGSdoes not clear it, and ago env -w GOFLAGS=-overlay=…would otherwise compile another file while the fingerprint still named this tree's sources. The fingerprint covers every file the compiler can read undernative/cmd(.go, assembly, a.syso, an embedded asset) plusnative/go.mod/go.sum. A binary whose marker, build record or recorded digest disagrees with the tree is refused before anything is uploaded. Since 0.2.4 each one carries no VCS stamp (-buildvcs=false) and no build path (-trimpath), sogo version -mreports the module as(devel)rather than naming a commit — a stamp read from the checkout the build ran in named the wrong commit on the 0.2.0–0.2.3 builds. - A tag is what CI verifies. Pushing a
v*tag runs the whole suite and, in arelease-digestjob, reuses the five builds thenativejob made and printsSHA256SUMS(the source fingerprint and each binary's digest) with the same script the releasing machine runs. Comparing the two files before and aftergit push origin v<version>is how "these bytes came from this commit" is checked;npm publish --provenancewould say it cryptographically, but it needs a public repository or a paid plan, and this one has neither. - What can be checked, and what CI checks. Anyone can rebuild with
go run/npm run native:alland rungo vet ./... && go test ./...innative/, where the proxy's tests pin what it sends and how it decides (the forwarded hosts and headers, the proxy decision, the last-address dialer). Every release also ships the source in the package, so the code the binary was built from is readable side by side. CI'snativejob builds all five targets from the same source with the same toolchains and refuses a binary whoseDefaultGODEBUGdiffers from its platform sidecar's; it uploads the result for thetarball, Windows and macOS jobs to install and run — the binaries in CI are not the ones published (they are built on the releasing machine and the gates readbuilds.json), so a user who wants to verify what they installed must rebuild and compare the digest. The gate also installs the packed main package into a scratch project through a registry served from a local directory, and requires that install to land exactly this machine's platform package and that the plugin starts it: a bare unpack cannot show that, and the release that shipped five builds in one package shipped for two minor versions because nothing checked the install path.
The darwin builds are not signed or notarized. They run on an ordinary Mac, but a machine with a mandatory-signing policy or an MDM allow-list can refuse to spawn them, and the plugin then falls back to its ordinary fetch — the request still goes out, with the runtime's own TLS shape instead of the desktop's, and nothing tells the person which one carried it. Signing needs a Developer ID certificate at build time; until then, a managed Mac may use the fallback without noticing.
What the proxy does, briefly: it listens on a private socket in the temp directory (loopback TCP on Windows) and forwards only the four vendor hosts the desktop's cloud-network controller accepts, with only the headers the plugin lists. It holds no credential of its own — the token is passed in per request — and it writes one file, the ready file in its own temp directory that tells the plugin where it is listening, its own pid (so a later start can tell a dead shell from a wedged live one), on Linux its PID namespace (so a sweep running in another namespace cannot read its live proxy as gone), and on Windows the per-run header token that proves a request came from the plugin (written with mode 0600, which on Windows is the read-only bit; see the note above). It writes nothing else.
Versions follow Semantic Versioning; CHANGELOG.md records every release, and the release process is described in CONTRIBUTING.md.
MIT.