@cortexkit/anthropic-auth-core 2.10.0 → 2.11.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/billing.d.ts +7 -0
- package/dist/cachekeep.d.ts +18 -2
- package/dist/constants.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +487 -112
- package/dist/internal-types/commands/builtins.d.ts +20 -1
- package/dist/internal-types/commands/index.d.ts +1 -1
- package/dist/internal-types/commands/menu.d.ts +6 -1
- package/dist/internal-types/fs/refresh-file-lock.d.ts +11 -0
- package/dist/internal-types/fs/with-lock.d.ts +2 -0
- package/dist/internal-types/routing-accessor/index.d.ts +33 -5
- package/dist/internal-types/setup/command-error.d.ts +1 -1
- package/dist/internal-types/setup/types.d.ts +4 -0
- package/dist/routing-relay.d.ts +36 -0
- package/dist/routing-reports.d.ts +7 -0
- package/dist/sticky-routing.d.ts +2 -0
- package/dist/stream-completion.d.ts +3 -1
- package/package.json +2 -2
package/dist/billing.d.ts
CHANGED
|
@@ -2,8 +2,15 @@ import { type BillingUsage, type ReportRoutingInput } from "./internal-types/rou
|
|
|
2
2
|
type BillingReport = Extract<ReportRoutingInput, {
|
|
3
3
|
kind: 'billing';
|
|
4
4
|
}>;
|
|
5
|
+
export type AnthropicBillingWarming = NonNullable<NonNullable<BillingReport['cache']>['warming']>;
|
|
5
6
|
export type AnthropicBillingRequest = Omit<BillingReport, 'kind' | 'attemptId' | 'provider' | 'outcome' | 'status' | 'providerRequestId' | 'providerResponseId' | 'usage' | 'usageByModel'> & {
|
|
6
7
|
attemptId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Read once a completed response finishes, after the host has let CacheKeep
|
|
10
|
+
* track or refuse it, so the report carries the keep-warm state that request
|
|
11
|
+
* produced. Must not wait or do I/O; `undefined` leaves `cache.warming` out.
|
|
12
|
+
*/
|
|
13
|
+
cacheWarming?: () => AnthropicBillingWarming | undefined;
|
|
7
14
|
};
|
|
8
15
|
/** Iteration usage is the billed sum; top-level usage can describe only the last model. */
|
|
9
16
|
export declare function anthropicBillingUsage(raw: Record<string, unknown>): {
|
package/dist/cachekeep.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CacheWarmStopReason } from "./internal-types/routing-accessor/index.js";
|
|
2
2
|
import type { AccountStorage } from './accounts.ts';
|
|
3
|
-
import { type AnthropicBillingRequest } from './billing.ts';
|
|
3
|
+
import { type AnthropicBillingRequest, type AnthropicBillingWarming } from './billing.ts';
|
|
4
4
|
import { type CacheKeepFailure } from './cachekeep-failure.ts';
|
|
5
5
|
import type { CacheKeepStopReason, CacheKeepTrackedSession } from './cachekeep-registry.ts';
|
|
6
6
|
import { type NativeAccountRefusalReason } from './native-account-refusal.ts';
|
|
@@ -187,6 +187,7 @@ export declare class CacheKeepManager {
|
|
|
187
187
|
private readonly targets;
|
|
188
188
|
private readonly immediateTargets;
|
|
189
189
|
private readonly stoppedSessions;
|
|
190
|
+
private readonly warmingRecords;
|
|
190
191
|
private timer;
|
|
191
192
|
private dueTimer;
|
|
192
193
|
private tickPromise;
|
|
@@ -292,6 +293,21 @@ export declare class CacheKeepManager {
|
|
|
292
293
|
*/
|
|
293
294
|
trackedPolicyState(id: string): Readonly<CacheKeepPolicyState> | undefined;
|
|
294
295
|
hasPlannedTarget(id: string): boolean;
|
|
296
|
+
/**
|
|
297
|
+
* Whether keep-warm tracks a session, read from memory only (no lock, no
|
|
298
|
+
* storage). `on: true` means a live target holds the session's cache. A stop
|
|
299
|
+
* carries its reason only when billing reports accept that reason
|
|
300
|
+
* (`isCacheWarmStopReason`); other stops report `on: false` alone.
|
|
301
|
+
* `undefined` means this manager has seen nothing that decides it.
|
|
302
|
+
*/
|
|
303
|
+
warming(id: string): AnthropicBillingWarming | undefined;
|
|
304
|
+
/**
|
|
305
|
+
* Record that a session's policy or settings keep warming off, for a host
|
|
306
|
+
* that refuses to track before reaching this manager (an API-key route,
|
|
307
|
+
* local keep-warm disabled, or a subagent without subagent warming).
|
|
308
|
+
*/
|
|
309
|
+
recordWarmingOff(id: string): void;
|
|
310
|
+
private setWarmingRecord;
|
|
295
311
|
updateSubagent(id: string, isSubagent: boolean): void;
|
|
296
312
|
/** An old response cannot price or reset a newer captured request. */
|
|
297
313
|
recordAcceptedUsage(id: string, bodyText: string, usage: AcceptedCacheUsage): void;
|
package/dist/constants.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare const CCH_SALT = "59cf53e54c78";
|
|
|
26
26
|
export declare const CCH_POSITIONS: number[];
|
|
27
27
|
export declare const CLAUDE_CODE_VERSION = "2.1.302";
|
|
28
28
|
export declare const CLAUDE_CODE_ENTRYPOINT = "cli";
|
|
29
|
+
export declare const CLAUDE_CODE_ACCEPT_ENCODING = "gzip, deflate, br, zstd";
|
|
29
30
|
export declare const CLAUDE_CODE_STAINLESS_PACKAGE_VERSION = "0.128.0";
|
|
30
31
|
export declare const CLAUDE_CODE_STAINLESS_RUNTIME_VERSION = "v26.3.0";
|
|
31
32
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ export * from './request-gzip.ts';
|
|
|
101
101
|
export * from './request-history.ts';
|
|
102
102
|
export * from './routing.ts';
|
|
103
103
|
export * from './routing-peek.ts';
|
|
104
|
+
export * from './routing-relay.ts';
|
|
105
|
+
export * from './routing-reports.ts';
|
|
104
106
|
export * from './server-fallback-usage.ts';
|
|
105
107
|
export * from './session-cache-activity.ts';
|
|
106
108
|
export * from './session-cache-policy.ts';
|