@cortexkit/opencode-anthropic-auth 1.19.1 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -2
- package/dist/cache-diagnostics.d.ts +79 -0
- package/dist/cli.js +2 -2
- package/dist/index-1db17bc2.js +2 -0
- package/dist/{index-dex8fs0m.js → index-4nz423bt.js} +1 -1
- package/dist/{index-dzs7w297.js → index-4x20896x.js} +1 -1
- package/dist/{index-2k47hc8b.js → index-w9d41yy9.js} +1 -1
- package/dist/index-wezdyxst.js +2 -0
- package/dist/{index-075t8qec.js → index-y0khnbt6.js} +1 -1
- package/dist/index-yskwj5e6.js +428 -0
- package/dist/index.d.ts +0 -37
- package/dist/index.js +23 -19
- package/dist/lane-start.d.ts +17 -0
- package/dist/{logger-n49md99d.js → logger-ftk4bg3p.js} +1 -1
- package/dist/prime-manager-registry.d.ts +7 -0
- package/dist/request-policy.d.ts +25 -0
- package/dist/rpc/port-file.js +1 -1
- package/dist/rpc/protocol.d.ts +2 -1
- package/dist/rpc/protocol.js +1 -0
- package/dist/rpc/rpc-client.js +1 -1
- package/dist/rpc/rpc-dir.js +1 -1
- package/dist/server-fallback.d.ts +2 -0
- package/dist/sidebar-state.d.ts +26 -1
- package/dist/sidebar-state.js +1 -1
- package/dist/transform.d.ts +13 -0
- package/dist/tui/command-dialogs.d.ts +16 -1
- package/dist/tui-preferences.js +1 -1
- package/package.json +4 -4
- package/src/rpc/protocol.ts +15 -10
- package/src/sidebar-state.ts +154 -17
- package/src/tui/command-dialogs.tsx +112 -0
- package/src/tui-compiled/rpc/protocol.ts +15 -10
- package/src/tui-compiled/sidebar-state.ts +154 -17
- package/src/tui-compiled/tui/command-dialogs.tsx +134 -18
- package/src/tui-compiled/tui.tsx +43 -1
- package/src/tui.tsx +28 -0
- package/dist/index-a13w4gm9.js +0 -2
- package/dist/index-vwgzgh5x.js +0 -422
package/dist/index.d.ts
CHANGED
|
@@ -1,39 +1,2 @@
|
|
|
1
|
-
import { type AccountStorage, type OAuthQuotaSnapshot } from '@cortexkit/anthropic-auth-core';
|
|
2
1
|
import type { Plugin } from '@opencode-ai/plugin';
|
|
3
|
-
/**
|
|
4
|
-
* Format the user-facing 429 message for a killswitch block. When the block
|
|
5
|
-
* is scoped-driven (the request's model matches a scoped window that is at
|
|
6
|
-
* or below the killswitch threshold), the message names the model so the
|
|
7
|
-
* operator can distinguish a per-model weekly block from a whole-account
|
|
8
|
-
* kill. Otherwise the generic account-level message is used.
|
|
9
|
-
*/
|
|
10
|
-
export declare function formatKillswitchBlockMessage(input: {
|
|
11
|
-
retryAfterSeconds: number;
|
|
12
|
-
modelName?: string;
|
|
13
|
-
}): string;
|
|
14
|
-
/**
|
|
15
|
-
* Decide whether a killswitch block is scoped-driven (a per-model weekly
|
|
16
|
-
* block) versus a whole-account 5h/7d-driven block. A block is scoped-driven
|
|
17
|
-
* only when the request's model matches a scoped window AND that window is
|
|
18
|
-
* actually at or below the per-account scoped threshold. A Fable request
|
|
19
|
-
* with a healthy Fable window is therefore correctly classified as
|
|
20
|
-
* account-level (the 5h/7d breach killed the account, not the Fable quota).
|
|
21
|
-
*
|
|
22
|
-
* Priority: account-level 5h/7d always wins. `killswitchPassesPolicy` called
|
|
23
|
-
* WITHOUT a modelId evaluates only 5h/7d; if it returns false, 5h/7d drove
|
|
24
|
-
* the block, so this is account-level regardless of the scoped window's
|
|
25
|
-
* state. Only when 5h/7d pass AND the matched scoped window is at/below the
|
|
26
|
-
* scoped threshold do we call it scoped-driven.
|
|
27
|
-
*/
|
|
28
|
-
export declare function resolveScopedDrivenBlock(input: {
|
|
29
|
-
mainQuota: OAuthQuotaSnapshot | undefined;
|
|
30
|
-
requestModelId: string | undefined;
|
|
31
|
-
storage: AccountStorage | null;
|
|
32
|
-
}): {
|
|
33
|
-
isScopedDriven: true;
|
|
34
|
-
modelName: string;
|
|
35
|
-
modelId: string;
|
|
36
|
-
} | {
|
|
37
|
-
isScopedDriven: false;
|
|
38
|
-
};
|
|
39
2
|
export declare const AnthropicAuthPlugin: Plugin;
|