@cortexkit/anthropic-auth-core 2.13.0 → 2.14.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/dist/cachekeep-store.d.ts +6 -2
- package/dist/cachekeep.d.ts +50 -5
- package/dist/index.js +616 -152
- package/dist/internal-types/routing-accessor/cache-policy.d.ts +2 -2
- package/dist/internal-types/store/index.d.ts +1 -1
- package/dist/internal-types/store/settings.d.ts +8 -0
- package/dist/pool-store.d.ts +0 -7
- package/dist/session-cache-policy.d.ts +10 -2
- package/package.json +2 -2
|
@@ -14,14 +14,14 @@ export interface SessionToolWait {
|
|
|
14
14
|
/** Epoch milliseconds when the oldest running plan tool started. */
|
|
15
15
|
since: number;
|
|
16
16
|
}
|
|
17
|
-
export declare const CACHE_WARM_STOP_REASONS: readonly ['cost-cap', 'count-cap', 'outside-hours', 'session-ended', 'unsupported'];
|
|
17
|
+
export declare const CACHE_WARM_STOP_REASONS: readonly ['cost-cap', 'count-cap', 'deadline-missed', 'outside-hours', 'session-ended', 'unsupported'];
|
|
18
18
|
/** Billing rejects unknown stop reasons; omit them rather than guessing. */
|
|
19
19
|
export declare function isCacheWarmStopReason(value: unknown): value is (typeof CACHE_WARM_STOP_REASONS)[number];
|
|
20
20
|
/**
|
|
21
21
|
* The stop reasons the llm-runner contract defines today; any other string is
|
|
22
22
|
* accepted too, for reasons that contract adds later.
|
|
23
23
|
*/
|
|
24
|
-
export type CacheWarmStopReason = 'cost-cap' | 'count-cap' | 'outside-hours' | 'session-ended' | 'unsupported' | (string & Record<never, never>);
|
|
24
|
+
export type CacheWarmStopReason = 'cost-cap' | 'count-cap' | 'deadline-missed' | 'outside-hours' | 'session-ended' | 'unsupported' | (string & Record<never, never>);
|
|
25
25
|
export interface CacheTouchInput {
|
|
26
26
|
/** Integer epoch milliseconds when the provider answered. */
|
|
27
27
|
at: number;
|
|
@@ -19,4 +19,4 @@ export type { PullReason } from './runtime.js';
|
|
|
19
19
|
export type { ApiKeyCredential, CredentialStampStatus, OAuthCredential, PoolCredential, PoolRow, ProviderStateCodec, ProviderStateDrop, ProviderStateReplacement, QuotaCodec, RotateCredential, StoredCredential, } from './schema.js';
|
|
20
20
|
export { fingerprintOf, LEGACY_STORE_VERSION, POOL_KEY, POOL_ROWS_KEY, POOL_SCHEMA_VERSION, PROVIDER_STATE_KEY, REFRESH_STAMP_TOLERANCE_MS, rowLockKey, } from './schema.js';
|
|
21
21
|
export type { PoolSettings, SettingsMutator, SettingsRead, UpdateSettingsOptions, UpdateSettingsResult, } from './settings.js';
|
|
22
|
-
export { POOL_OWNED_KEYS } from './settings.js';
|
|
22
|
+
export { POOL_OWNED_KEYS, readPoolSettingsAt } from './settings.js';
|
|
@@ -52,6 +52,14 @@ export type UpdateSettingsResult = {
|
|
|
52
52
|
};
|
|
53
53
|
/** Reads only the config's settings, without taking a lock or writing anything. */
|
|
54
54
|
export declare function readPoolSettings(rt: StoreRuntime): Promise<SettingsRead>;
|
|
55
|
+
/**
|
|
56
|
+
* Reads the settings of the pool config at `configPath`, exactly as a store's
|
|
57
|
+
* `readSettings()` does, without opening a store. It reads only that file: no
|
|
58
|
+
* state file, lock, write or migration. A plugin that has already resolved
|
|
59
|
+
* which config file to trust (for example, after a location check) reads it
|
|
60
|
+
* here rather than opening a second store on it.
|
|
61
|
+
*/
|
|
62
|
+
export declare function readPoolSettingsAt(configPath: string): Promise<SettingsRead>;
|
|
55
63
|
/**
|
|
56
64
|
* One locked read-modify-write of the plugin's settings in the config file
|
|
57
65
|
* the pool lives in. The pool must be ready (a pending migration or a load
|
package/dist/pool-store.d.ts
CHANGED
|
@@ -38,10 +38,3 @@ export declare function drainNativePoolStores(statePaths: readonly string[]): Pr
|
|
|
38
38
|
* authority or vault enrollment authority before using these files.
|
|
39
39
|
*/
|
|
40
40
|
export declare function createNativePoolStore(options: NativePoolStoreOptions): import("./internal-types/store/index.js").PoolStore;
|
|
41
|
-
/**
|
|
42
|
-
* Reads the plugin settings from exactly the config file at `configPath`, for
|
|
43
|
-
* a caller that resolved that file itself and must not read through another
|
|
44
|
-
* path's text. Nothing is ever written or locked through the store opened for
|
|
45
|
-
* it, so its state path is never used and is set to the config path.
|
|
46
|
-
*/
|
|
47
|
-
export declare function readNativePoolSettingsAt(configPath: string, quota: NativeQuotaCodec): Promise<import("./internal-types/store/index.js").SettingsRead>;
|
|
@@ -13,9 +13,17 @@ export declare function withSessionCacheReportHandoff<Args extends unknown[], T>
|
|
|
13
13
|
* routing report bridge, not auth, resends its newest failed touch.
|
|
14
14
|
*/
|
|
15
15
|
export declare function reportSessionCacheTouch(sessionId: string, input: CacheTouchInput): void;
|
|
16
|
-
/**
|
|
16
|
+
/** Only in-memory terminal removals report stops; startup drops and closed lifetimes are silent. */
|
|
17
|
+
export type SessionCacheWarmStopReason = CacheWarmStoppedInput['reason'];
|
|
18
|
+
export declare function isSessionCacheWarmStopReason(value: unknown): value is SessionCacheWarmStopReason;
|
|
17
19
|
export declare function reportSessionCacheWarmStopped(sessionId: string, input: CacheWarmStoppedInput): boolean;
|
|
18
20
|
/** Apply only a lifetime override; the host still chooses breakpoint placement. */
|
|
19
21
|
export declare function applySessionCacheTtl(body: Record<string, unknown>, ttl: SessionCacheTtl | undefined): void;
|
|
20
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Cache-touch reports and our local activity, hold and keep-warm timing use the
|
|
24
|
+
* longest sent lifetime: the cache is fully cold only after every prefix expires.
|
|
25
|
+
* Billing reports use requestShortestCacheLifetimeMs instead.
|
|
26
|
+
*/
|
|
21
27
|
export declare function requestCacheLifetimeMs(input: Record<string, unknown> | string): number;
|
|
28
|
+
/** Billing reports use the shortest sent lifetime among the cache breakpoints. */
|
|
29
|
+
export declare function requestShortestCacheLifetimeMs(input: Record<string, unknown> | string): number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/anthropic-auth-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepublishOnly": "bun run build"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@cortexkit/common-auth": "0.
|
|
34
|
+
"@cortexkit/common-auth": "0.51.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@cortexkit/claustrum-client": "0.18.0",
|