auth.refresh with refreshLead 10 minutes (in-fetch: 5). It spends the refresh token under the same lock as a request's refresh and records what each refresh gave, so the two never spend one token twice. Cline refusing the refresh token is signIn "expired"; anything else throws and is retried. The check before each request stays for OpenCode, which doesn't call the hook (magpie 0.1.684+ does). refresh.test.mjs fails without the change; HOME=$(mktemp -d) bun test passes (396 across the repo).
13 lines
549 B
JSON
13 lines
549 B
JSON
{
|
|
"name": "@magpie-community/opencode-cline-auth",
|
|
"version": "0.1.1",
|
|
"description": "Cline (cline.bot) on your own account — usage billing, ClinePass and the free models — in OpenCode and magpie",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"exports": "./index.mjs",
|
|
"files": ["index.mjs", "README.md"],
|
|
"keywords": ["opencode", "opencode-plugin", "magpie", "cline", "clinepass"],
|
|
"license": "MIT",
|
|
"repository": { "type": "git", "url": "git+https://github.com/magpie-community/plugins.git", "directory": "packages/cline" }
|
|
}
|