diff --git a/.cortexkit/release-notes/2.1.2.md b/.cortexkit/release-notes/2.1.2.md new file mode 100644 index 00000000..3ff31d7a --- /dev/null +++ b/.cortexkit/release-notes/2.1.2.md @@ -0,0 +1,8 @@ +## What's fixed + +- **Requests no longer fail on a busy settings file.** Under heavy load a request could fail with `Timed out acquiring native-relay lock for …/anthropic-auth-vault-settings.json`. Every request read the relay settings under the same lock their writer uses, and a lock that couldn't be taken in time failed the request. Requests now read the relay settings without a lock. A relay change stamps the settings and the relay token together, and a request that reads a mismatched pair during a change refuses locally instead of sending the token anywhere. +- **Session pins never hold up a request.** Choosing the account for a session waited up to five seconds for the session-pin file and could fail without it. The account is now chosen from the saved pins without a lock, and the pin is saved in the background. Resetting a session still reaches the file. + +Checked on OpenCode 1, OpenCode 2 and Pi: a request with a valid login takes no lock before it is sent. Locks that protect credential refreshes are unchanged. + +To upgrade, quit OpenCode and run `npx @cortexkit/opencode-anthropic-auth@2.1.2 setup`, or change the version in your OpenCode config. diff --git a/CHANGELOG.md b/CHANGELOG.md index 36fc07b1..0ce231c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ This repo is a CortexKit-maintained Anthropic auth monorepo for OpenCode and Pi. The OpenCode package is a fork of the original `@ex-machina/opencode-anthropic-auth` plugin, so older entries below the initial CortexKit release are inherited from upstream package history. -## Unreleased +## 2.1.2 - Requests no longer wait on relay or session-pin bookkeeping locks; relay settings and tokens are checked together before sending. diff --git a/bun.lock b/bun.lock index 7069f25b..0516f6d9 100644 --- a/bun.lock +++ b/bun.lock @@ -25,7 +25,7 @@ }, "packages/core": { "name": "@cortexkit/anthropic-auth-core", - "version": "2.1.1", + "version": "2.1.2", "dependencies": { "@cortexkit/claustrum-client": "0.12.0", "@cortexkit/private-files": "0.2.1", @@ -46,13 +46,13 @@ }, "packages/opencode": { "name": "@cortexkit/opencode-anthropic-auth", - "version": "2.1.1", + "version": "2.1.2", "bin": { "opencode-anthropic-auth": "dist/cli.js", }, "dependencies": { "@clack/prompts": "^1.6.0", - "@cortexkit/anthropic-auth-core": "2.1.1", + "@cortexkit/anthropic-auth-core": "2.1.2", "@cortexkit/claustrum-client": "0.12.0", "@cortexkit/private-files": "0.2.1", "@cortexkit/subc-client": "^0.22.0", @@ -76,9 +76,9 @@ }, "packages/pi": { "name": "@cortexkit/pi-anthropic-auth", - "version": "2.1.1", + "version": "2.1.2", "dependencies": { - "@cortexkit/anthropic-auth-core": "2.1.1", + "@cortexkit/anthropic-auth-core": "2.1.2", }, "peerDependencies": { "@earendil-works/pi-ai": ">=0.86.1 <2", diff --git a/packages/core/package.json b/packages/core/package.json index 673b48bc..dafe6ff6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@cortexkit/anthropic-auth-core", - "version": "2.1.1", + "version": "2.1.2", "type": "module", "repository": { "type": "git", diff --git a/packages/opencode/package.json b/packages/opencode/package.json index d7ef4333..a74d7482 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -1,6 +1,6 @@ { "name": "@cortexkit/opencode-anthropic-auth", - "version": "2.1.1", + "version": "2.1.2", "type": "module", "repository": { "type": "git", @@ -77,7 +77,7 @@ }, "dependencies": { "@clack/prompts": "^1.6.0", - "@cortexkit/anthropic-auth-core": "2.1.1", + "@cortexkit/anthropic-auth-core": "2.1.2", "@cortexkit/claustrum-client": "0.12.0", "@cortexkit/private-files": "0.2.1", "@cortexkit/subc-client": "^0.22.0", diff --git a/packages/pi/package.json b/packages/pi/package.json index 2a185d06..7fdafd8c 100644 --- a/packages/pi/package.json +++ b/packages/pi/package.json @@ -1,6 +1,6 @@ { "name": "@cortexkit/pi-anthropic-auth", - "version": "2.1.1", + "version": "2.1.2", "type": "module", "repository": { "type": "git", @@ -36,7 +36,7 @@ "prepublishOnly": "bun run build" }, "dependencies": { - "@cortexkit/anthropic-auth-core": "2.1.1" + "@cortexkit/anthropic-auth-core": "2.1.2" }, "peerDependencies": { "@earendil-works/pi-ai": ">=0.86.1 <2",