Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .cortexkit/release-notes/2.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## What's new

- **Quota sidebar on OpenCode 2.** OpenCode 2 now shows the same Claude quota sidebar as OpenCode 1: 5-hour, 7-day and model bars per account, routing, cache, Prime and health, in your theme's colors and configured by the same `anthropic-auth` entry in `tui-preferences.jsonc`. It reads the account pool through the plugin, with no extra file and no credentials. Thanks to @TodoniK for the contribution.
- **Claude no longer repeats a long reply after housekeeping.** When Claude finished a long reply and then updated a board or tidied its context in the same step, it often wrote the reply again on the next step. After such a reply, the plugin now adds a short instruction that applies to that one step only, telling Claude the reply has already reached you. The tools it applies to are set by `turnEndNote.tools` (default `board` and `ctx_reduce`; an empty list turns it off). It applies to signed-in Claude accounts on Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5, and earlier instructions are re-sent unchanged so the prompt cache isn't rebuilt.

## What's fixed

- **A finished login renewal no longer fails the request.** If a background quota check finished while a login was being renewed, the renewal could report failure even though the new token was already saved. OpenCode 1 then kept a 401, OpenCode 2 gave up its retry and Pi ended the reply with an error. The saved token was never lost; the next request used it.
- **A valid login no longer waits for a background renewal.** A request whose token was still valid could wait behind a renewal already running for the same account. It is now sent at once. A request whose token Anthropic just rejected waits at most two seconds for the new one, then fails with a retryable error, and the rejected token is never sent again.
- **Fewer usage calls after insula restarts (vault mode).** While insula is starting up, or Anthropic is already rate-limiting it for an account, the plugin no longer asks Anthropic for that account's usage itself. It still asks when insula is unreachable, can't use the login, or has no current reading.
- Before an account has served a session, the collapsed sidebar no longer marks `main` as active.

## Dependencies

- `@cortexkit/common-auth` 0.22.0. OpenTUI 0.6.6 and the OpenCode 2 plugin SDK 2.0.32, each moved as one family so a single copy installs.

To upgrade, quit OpenCode and run `npx @cortexkit/opencode-anthropic-auth@2.2.0 setup`, or change the version in your OpenCode config.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.0

### Sidebar

Expand All @@ -15,7 +15,6 @@ This repo is a CortexKit-maintained Anthropic auth monorepo for OpenCode and Pi.
- Valid tokens no longer wait for proactive refreshes; requests waiting for a rejected-token refresh fail retryably after two seconds while the refresh continues.
- Prevent repeated long replies after housekeeping calls on supported OAuth models in OpenCode 1, OpenCode 2 and Pi. Add a turn-scoped reminder after tool results when the reply has at least 350 visible characters and every call is in `turnEndNote.tools` (default `board` and `ctx_reduce`; an empty list disables it). Replay earlier reminders unchanged for prompt caching, except when a reminder would sit directly before a user message; Anthropic rejects that placement. API-key routes are unchanged.


### Dependencies

- OpenTUI core and solid move to 0.6.6 together and the OpenCode 2 plugin SDK packages to 2.0.32, so each installs once. solid-js stays at 1.9.12, the exact version OpenTUI Solid 0.6.6 requires.
Expand Down
10 changes: 5 additions & 5 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cortexkit/anthropic-auth-core",
"version": "2.1.2",
"version": "2.2.0",
"type": "module",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cortexkit/opencode-anthropic-auth",
"version": "2.1.2",
"version": "2.2.0",
"type": "module",
"repository": {
"type": "git",
Expand Down Expand Up @@ -77,7 +77,7 @@
},
"dependencies": {
"@clack/prompts": "^1.6.0",
"@cortexkit/anthropic-auth-core": "2.1.2",
"@cortexkit/anthropic-auth-core": "2.2.0",
"@cortexkit/claustrum-client": "0.12.0",
"@cortexkit/private-files": "0.2.1",
"@cortexkit/subc-client": "^0.22.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/pi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cortexkit/pi-anthropic-auth",
"version": "2.1.2",
"version": "2.2.0",
"type": "module",
"repository": {
"type": "git",
Expand Down Expand Up @@ -36,7 +36,7 @@
"prepublishOnly": "bun run build"
},
"dependencies": {
"@cortexkit/anthropic-auth-core": "2.1.2"
"@cortexkit/anthropic-auth-core": "2.2.0"
},
"peerDependencies": {
"@earendil-works/pi-ai": ">=0.86.1 <2",
Expand Down
Loading