agent-afk 5.222.9 → 5.222.10
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/agent/providers/anthropic-direct/tracing-fetch.d.ts +2 -8
- package/dist/agent/providers/openai-compatible/tracing-fetch.d.ts +3 -6
- package/dist/agent/providers/shared/tracing-fetch-utils.d.ts +9 -0
- package/dist/cli.mjs +236 -236
- package/dist/index.mjs +108 -108
- package/dist/telegram.mjs +126 -126
- package/package.json +1 -1
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import type { TraceSink } from '../../trace/index.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
retryAfterMs?: number;
|
|
5
|
-
}
|
|
6
|
-
export interface RateLimitGate {
|
|
7
|
-
acquirePermit(estimatedInputTokens: number, signal?: AbortSignal): Promise<void>;
|
|
8
|
-
freeze(retryAfterMs: number): void;
|
|
9
|
-
}
|
|
2
|
+
import type { ThrottleInfo, RateLimitGate } from '../shared/tracing-fetch-utils.js';
|
|
3
|
+
export type { ThrottleInfo, RateLimitGate };
|
|
10
4
|
export declare function makeTracingFetch(writer: TraceSink | undefined, baseFetch?: typeof fetch, onThrottle?: (info: ThrottleInfo) => void, onQuota?: (headers: Headers) => void, onRateLimit?: (headers: Headers) => void, gate?: RateLimitGate): typeof fetch;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type { ThrottleInfo } from '../
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
freeze(retryAfterMs: number): void;
|
|
5
|
-
}
|
|
6
|
-
export declare function makeOpenAITracingFetch(baseFetch?: typeof fetch, onThrottle?: (info: ThrottleInfo) => void, onRateLimit?: (headers: Headers) => void, gate?: OpenAIRateLimitGate): typeof fetch;
|
|
1
|
+
import type { ThrottleInfo, RateLimitGate } from '../shared/tracing-fetch-utils.js';
|
|
2
|
+
export type { RateLimitGate as OpenAIRateLimitGate } from '../shared/tracing-fetch-utils.js';
|
|
3
|
+
export declare function makeOpenAITracingFetch(baseFetch?: typeof fetch, onThrottle?: (info: ThrottleInfo) => void, onRateLimit?: (headers: Headers) => void, gate?: RateLimitGate): typeof fetch;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const THROTTLE_STATUSES: Set<number>;
|
|
2
|
+
export interface ThrottleInfo {
|
|
3
|
+
status: number;
|
|
4
|
+
retryAfterMs?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface RateLimitGate {
|
|
7
|
+
acquirePermit(estimatedInputTokens: number, signal?: AbortSignal): Promise<void>;
|
|
8
|
+
freeze(retryAfterMs: number): void;
|
|
9
|
+
}
|