Files
plugins/packages/tabbit/package.json
T
yetone efd8da8064 tabbit 0.1.3: the international app's sign-in reads "Tabbit Safe Storage", and Keychain failures say what to do
Signing in with "Read Tabbit Browser sign-in" failed at once, with no
Keychain prompt, as "Command failed: security find-generic-password -s
Tabbit Browser Safe Storage -w" (shiqi_40904, Discord, macOS 27.2).

Cause: Tabbit ships two macOS builds, and the plugin knew only one
Keychain name. Read out of both 1.16.27 installers (Info.plist, and the
framework code that picks the name from a flag set at start-up):
- Tabbit.app (com.tabbit-ai.Tabbit, international): data folder
  ~/Library/Application Support/Tabbit, service "Tabbit Safe Storage",
  account "Tabbit".
- Tabbit Browser.app (com.tab-browser.Tabbit, China): data folder
  "Tabbit Browser", service "Tabbit Browser Safe Storage", account
  "Tabbit Browser".
The plugin found the international store and asked for the China name;
security answered "item not found" (exit 44) with no prompt. The spaces
were never the problem: the name was already one argv entry, and the
message is only Node's way of printing the command.

Now:
- Each store asks its own build's item first, then the other's.
  Not found moves on at once; security only prompts for an item that
  exists, so a not-found never waits for a prompt.
- With both builds installed, the store that is signed in is read.
- The Keychain call is async with a 2-minute timeout (it was a 15 s
  execFileSync that dropped stderr), so the user has time to answer.
- Errors say what to do: not installed or not signed in -> open Tabbit
  and sign in; not in the Keychain under either name (both named);
  prompt denied (128/51) -> click Allow; no answer in time; keychain
  locked (36); anything else carries security's own stderr. Each
  points at "Paste Tabbit token".
- The method is now "Read the Tabbit app's sign-in (macOS)"; README
  lists both builds.

Run on mote (macOS, Node 22.22.0, Bun):
- node --test tests/*.test.mjs: 83 pass, 0 fail. bun test (temp HOME):
  83 pass. bun scripts/check.mjs: exit 0.
- Broken by hand: safeStorageNames returning only the China name (the
  old behaviour) turned 3 tests red, among them "the international
  build signs in with its Tabbit Safe Storage item (the report)".
- Again after rebasing onto ff9d3a64 (the pushed parent; it changed only
  system-prompt and trae): tabbit node --test 83 pass, whole-repo
  bun test (temp HOME) 7588 pass 0 fail, check exit 0.
- Tests use a fake security and fixture cookie stores; nothing reads
  this machine's Keychain or browser profiles.

Not tried: a real Tabbit account or a real Keychain prompt (none here),
so the prompt's exit codes come from Security.framework's OSStatus
values, not a recorded run. Dev builds' "TabbitDev ..." names are not
tried. magpie pins no min for tabbit (git grep finds none).

Reported-by: shiqi_40904 (Discord)
2026-11-09 17:17:41 +08:00

52 lines
1.2 KiB
JSON

{
"name": "@magpie-community/opencode-tabbit-auth",
"version": "0.1.3",
"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/"
}
}