agent-afk 5.76.5 → 5.77.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.
@@ -0,0 +1,25 @@
1
+ export interface UsageWindow {
2
+ readonly utilization: number;
3
+ readonly resetsAt?: Date;
4
+ }
5
+ export interface UsageSnapshot {
6
+ readonly kind: 'ok';
7
+ readonly fiveHour?: UsageWindow;
8
+ readonly sevenDay?: UsageWindow;
9
+ readonly sevenDaySonnet?: UsageWindow;
10
+ readonly sevenDayOpus?: UsageWindow;
11
+ }
12
+ export type UsageUnavailableReason = 'no-token' | 'http-error' | 'malformed-response' | 'timeout' | 'network-error';
13
+ export interface UsageUnavailable {
14
+ readonly kind: 'unavailable';
15
+ readonly reason: UsageUnavailableReason;
16
+ readonly detail: string;
17
+ }
18
+ export type UsageResult = UsageSnapshot | UsageUnavailable;
19
+ export interface FetchSubscriptionUsageOptions {
20
+ readonly fetchImpl?: typeof fetch;
21
+ readonly token?: string;
22
+ readonly timeoutMs?: number;
23
+ }
24
+ export declare function fetchSubscriptionUsage(options?: FetchSubscriptionUsageOptions): Promise<UsageResult>;
25
+ export declare function formatUsagePlain(result: UsageResult): string;