@cortexkit/opencode-anthropic-auth 2.5.5 → 2.5.7

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.
@@ -1,44 +1,6 @@
1
- import { type CacheKeepTarget, type OwnerOnlyOptions } from '@cortexkit/anthropic-auth-core';
2
- declare const RECORD_FORMAT_VERSION = 1;
3
- export declare function cacheKeepStoreDirectory(storageId: string, root?: string): string;
4
- export declare function legacyCacheKeepStoreDirectory(storageId: string, root?: string): string;
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 {};