Download packages/agent-core-v2/src/features/tower/towerRateLimit.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 625 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/features/tower/towerRateLimit.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/agent-core-v2/src/features/tower/towerRateLimit.ts
-
curl -L -o towerRateLimit.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/features/tower/towerRateLimit.ts
625 Bytes
| import { createDecorator } from '#/_base/di/instantiation'; | |
| export interface TowerRateLimitSnapshot { | |
| readonly budget: number; | |
| readonly inflight: number; | |
| readonly blockedUntil: number | null; | |
| } | |
| export interface ITowerRateLimitService { | |
| readonly _serviceBrand: undefined; | |
| reportRateLimited(): void; | |
| reportSuccess(): void; | |
| budget(): number; | |
| acquire(): { readonly ok: true } | { readonly ok: false; readonly reason: string }; | |
| release(): void; | |
| snapshot(): TowerRateLimitSnapshot; | |
| reset(): void; | |
| } | |
| export const ITowerRateLimitService = | |
| createDecorator<ITowerRateLimitService>('towerRateLimitService'); | |