You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The provider's baseURL ended at the gateway, without /v1: an OpenAI-compatible client joins /chat/completions onto the base and asked https://api.claw.speedai.com/chat/completions, which the gateway answers with a 405 page (issue #3). The loader now answers the base with /v1, as the vendor's own documents it, and the config hook passes a user's own base through unchanged.
The fallback transport followed a redirect to any host. When the Go proxy could not run, requests and chat went through fetch, which follows a Location and carries Authorization to it; the proxy refuses a hop off the host and port it started on, and the fallback now applies the same rule (lib/guarded.mjs): at most five hops on the origin the request started on, a one-shot body stops at the redirect, and the redirect is returned as the answer.
A user's own api written without a path was used as written, so the clients asked host/chat/completions and host/messages with no /v1: /v1 was there only when the user happened to type it. A user's address now follows the vendor's rule — an address that already ends in /v1 is left as it is, any other is given /v1, as https://api.claw.speedai.com always was.
The fallback transport refused redirects when the host handed it a URL or a Request instead of a string, and read an upper-case HTTPS:// address as not https, which sent it out with no rule at all; both are now parsed the way the URL parser reads them. A Request is sent with its own method, headers and body (the URL alone was sent, as an unauthenticated GET), a DataView body no longer throws, and an ArrayBuffer or Buffer body is copied at the call.
The fallback transport now follows fetch's own redirect rules for the method: a 303 asks for a GET with no body unless the request was a GET or a HEAD, a 301 or 302 after a POST does the same, and every other method (a PUT, a HEAD) keeps its own; before, it re-sent the POST through a 303 and turned a PUT through a 301/302 into a GET. A hop to a GET drops the headers that described the body (content-type, content-length, which the old code tried to strip from the wrong object and kept), 307 and 308 keep the method and the body, and the redirect's own body is cancelled instead of left holding its connection.
A Request handed to the fallback transport with an init is now read as fetch reads one: the init's headers replace the Request's (a merge kept an Authorization the caller meant to drop), its signal overrides the Request's, and its stream body is sent with the duplex a stream request needs.
A user's own api carrying a query or a fragment was used as written and then given /v1, but magpie and both clients join the endpoint by string concatenation, so /gateway?route=chat produced /gateway?route=chat/v1/chat/completions — the endpoint inside the query. The base is now read by scheme, host and path, with /v1 on the end.
The sign-in page's SMS resend cooldown was checked before an await and recorded after it, so several /send requests at once all passed it: a script holding the page's solved captcha could send SMS as often as it liked within the cooldown. The cooldown is now taken before the vendor is asked and given back when the vendor refuses the send.
A redirect that turns a request into a GET now drops every header that described its body (content-encoding, content-language and content-location as well as the length and the type), as fetch does.
A redirect whose Location names a user in its authority (https://someone@api.claw.speedai.com/…) is no longer followed as a hop on the same origin.
The sign-in page took the account's QR code image from any URL the vendor's answer named. It is now only loaded from the vendor's own hosts over https.
The proxy refuses a redirect that names a port, not only one that names another host: https://api.claw.speedai.com:8443 is another service on the vendor's name.
The install check in scripts/tarball.mjs passed without running when the checkout had no native/bin (a fresh clone, a npm pack --dry-run): it printed that the platform packages were "not installed" and exited 0. A tree without builds now says the check was skipped, and the release run (prepublishOnly) passes --require-builds, where it is exit 2 — a release cannot ship on a check that did not run.
A sign-in the vendor answered with a refusal wrapped inside a 200 ({"code":200,"data":{"code":201,"status":"ip_verify_required",…}}) was saved as a finished sign-in, and its temp token — good for /v1/user/verify_ip alone — failed every request afterwards. A wrapped refusal is now the refusal it is, in the sign-in, the renewal and the IP check alike.
A token the plugin returned to the host was checked only for being a nonempty string. A login, renewal or IP-check answer whose token carried a newline or invisible characters, or whose own exp had already passed, was saved and then rejected on every request; such a token is now refused where it arrives, with a sentence that says so.
A vendor sentence that quoted a credential reached the sign-in page and the host's failure text: a QR status answer with message: "… token=eyJ…" was shown as written. The shapes the card already cuts for its own messages now cut these sentences at the source.
A password sign-in whose IP-check handover arrived after a newer sign-in had already finished wrote the stale handover anyway, so the next OAuth page continued the older account's check. An attempt that a newer sign-in superseded leaves nothing behind.
A sign-in cancelled before its page finished opening spent the IP-check handover: the page never reached the host and no code was asked for, but the temp token was gone. It is put back, as when the page fails to open at all — unless a newer sign-in finished while the page was coming up, in which case the older account's handover is not offered.
Closing the sign-in page left its vendor calls running to their own timeouts (a QR poll holds 35 seconds): the listener went away, the requests did not. The page now cancels them with itself.
The Go proxy answered a vendor that sent no response head within its two-minute bound as 200 with an empty body: the watchdog cancelled the upstream request and the handler returned before writing a head, and Go's own finishRequest wrote the success. The silence is now a 504 naming it.
The Go proxy forwarded a request-side header that the incoming Connection header named hop-by-hop (Connection: Authorization plus an Authorization) — an input only another local process with the proxy's token could make, but one that put a value the plugin meant for the proxy on the vendor's wire. Named fields are now dropped, as the response side already did.
A plugin process killed outright never ran the cleanup that removes the proxy's private temp directory, and the directory stayed in the temp root for as long as the machine ran — one per such death. The proxy now removes its own empty directory on the way out, while the plugin keeps removing whatever is left in it.
The install check's probe found the platform package by splitting the resolved path on /, so on Windows — where the same path is written with backslashes — it answered null for a build that did come from the platform package, and the check would have failed for a reason of its own. Both separators are read now, and the check says exit 2 when this machine has no build in the platform table rather than reporting a package it never looked for.
The test that runs the gate against a tree without builds gave each of its two runs a 110-second bound; alone that is about a minute, and a machine running other suites ran past it — the run was killed and its silence read as a wrong exit code. Each run has its own generous bound now and the failure names a killed run as killed.
The release-package test's three registry reads (a taken version, an unpublished one, a package that does not exist) had no answer for a registry that could not be reached: a dropped TLS connection under load read as a wrong preflight. A network failure now skips those three reads with a note, while a wrong answer is still a failure.
The 9 MiB streaming-cap test had Bun's default five-second bound around a transfer that takes about 3.5 s under Bun: under load it timed out and read as a transport bug. It now states its own bound.
A cancelled IP-check page left its /v1/user/verify_ip call running to its own timeout: the page's signal was passed among the call's fields, where the function never reads it, so the person had walked away and the plugin still finished the check at the vendor. The call is now cancelled with the page, as the SMS sign-in and the QR poll already were.
The usage card could spell the account token across activities: each activity's model ids were checked on their own, so a vendor spreading the token over twenty activities, two or three characters each, put the whole credential on the card in activity order. The names that survive the per-activity read are now read once more as one list, and a hit turns every name into ….
The sign-in page showed a vendor error sentence as it came: a non-2xx answer whose message quoted a token put the token in the page and its script, against the module's own "the token never reaches the page at all". Every route's failure sentence is now shape-scrubbed, as the status word's sentence already was.
The catalog generator's fallback fetch followed a redirect off the vendor: with no proxy it used plain fetch, so a redirect could build the committed catalog from an answer the vendor never gave. It now goes through the plugin's guarded fetch, which reads a redirect off the vendor's origin as the answer.
A QR sign-in whose status answer carried a token the plugin cannot keep (a newline or invisible characters, or one already expired) was saved as a finished sign-in and then could not be read on the card. The scan status now refuses such a token at the source, like the password, IP-check and renewal paths.
The release preflight could hang a publish: took() asked the registry in a child process that followed redirects without a count and had no clock, so a registry pointing at itself held the publish for ever, and an unreadable answer was taken as "the version is free". The chain is capped at five hops, each request has a 10 s clock, the parent bounds the child, and a registry that does not answer stops the publish with a message.
A password or SMS code short enough to fall under the spread walk's floor was not cut from a message that spelled it with a separator of its own alphabet (h_u_n_t_e_r_4_2, 1-2-3-4-5-6): the strict projection keeps _ and -, and the floor skipped short keys. A projection onto letters and digits alone now drops them from both sides, and a short key has to match whole.
A token spelled in two-character groups around dots (ey.Jh.bG…, or with two dots between groups) passed the keyless shape pass: it knew one character between dots. Groups of one or two characters with one or two dots between are cut now; sixteen groups is far past any sentence, version list or abbreviation this pass meets.
The tarball gate's required-file list did not name native/cmd/codar-proxy/main.go, main_test.go or scripts/native-packages.mjs: dropping any of them from files passed the gate. It now names every shipped file but LICENSE, and a test keeps the two lists the same size.
The tarball gate's packed-run marker (CODAR_TARBALL_GATE=1) overruled an explicit --require-builds and skipped the install check the caller asked for. The explicit flag now wins, and a run that cannot do the check answers exit 2.
A native/bin holding something that was not a build (a stray .DS_Store) made the install check fail as a broken artifact (exit 1). It is a tree the check cannot run on (exit 2), as a missing tool is.
The install check ran one package manager, whichever came first on PATH, while its own comments said both must land this machine's package. It now installs with bun and with npm and requires each to land and start it.
scripts/build-native.mjs ignored an argument it did not know, so a misspelt --strict (--stirct) let a release-time check run without it. Unknown arguments are exit 2.
scripts/native-packages.mjs --check reported only what was staged: a package.json whose optionalDependencies no longer named a platform package still read as ready to publish. --check now checks that list too, and took() honours an npm_config_registry so a mirror's registry can be asked about a taken version.
prepublishOnly ran the packed suite without --require-bun, so a release made on a machine without Bun silently skipped the runtime magpie loads plugins on. It now requires Bun.
A refusal buried between the envelope and the fields was read as an answer: {code:200, data:{code:401, data:{token:…}}} was saved as a finished sign-in, a renewal, an IP check and a balance; {code:200, data:{success:false, data:{balance:77}}} put stale points on the card; and a claim refused the same way was reported as claimed. The wrapper chain is read node by node now, on the sign-in, the IP check, the renewal, both balance reads and the free-model claim, and the innermost object is only read once no node refuses.
A daily-sign answer two wrappers deep reported the day already claimed as a failed check-in, while the flat form of the same sentence settled the day: the deep refusal was returned before its wording was read. The deep path now reads the rolling-window sentence and its wait the way the flat one does.
A captcha that failed to load left the SMS tab disabled until the page was closed and reopened: the one-shot load flag is reset and the send button re-enabled, so the tab is a retry.
A refusal deeper in the wrapper chain than the first one met was the one that mattered: {code:200, success:false, data:{code:401,…}} reported a generic read failure where the account was expired, and the same answer lost the expiry in the sign-in, the renewal and the IP check. The deepest node naming a dead sign-in or a restriction is now the refusal the caller gets, and the walk reads as many wrappers as unwrapped() does (eight) instead of stopping one hop short.
The usage card's check-in row vanished on {data:{code:"already_claimed",…}}: the row's refusal walk read the word out of data and took the day's own statement for a refusal. It uses the shared walk now, which exempts already_claimed.
A check-in answer whose outer message was a bare "success" and whose wrapped body said "Already signed today" was recorded as this attempt's claim, with no credit and the day settled off a claim that never landed. The wrapped sentence now speaks for the day when it names it.
The verify page's send button did nothing after a failed captcha load: it returned on the missing widget without asking for one again, and the verify page has no tab switch to retry. A click without a widget now asks for it.
A QR scan status that refused was read for the stale success inside it: a gateway answering {"code":500,…} (or success:false, or a word code) beside a leftover {"status":"SUCCESS", token} finished the sign-in with a token the refusal never handed over. A refusal anywhere in the wrapper chain is now the status, and the vendor's 404 expiry is still an expiry.
A check-in answer whose wrapper carried the bare word already_claimed was read as this attempt's claim (the bare code:200 path settled it), with no wait and credit off a balance that never grew. The word now settles the day, as its wording does, at any depth.
A model id made of letters and digits (a1b2c3d4e5f6a7b8c9d0e1f2, 0123456789abcdefghijklmn) was dropped from the catalog: the card's mixed-token rule cuts any 24+ run carrying a digit and a letter, and the catalog asked that same rule of every id and name, so a vendor listing ids in that shape lost them — and a list holding only such ids read as a refused read. Catalog fields are now judged by how a credential is written (an sk- key, a Bearer, a JWT, a run of hex, a field that names itself one, an encoded or split copy of the account's key), while the card's own messages still fail closed.
A random mixed-case run (Ab3xY9QwAb3xY9QwAb3xY9Qw) was served as a model id and written into the committed catalog: with the shape pass asked only of strings that look like credentials, a 24–39 character mixed-case run with a digit no longer looked like one, although it is how a key's body is written and not how a vendor names a model. Such a run is credential-shaped again, while an id's own shapes (lower-case opaque ids, camelCase words with digits between them) stay served.
A proxy start that failed (a spawn error, the five-second ready deadline, a machine waking from sleep) was cached as "no proxy" for the rest of the process: the desktop transport never came back and every request and chat left through the plain fetch without saying so. A failed start is now forgotten and retried after a 20-second pause (CODAR_PROXY_RETRY_MS overrides the pause), so a transient failure costs a few requests, not the session.
A dead proxy whose replacement also refused set a process-wide latch, and proxy() answered null until an explicit closeProxy() the host never makes: one outage kept the whole session on the plain fetch. The refusal is now remembered for the same retry pause instead of for ever, and a later request starts another proxy.
A refused streamed answer read with text() waited on the stream's five-minute idle bound even when the caller passed a short timeoutMs: a chat refusal that named a body and never sent it kept the card's sentence pending. The refusal body is now read under the caller's own bound and ends as no_answer with the socket released.
CONTRIBUTING.md put the platform packages' --publish before the tarball gate, although publishing a version cannot be undone: a failed gate then left half a version on the registry. The gates now run first, and the README no longer says the suite starts a Go build (it runs built proxies; nothing in the suite invokes the Go toolchain).
The install check added in 0.3.0 failed on CI (ubuntu runs of node --test and bun test, the Windows job and the tarball job) after the release was published: it copied a checkout build that CI runners without native/bin do not have, asserted an execute bit Windows does not have, and unpacked with tar -C/-s, which the tar on ubuntu and Windows reads as member names. The fix ships with the next version; the published 0.3.0 package itself is unaffected.