@cortexkit/opencode-anthropic-auth 2.5.4 → 2.5.6
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/dist/cli.js +1 -1
- package/dist/{index-chmd6kg9.js → index-gqgvt8x1.js} +16 -16
- package/dist/index.js +1 -1
- package/dist/transform.d.ts +4 -0
- package/dist/v2/adapter.d.ts +1 -1
- package/dist/v2/cachekeep-store.d.ts +4 -42
- package/dist/v2/server.js +11 -11
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as a}from"./index-
|
|
1
|
+
import{t as a}from"./index-gqgvt8x1.js";import"./index-2ra790fx.js";import"./index-jc8zwxvw.js";import"./index-k6303ymz.js";import"./index-d4e8qj37.js";import"./index-crx0xd9j.js";import"./index-n8xr16kr.js";export{a as AnthropicAuthPlugin};
|
package/dist/transform.d.ts
CHANGED
|
@@ -106,6 +106,10 @@ export declare function rewriteRequestBody(body: string, options?: {
|
|
|
106
106
|
deferSigning?: boolean;
|
|
107
107
|
identity?: ClaudeCodeIdentity;
|
|
108
108
|
sessionId?: string;
|
|
109
|
+
/** Raw model id supplied by the host, not the wire body model. */
|
|
110
|
+
modelId?: string;
|
|
111
|
+
/** Whether this request uses OAuth. */
|
|
112
|
+
isOAuth?: boolean;
|
|
109
113
|
thinkingPrefixMismatchBehavior?: ThinkingPrefixMismatchBehavior;
|
|
110
114
|
midConversationEffortEnabled?: boolean;
|
|
111
115
|
midConversationEffortPlan?: string;
|
package/dist/v2/adapter.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ type RewriteBodyOptions = NonNullable<Parameters<typeof rewriteRequestBody>[1]>;
|
|
|
99
99
|
* inputs. The adapter owns identity/session correlation, final signing and
|
|
100
100
|
* the tool-name callback that binds response names to this send.
|
|
101
101
|
*/
|
|
102
|
-
export type NativeAnthropicBodyOptions = Omit<RewriteBodyOptions, 'identity' | 'sessionId' | 'onToolNameMap' | 'deferSigning'>;
|
|
102
|
+
export type NativeAnthropicBodyOptions = Omit<RewriteBodyOptions, 'identity' | 'sessionId' | 'modelId' | 'isOAuth' | 'onToolNameMap' | 'deferSigning'>;
|
|
103
103
|
type StrippedStreamOptions = NonNullable<Parameters<typeof createStrippedStream>[1]>;
|
|
104
104
|
/**
|
|
105
105
|
* The response observers a source may attach to an OAuth response. Content
|
|
@@ -1,44 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export declare
|
|
5
|
-
export type SavedCacheKeepTarget = Pick<CacheKeepTarget, 'id' | 'bodyText' | 'url' | 'cacheExpiresAt' | 'nextPrewarmAt' | 'oauthAccountIdentity' | 'isSubagent' | 'ttlMs' | 'lastTouchAt' | 'lastTouchKind'> & {
|
|
6
|
-
v: typeof RECORD_FORMAT_VERSION;
|
|
7
|
-
pluginVersion: string;
|
|
8
|
-
};
|
|
9
|
-
type Acceptance = boolean | 'foreign-identity' | 'account-gone' | 'invalid' | undefined;
|
|
10
|
-
export interface CacheKeepStoreOptions {
|
|
11
|
-
storageId: string;
|
|
12
|
-
/** Test seam for the data home; never OpenCode's config. */
|
|
13
|
-
root?: string;
|
|
14
|
-
/** Remove in the release after the next one: old temp-root migration seam. */
|
|
15
|
-
legacyRoot?: string;
|
|
16
|
-
ownerOnly?: OwnerOnlyOptions;
|
|
17
|
-
now?: () => number;
|
|
18
|
-
setTimeoutImpl?: typeof globalThis.setTimeout;
|
|
19
|
-
clearTimeoutImpl?: typeof globalThis.clearTimeout;
|
|
20
|
-
}
|
|
21
|
-
/** Best-effort restart storage. No caller of changed() waits for disk or zlib. */
|
|
22
|
-
export declare class CacheKeepStore {
|
|
23
|
-
private readonly options;
|
|
24
|
-
readonly directory: string;
|
|
25
|
-
private disabled;
|
|
26
|
-
private legacyLoadAttempted;
|
|
27
|
-
private chain;
|
|
28
|
-
private readonly pending;
|
|
29
|
-
private readonly timers;
|
|
30
|
-
private readonly lastWrite;
|
|
31
|
-
private readonly latest;
|
|
1
|
+
import { CacheKeepStore as SharedCacheKeepStore, type CacheKeepStoreOptions as SharedCacheKeepStoreOptions } from '@cortexkit/anthropic-auth-core';
|
|
2
|
+
export { cacheKeepStoreDirectory, legacyCacheKeepStoreDirectory, type SavedCacheKeepTarget, } from '@cortexkit/anthropic-auth-core';
|
|
3
|
+
export type CacheKeepStoreOptions = Omit<SharedCacheKeepStoreOptions, 'pluginVersion' | 'host'>;
|
|
4
|
+
export declare class CacheKeepStore extends SharedCacheKeepStore {
|
|
32
5
|
constructor(options: CacheKeepStoreOptions, previous?: CacheKeepStore);
|
|
33
|
-
private refuse;
|
|
34
|
-
private directoryReady;
|
|
35
|
-
private enqueue;
|
|
36
|
-
load(now: number, accept: (entry: SavedCacheKeepTarget) => Acceptance): Promise<void>;
|
|
37
|
-
changed(target: Readonly<CacheKeepTarget>): void;
|
|
38
|
-
private flush;
|
|
39
|
-
private writeEntry;
|
|
40
|
-
removed(id: string): void;
|
|
41
|
-
clear(): void;
|
|
42
|
-
drain(): Promise<void>;
|
|
43
6
|
}
|
|
44
|
-
export {};
|