@loopstack/quota 0.25.0 → 0.25.2
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/README.md +146 -36
- package/dist/calculators/__tests__/ai-generate-text-quota.calculator.spec.js +1 -1
- package/dist/calculators/__tests__/ai-generate-text-quota.calculator.spec.js.map +1 -1
- package/dist/calculators/__tests__/processing-time-quota.calculator.spec.js +3 -3
- package/dist/calculators/__tests__/processing-time-quota.calculator.spec.js.map +1 -1
- package/dist/services/__tests__/quota.interceptor.spec.js +1 -1
- package/dist/services/__tests__/quota.interceptor.spec.js.map +1 -1
- package/dist/services/quota.interceptor.js +1 -1
- package/dist/services/quota.interceptor.js.map +1 -1
- package/package.json +10 -6
package/README.md
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
title: Quota Module
|
|
3
|
+
description: Opt-in quota tracking and enforcement for Loopstack tool calls — QuotaModule.forRoot(), QuotaInterceptor, QuotaCalculatorRegistry, QuotaClientService, AiGenerateTextQuotaCalculator, ProcessingTimeQuotaCalculator, Redis-backed usage counters, model pricing lookup
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# @loopstack/quota
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
> Quota tracking module for the [Loopstack](https://loopstack.ai) automation framework.
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
Opt-in, Redis-backed quota tracking and enforcement for tool calls. Ships with calculators for AI token cost (USD-based, per-model pricing) and processing time, and lets you register custom calculators for any tool.
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
## When to Use
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
- You run workflows that call LLM tools and need to track or cap per-user spend
|
|
15
|
+
- You want to enforce processing-time limits across all tool calls
|
|
16
|
+
- You need a pluggable quota system where different tools report different cost metrics
|
|
17
|
+
- You are building a multi-tenant platform and need per-user usage counters backed by Redis
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
- **`QuotaCalculatorRegistry`** — maps tool names to calculator implementations; ships with `AiGenerateTextQuotaCalculator` registered for `AiGenerateText`, `AiGenerateObject`, `AiGenerateDocument`, `LlmGenerateTextTool`, `ClaudeGenerateObject`, `ClaudeGenerateDocument`
|
|
15
|
-
- **`AiGenerateTextQuotaCalculator`** — computes cost from Claude token usage (input / output tokens)
|
|
16
|
-
- **`ProcessingTimeQuotaCalculator`** — computes cost from wall-clock time
|
|
17
|
-
- **`QuotaClientService`** — increment / read quota counters directly if you need custom logic
|
|
19
|
+
If you only need simple rate limiting (requests per minute), a standard NestJS throttler may be simpler. This module is designed for cumulative usage tracking with heterogeneous cost models.
|
|
18
20
|
|
|
19
21
|
## Installation
|
|
20
22
|
|
|
@@ -22,7 +24,7 @@ By using this module you'll get:
|
|
|
22
24
|
npm install @loopstack/quota
|
|
23
25
|
```
|
|
24
26
|
|
|
25
|
-
Register the module
|
|
27
|
+
Register the module with explicit options:
|
|
26
28
|
|
|
27
29
|
```ts
|
|
28
30
|
import { QuotaModule } from '@loopstack/quota';
|
|
@@ -40,29 +42,114 @@ import { QuotaModule } from '@loopstack/quota';
|
|
|
40
42
|
export class AppModule {}
|
|
41
43
|
```
|
|
42
44
|
|
|
43
|
-
Or read configuration from
|
|
45
|
+
Or read configuration from environment variables:
|
|
44
46
|
|
|
45
47
|
```ts
|
|
46
|
-
|
|
48
|
+
@Module({
|
|
49
|
+
imports: [QuotaModule.forRootAsync()],
|
|
50
|
+
})
|
|
51
|
+
export class AppModule {}
|
|
47
52
|
```
|
|
48
53
|
|
|
49
|
-
`forRootAsync()` reads `QUOTA_ENABLED`, `QUOTA_REDIS_HOST` (
|
|
54
|
+
`forRootAsync()` reads `QUOTA_ENABLED`, `QUOTA_REDIS_HOST` (fallback `REDIS_HOST`), `QUOTA_REDIS_PORT` (fallback `REDIS_PORT`), and `QUOTA_REDIS_PASSWORD` (fallback `REDIS_PASSWORD`).
|
|
55
|
+
|
|
56
|
+
When `enabled` is `false` (the default), the Redis connection is skipped and the interceptor becomes a no-op — safe to leave wired up in development.
|
|
50
57
|
|
|
51
|
-
|
|
58
|
+
## Quick Start
|
|
59
|
+
|
|
60
|
+
Once the module is registered, the `QuotaInterceptor` is automatically discovered via `@UseToolInterceptor()` and runs on every tool call. No additional wiring is needed for the built-in calculators.
|
|
61
|
+
|
|
62
|
+
The module auto-registers `AiGenerateTextQuotaCalculator` for `LlmGenerateTextTool` and `LlmGenerateObjectTool` on startup.
|
|
63
|
+
|
|
64
|
+
To read or manipulate quota counters directly, inject `QuotaClientService`:
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
import { Injectable } from '@nestjs/common';
|
|
68
|
+
import { QuotaClientService } from '@loopstack/quota';
|
|
69
|
+
|
|
70
|
+
@Injectable()
|
|
71
|
+
export class BillingService {
|
|
72
|
+
constructor(private readonly quotaClient: QuotaClientService) {}
|
|
73
|
+
|
|
74
|
+
async getUserUsage(userId: string) {
|
|
75
|
+
const llmCost = await this.quotaClient.checkQuota(userId, 'llm-cost');
|
|
76
|
+
const processingTime = await this.quotaClient.checkQuota(userId, 'processing-time-ms');
|
|
77
|
+
return { llmCost, processingTime };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
52
81
|
|
|
53
82
|
## How It Works
|
|
54
83
|
|
|
55
|
-
|
|
84
|
+
The `QuotaInterceptor` wraps every tool call with a pre-check / post-report cycle:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
Tool call starts
|
|
88
|
+
|
|
|
89
|
+
v
|
|
90
|
+
Check processing-time quota --> exceeded? --> throw Error
|
|
91
|
+
|
|
|
92
|
+
v
|
|
93
|
+
Look up tool-specific calculator in QuotaCalculatorRegistry
|
|
94
|
+
|
|
|
95
|
+
v
|
|
96
|
+
Check tool-specific quota --> exceeded? --> throw Error
|
|
97
|
+
|
|
|
98
|
+
v
|
|
99
|
+
Execute tool
|
|
100
|
+
|
|
|
101
|
+
v
|
|
102
|
+
Report processing-time usage (wall-clock ms)
|
|
103
|
+
|
|
|
104
|
+
v
|
|
105
|
+
Report tool-specific usage (e.g. LLM cost in microcents)
|
|
106
|
+
|
|
|
107
|
+
v
|
|
108
|
+
Return result
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Quota types
|
|
112
|
+
|
|
113
|
+
Two quota types are tracked out of the box:
|
|
56
114
|
|
|
57
|
-
|
|
115
|
+
| Quota Type | Calculator | Unit | Description |
|
|
116
|
+
| -------------------- | ------------------------------- | -------------------------------- | -------------------------------------------------------------------- |
|
|
117
|
+
| `llm-cost` | `AiGenerateTextQuotaCalculator` | Microcents (1 USD = 100,000,000) | Computes cost from input/output/cache tokens using per-model pricing |
|
|
118
|
+
| `processing-time-ms` | `ProcessingTimeQuotaCalculator` | Milliseconds | Wall-clock duration of each tool call |
|
|
119
|
+
|
|
120
|
+
### Model pricing
|
|
121
|
+
|
|
122
|
+
`AiGenerateTextQuotaCalculator` uses `getModelPricing(provider, model)` to look up per-token rates. The pricing table includes Claude (Opus 4, Sonnet 4, Haiku 4, 3.5 Sonnet, 3.5 Haiku) and OpenAI (GPT-4o, GPT-4.1, o3, o4-mini, and variants). Lookup uses longest-prefix matching with provider-level fallbacks.
|
|
123
|
+
|
|
124
|
+
### Redis key structure
|
|
125
|
+
|
|
126
|
+
Counters are stored as Redis keys with the pattern:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
user:{userId}:quota:{quotaType}:used — cumulative usage (INCRBY)
|
|
130
|
+
user:{userId}:quota:{quotaType}:limit — configured limit (-1 = unlimited)
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
If no `limit` key exists in Redis, the quota is blocked by default. Set the limit key to `-1` for unlimited access.
|
|
134
|
+
|
|
135
|
+
### Fail-open behavior
|
|
136
|
+
|
|
137
|
+
If Redis is unreachable, both `checkQuota` and `report` fail open — the tool call proceeds and a warning is logged.
|
|
138
|
+
|
|
139
|
+
### Registering a custom calculator
|
|
140
|
+
|
|
141
|
+
Inject `QuotaCalculatorRegistry` and register from any module's `onModuleInit`:
|
|
58
142
|
|
|
59
143
|
```ts
|
|
60
144
|
import { Module, OnModuleInit } from '@nestjs/common';
|
|
145
|
+
import { ToolExecutionContext, ToolResult } from '@loopstack/common';
|
|
61
146
|
import { QuotaCalculatorRegistry, ToolQuotaCalculator } from '@loopstack/quota';
|
|
62
147
|
|
|
63
|
-
class
|
|
64
|
-
|
|
65
|
-
|
|
148
|
+
class ApiCallQuotaCalculator implements ToolQuotaCalculator {
|
|
149
|
+
quotaType = 'api-calls';
|
|
150
|
+
|
|
151
|
+
calculateQuotaUsage(_context: ToolExecutionContext, _result: ToolResult) {
|
|
152
|
+
return { quotaType: this.quotaType, actualAmount: 1 };
|
|
66
153
|
}
|
|
67
154
|
}
|
|
68
155
|
|
|
@@ -71,36 +158,59 @@ export class MyModule implements OnModuleInit {
|
|
|
71
158
|
constructor(private readonly registry: QuotaCalculatorRegistry) {}
|
|
72
159
|
|
|
73
160
|
onModuleInit() {
|
|
74
|
-
this.registry.register('
|
|
161
|
+
this.registry.register('MyApiTool', new ApiCallQuotaCalculator());
|
|
75
162
|
}
|
|
76
163
|
}
|
|
77
164
|
```
|
|
78
165
|
|
|
79
|
-
|
|
166
|
+
The registry key is the tool's **class name** (not the `@Tool({ name })` value).
|
|
167
|
+
|
|
168
|
+
## Configuration
|
|
169
|
+
|
|
170
|
+
### `QuotaModule.forRoot(options)`
|
|
171
|
+
|
|
172
|
+
| Option | Type | Default | Description |
|
|
173
|
+
| --------------- | --------- | ------------- | ------------------------------------------ |
|
|
174
|
+
| `enabled` | `boolean` | `false` | Enable quota tracking and Redis connection |
|
|
175
|
+
| `redisHost` | `string` | `'localhost'` | Redis host |
|
|
176
|
+
| `redisPort` | `number` | `6379` | Redis port |
|
|
177
|
+
| `redisPassword` | `string` | — | Redis password |
|
|
80
178
|
|
|
81
|
-
|
|
179
|
+
### Environment variables (`forRootAsync`)
|
|
180
|
+
|
|
181
|
+
| Variable | Fallback | Description |
|
|
182
|
+
| ---------------------- | ---------------- | ------------------------- |
|
|
183
|
+
| `QUOTA_ENABLED` | — | Set to `'true'` to enable |
|
|
184
|
+
| `QUOTA_REDIS_HOST` | `REDIS_HOST` | Redis host |
|
|
185
|
+
| `QUOTA_REDIS_PORT` | `REDIS_PORT` | Redis port |
|
|
186
|
+
| `QUOTA_REDIS_PASSWORD` | `REDIS_PASSWORD` | Redis password |
|
|
82
187
|
|
|
83
188
|
## Public API
|
|
84
189
|
|
|
85
|
-
- **Module:** `QuotaModule
|
|
86
|
-
- **Services:** `QuotaClientService`, `
|
|
87
|
-
- **
|
|
88
|
-
- **
|
|
190
|
+
- **Module:** `QuotaModule` — `forRoot(options)`, `forRootAsync()`
|
|
191
|
+
- **Services:** `QuotaClientService` — `checkQuota(userId, quotaType)`, `report(userId, quotaType, amount)`
|
|
192
|
+
- **Services:** `QuotaCalculatorRegistry` — `register(toolClassName, calculator)`, `get(toolClassName)`, `has(toolClassName)`
|
|
193
|
+
- **Interceptor:** `QuotaInterceptor` — auto-discovered via `@UseToolInterceptor({ priority: 50 })`
|
|
194
|
+
- **Calculators:** `AiGenerateTextQuotaCalculator` (quota type: `llm-cost`), `ProcessingTimeQuotaCalculator` (quota type: `processing-time-ms`)
|
|
195
|
+
- **Interfaces:** `ToolQuotaCalculator`, `QuotaClientServiceInterface`, `QuotaCheckResult`, `QuotaUsage`
|
|
89
196
|
- **Tokens:** `QUOTA_CLIENT_SERVICE`, `QUOTA_REDIS`
|
|
197
|
+
- **Utilities:** `getModelPricing(provider, model)`, `ModelPricing`
|
|
90
198
|
|
|
91
199
|
## Dependencies
|
|
92
200
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
201
|
+
| Package | Role |
|
|
202
|
+
| ------------------- | ------------------------------------------------------------------------------ |
|
|
203
|
+
| `@loopstack/common` | `ToolInterceptor`, `ToolExecutionContext`, `ToolResult`, `@UseToolInterceptor` |
|
|
204
|
+
| `@nestjs/common` | NestJS dependency injection |
|
|
205
|
+
| `ioredis` | Redis client for quota counters |
|
|
206
|
+
|
|
207
|
+
## Related
|
|
208
|
+
|
|
209
|
+
- [LLM Providers](https://loopstack.ai/docs/build/ai/llm-providers) — how LLM tools report token usage metadata consumed by the quota calculator
|
|
210
|
+
- [@loopstack/claude-module](https://loopstack.ai/docs/registry/features/claude-module) — Claude integration whose tools are metered by the built-in `AiGenerateTextQuotaCalculator`
|
|
96
211
|
|
|
97
212
|
## About
|
|
98
213
|
|
|
99
214
|
Author: [Jakob Klippel](https://www.linkedin.com/in/jakob-klippel/)
|
|
100
215
|
|
|
101
216
|
License: MIT
|
|
102
|
-
|
|
103
|
-
### Additional Resources
|
|
104
|
-
|
|
105
|
-
- [Loopstack Documentation](https://loopstack.ai/docs)
|
|
106
|
-
- Find more Loopstack modules in the [Loopstack Registry](https://loopstack.ai/registry)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-generate-text-quota.calculator.spec.js","sourceRoot":"","sources":["../../../src/calculators/__tests__/ai-generate-text-quota.calculator.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAExF,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,IAAI,UAAyC,CAAC;IAC9C,MAAM,OAAO,GAAyB;QACpC,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,SAAS;QACf,
|
|
1
|
+
{"version":3,"file":"ai-generate-text-quota.calculator.spec.js","sourceRoot":"","sources":["../../../src/calculators/__tests__/ai-generate-text-quota.calculator.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAExF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AE,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,MAAM,GAAe;YACzB,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE;SACzE,CAAC;QAGF,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;YAC9D,SAAS,EAAE,UAAU;YACrB,YAAY,EAAE,aAAa;SAC5B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -13,7 +13,7 @@ describe('ProcessingTimeQuotaCalculator', () => {
|
|
|
13
13
|
const context = {
|
|
14
14
|
tool: {},
|
|
15
15
|
args: undefined,
|
|
16
|
-
|
|
16
|
+
runContext: {
|
|
17
17
|
userId: 'user-1',
|
|
18
18
|
workspaceId: 'ws-1',
|
|
19
19
|
workflowId: '',
|
|
@@ -30,7 +30,7 @@ describe('ProcessingTimeQuotaCalculator', () => {
|
|
|
30
30
|
const context = {
|
|
31
31
|
tool: {},
|
|
32
32
|
args: undefined,
|
|
33
|
-
|
|
33
|
+
runContext: {
|
|
34
34
|
userId: 'user-1',
|
|
35
35
|
workspaceId: 'ws-1',
|
|
36
36
|
workflowId: '',
|
|
@@ -44,7 +44,7 @@ describe('ProcessingTimeQuotaCalculator', () => {
|
|
|
44
44
|
const context = {
|
|
45
45
|
tool: {},
|
|
46
46
|
args: undefined,
|
|
47
|
-
|
|
47
|
+
runContext: {
|
|
48
48
|
userId: 'user-1',
|
|
49
49
|
workspaceId: 'ws-1',
|
|
50
50
|
workflowId: '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processing-time-quota.calculator.spec.js","sourceRoot":"","sources":["../../../src/calculators/__tests__/processing-time-quota.calculator.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,IAAI,UAAyC,CAAC;IAC9C,MAAM,MAAM,GAAe,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAExC,UAAU,CAAC,GAAG,EAAE;QACd,UAAU,GAAG,IAAI,6BAA6B,EAAE,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACtD,MAAM,OAAO,GAAyB;YACpC,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,SAAS;YACf,
|
|
1
|
+
{"version":3,"file":"processing-time-quota.calculator.spec.js","sourceRoot":"","sources":["../../../src/calculators/__tests__/processing-time-quota.calculator.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,IAAI,UAAyC,CAAC;IAC9C,MAAM,MAAM,GAAe,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAExC,UAAU,CAAC,GAAG,EAAE;QACd,UAAU,GAAG,IAAI,6BAA6B,EAAE,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,IAA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5B,CAAC;QAEF,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota.interceptor.spec.js","sourceRoot":"","sources":["../../../src/services/__tests__/quota.interceptor.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,QAAQ;IACgB;IAA5B,YAA4B,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;QACtC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AAED,SAAS,aAAa,CAAC,QAAgB,EAAE,SAAyC;IAChF,OAAO;QACL,IAAI,EAAE,IAAI,QAAQ,CAAC,QAAQ,CAAC;QAC5B,IAAI,EAAE,SAAS;QACf,
|
|
1
|
+
{"version":3,"file":"quota.interceptor.spec.js","sourceRoot":"","sources":["../../../src/services/__tests__/quota.interceptor.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,QAAQ;IACgB;IAA5B,YAA4B,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;QACtC,MAAM,CAA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istry = calculatorRegistry;
|
|
24
24
|
}
|
|
25
25
|
async intercept(context, next) {
|
|
26
|
-
const userId = context.
|
|
26
|
+
const userId = context.runContext.userId;
|
|
27
27
|
const toolClassName = context.tool.constructor.name;
|
|
28
28
|
const timeCheck = await this.quotaClientService.checkQuota(userId, this.processingTimeCalculator.quotaType);
|
|
29
29
|
if (timeCheck.exceeded) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota.interceptor.js","sourceRoot":"","sources":["../../src/services/quota.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAqD,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC1G,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGxD,IAAM,gBAAgB,wBAAtB,MAAM,gBAAgB;IAKR;IACA;IALF,MAAM,GAAG,IAAI,MAAM,CAAC,kBAAgB,CAAC,IAAI,CAAC,CAAC;IAC3C,wBAAwB,GAAG,IAAI,6BAA6B,EAAE,CAAC;IAEhF,YACmB,kBAAsC,EACtC,kBAA2C;QAD3C,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,uBAAkB,GAAlB,kBAAkB,CAAyB;IAC3D,CAAC;IAEJ,KAAK,CAAC,SAAS,CAAC,OAA6B,EAAE,IAA+B;QAC5E,MAAM,MAAM,GAAG,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"quota.interceptor.js","sourceRoot":"","sources":["../../src/services/quota.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAqD,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC1G,OAAO,EAAE,6BAA6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|
|
|
32
32
|
"watch": "nest build --watch"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@loopstack/common": "^0.
|
|
36
|
-
"@nestjs/common": "^11.1.19",
|
|
37
|
-
"ioredis": "^5.10.1"
|
|
35
|
+
"@loopstack/common": "^0.33.0"
|
|
38
36
|
},
|
|
39
37
|
"devDependencies": {
|
|
40
38
|
"@nestjs/cli": "^11.0.19",
|
|
41
|
-
"
|
|
39
|
+
"@nestjs/common": "^11.1.19",
|
|
42
40
|
"@swc/core": "^1.15.33",
|
|
43
|
-
"
|
|
41
|
+
"ioredis": "^5.10.1",
|
|
42
|
+
"unplugin-swc": "^1.5.9",
|
|
43
|
+
"vitest": "^4.1.6"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@nestjs/common": "^11.0.0",
|
|
47
|
+
"ioredis": "^5.0.0"
|
|
44
48
|
},
|
|
45
49
|
"files": [
|
|
46
50
|
"dist"
|