Files
yetone 22272f1be8 tabbit 0.1.5: a 403 that is an HTML error page is not a lapsed sign-in (#1199)
yukinomon measured it (#1199): Tabbit's international site answered the
daily check-in with a 403 whose body was a "Service Unavailable" HTML
page, with no server or cf-ray header (every JSON answer there carries
server: uvicorn). 0.1.4 took every 403 but the 492 paywall as a refused
sign-in, so magpie marked the account for a new sign-in; the same token
answered every route half an hour later.

- refusalOf calls a 403 whose non-empty body isn't JSON a page; call()
  throws it as a plain TabbitError with the page's <title>, with no
  signIn and no "refused the sign-in" text.
- It settles nothing about the token's site: an unsettled token isn't
  sent to the other site for it, and such a page from the other site
  leaves the site unsettled too.
- A 401, and a 403 with Tabbit's own JSON, are refused sign-ins as
  before.

Run (mote, HOME=$(mktemp -d)):
- bun test packages/tabbit: 91 pass, 0 fail.
- bun scripts/check.mjs tabbit: ok.

Broken by hand: origin/main's api.mjs with the new tests: 2 fail (the
chat path and the check-in path).

Not tried: a real Tabbit account behind such a page; the page's bytes
are the reporter's.
2026-11-16 12:10:02 +08:00

52 lines
1.2 KiB
JSON

{
"name": "@magpie-community/opencode-tabbit-auth",
"version": "0.1.5",
"description": "Tabbit (web.tabbit.com and web.tabbit.ai) as a magpie / OpenCode provider: live model catalog, cookie sign-in, chat completions, cycle usage and the daily check-in",
"type": "module",
"main": "./opencode.mjs",
"exports": {
".": "./opencode2.mjs"
},
"files": [
"index.mjs",
"opencode.mjs",
"opencode2.mjs",
"src/",
"README.md",
"LICENSE"
],
"keywords": [
"magpie",
"magpie-plugin",
"opencode",
"opencode-plugin",
"tabbit",
"provider",
"llm-gateway"
],
"license": "MIT",
"engines": {
"node": ">=22"
},
"scripts": {
"test": "node --test tests/*.test.mjs"
},
"magpie": {
"icon": "https://web.tabbit.com/favicon.ico",
"maxConcurrency": 1
},
"homepage": "https://github.com/magpie-community/plugins/tree/main/packages/tabbit#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/tabbit"
},
"bugs": {
"url": "https://github.com/magpie-community/plugins/issues"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}