@agentforge-io/nest 0.2.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/README.md +486 -0
- package/dist/agent-forge.module.d.ts +21 -0
- package/dist/agent-forge.module.js +144 -0
- package/dist/agent-forge.module.js.map +1 -0
- package/dist/auth/current-user.decorator.d.ts +8 -0
- package/dist/auth/current-user.decorator.js +9 -0
- package/dist/auth/current-user.decorator.js.map +1 -0
- package/dist/auth/public.decorator.d.ts +2 -0
- package/dist/auth/public.decorator.js +8 -0
- package/dist/auth/public.decorator.js.map +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +9 -0
- package/dist/constants.js.map +1 -0
- package/dist/core/agent-runner.service.d.ts +1 -0
- package/dist/core/agent-runner.service.js +6 -0
- package/dist/core/agent-runner.service.js.map +1 -0
- package/dist/core/orchestrator.service.d.ts +2 -0
- package/dist/core/orchestrator.service.js +7 -0
- package/dist/core/orchestrator.service.js.map +1 -0
- package/dist/core/tool-registry.service.d.ts +1 -0
- package/dist/core/tool-registry.service.js +6 -0
- package/dist/core/tool-registry.service.js.map +1 -0
- package/dist/database/entities/auth-identity.entity.d.ts +1 -0
- package/dist/database/entities/auth-identity.entity.js +6 -0
- package/dist/database/entities/auth-identity.entity.js.map +1 -0
- package/dist/database/entities/conversation.entity.d.ts +1 -0
- package/dist/database/entities/conversation.entity.js +6 -0
- package/dist/database/entities/conversation.entity.js.map +1 -0
- package/dist/database/entities/email-token.entity.d.ts +1 -0
- package/dist/database/entities/email-token.entity.js +6 -0
- package/dist/database/entities/email-token.entity.js.map +1 -0
- package/dist/database/entities/index.d.ts +7 -0
- package/dist/database/entities/index.js +16 -0
- package/dist/database/entities/index.js.map +1 -0
- package/dist/database/entities/message.entity.d.ts +1 -0
- package/dist/database/entities/message.entity.js +6 -0
- package/dist/database/entities/message.entity.js.map +1 -0
- package/dist/database/entities/refresh-token.entity.d.ts +1 -0
- package/dist/database/entities/refresh-token.entity.js +6 -0
- package/dist/database/entities/refresh-token.entity.js.map +1 -0
- package/dist/database/entities/subscription.entity.d.ts +1 -0
- package/dist/database/entities/subscription.entity.js +6 -0
- package/dist/database/entities/subscription.entity.js.map +1 -0
- package/dist/database/entities/usage-record.entity.d.ts +1 -0
- package/dist/database/entities/usage-record.entity.js +6 -0
- package/dist/database/entities/usage-record.entity.js.map +1 -0
- package/dist/database/entities/user.entity.d.ts +1 -0
- package/dist/database/entities/user.entity.js +6 -0
- package/dist/database/entities/user.entity.js.map +1 -0
- package/dist/decorators/agent-tool.decorator.d.ts +21 -0
- package/dist/decorators/agent-tool.decorator.js +12 -0
- package/dist/decorators/agent-tool.decorator.js.map +1 -0
- package/dist/decorators/rate-limit.decorator.d.ts +9 -0
- package/dist/decorators/rate-limit.decorator.js +11 -0
- package/dist/decorators/rate-limit.decorator.js.map +1 -0
- package/dist/decorators/require-plan.decorator.d.ts +2 -0
- package/dist/decorators/require-plan.decorator.js +8 -0
- package/dist/decorators/require-plan.decorator.js.map +1 -0
- package/dist/filters/agentforge-exception.filter.d.ts +5 -0
- package/dist/filters/agentforge-exception.filter.js +40 -0
- package/dist/filters/agentforge-exception.filter.js.map +1 -0
- package/dist/guards/rate-limit.guard.d.ts +10 -0
- package/dist/guards/rate-limit.guard.js +73 -0
- package/dist/guards/rate-limit.guard.js.map +1 -0
- package/dist/guards/usage-limit.guard.d.ts +11 -0
- package/dist/guards/usage-limit.guard.js +57 -0
- package/dist/guards/usage-limit.guard.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/interceptors/usage-tracking.interceptor.d.ts +6 -0
- package/dist/interceptors/usage-tracking.interceptor.js +30 -0
- package/dist/interceptors/usage-tracking.interceptor.js.map +1 -0
- package/dist/modules/admin/admin-plans.controller.d.ts +11 -0
- package/dist/modules/admin/admin-plans.controller.js +97 -0
- package/dist/modules/admin/admin-plans.controller.js.map +1 -0
- package/dist/modules/admin/admin-tenant-agents.controller.d.ts +61 -0
- package/dist/modules/admin/admin-tenant-agents.controller.js +424 -0
- package/dist/modules/admin/admin-tenant-agents.controller.js.map +1 -0
- package/dist/modules/admin/admin-tenant-billing.controller.d.ts +51 -0
- package/dist/modules/admin/admin-tenant-billing.controller.js +119 -0
- package/dist/modules/admin/admin-tenant-billing.controller.js.map +1 -0
- package/dist/modules/admin/admin-tenants.controller.d.ts +43 -0
- package/dist/modules/admin/admin-tenants.controller.js +178 -0
- package/dist/modules/admin/admin-tenants.controller.js.map +1 -0
- package/dist/modules/admin/admin-users.controller.d.ts +41 -0
- package/dist/modules/admin/admin-users.controller.js +121 -0
- package/dist/modules/admin/admin-users.controller.js.map +1 -0
- package/dist/modules/admin/admin.module.d.ts +2 -0
- package/dist/modules/admin/admin.module.js +26 -0
- package/dist/modules/admin/admin.module.js.map +1 -0
- package/dist/modules/admin/platform-admin.guard.d.ts +7 -0
- package/dist/modules/admin/platform-admin.guard.js +52 -0
- package/dist/modules/admin/platform-admin.guard.js.map +1 -0
- package/dist/modules/agent/agent.controller.d.ts +34 -0
- package/dist/modules/agent/agent.controller.js +178 -0
- package/dist/modules/agent/agent.controller.js.map +1 -0
- package/dist/modules/agent/agent.module.d.ts +2 -0
- package/dist/modules/agent/agent.module.js +23 -0
- package/dist/modules/agent/agent.module.js.map +1 -0
- package/dist/modules/agent/agent.service.d.ts +2 -0
- package/dist/modules/agent/agent.service.js +7 -0
- package/dist/modules/agent/agent.service.js.map +1 -0
- package/dist/modules/agent/dto/create-conversation.dto.d.ts +8 -0
- package/dist/modules/agent/dto/create-conversation.dto.js +48 -0
- package/dist/modules/agent/dto/create-conversation.dto.js.map +1 -0
- package/dist/modules/agent/dto/send-message.dto.d.ts +12 -0
- package/dist/modules/agent/dto/send-message.dto.js +42 -0
- package/dist/modules/agent/dto/send-message.dto.js.map +1 -0
- package/dist/modules/agent/in-memory-prepared-stream.store.d.ts +1 -0
- package/dist/modules/agent/in-memory-prepared-stream.store.js +6 -0
- package/dist/modules/agent/in-memory-prepared-stream.store.js.map +1 -0
- package/dist/modules/agent/prepared-stream.service.d.ts +1 -0
- package/dist/modules/agent/prepared-stream.service.js +7 -0
- package/dist/modules/agent/prepared-stream.service.js.map +1 -0
- package/dist/modules/agent/prepared-stream.types.d.ts +1 -0
- package/dist/modules/agent/prepared-stream.types.js +6 -0
- package/dist/modules/agent/prepared-stream.types.js.map +1 -0
- package/dist/modules/agent/redis-prepared-stream.store.d.ts +9 -0
- package/dist/modules/agent/redis-prepared-stream.store.js +48 -0
- package/dist/modules/agent/redis-prepared-stream.store.js.map +1 -0
- package/dist/modules/auth/auth.controller.d.ts +63 -0
- package/dist/modules/auth/auth.controller.js +255 -0
- package/dist/modules/auth/auth.controller.js.map +1 -0
- package/dist/modules/auth/auth.module.d.ts +4 -0
- package/dist/modules/auth/auth.module.js +71 -0
- package/dist/modules/auth/auth.module.js.map +1 -0
- package/dist/modules/auth/auth.service.d.ts +2 -0
- package/dist/modules/auth/auth.service.js +7 -0
- package/dist/modules/auth/auth.service.js.map +1 -0
- package/dist/modules/auth/decorators/current-user.decorator.d.ts +8 -0
- package/dist/modules/auth/decorators/current-user.decorator.js +12 -0
- package/dist/modules/auth/decorators/current-user.decorator.js.map +1 -0
- package/dist/modules/auth/decorators/public.decorator.d.ts +2 -0
- package/dist/modules/auth/decorators/public.decorator.js +8 -0
- package/dist/modules/auth/decorators/public.decorator.js.map +1 -0
- package/dist/modules/auth/dto/login.dto.d.ts +4 -0
- package/dist/modules/auth/dto/login.dto.js +29 -0
- package/dist/modules/auth/dto/login.dto.js.map +1 -0
- package/dist/modules/auth/dto/register.dto.d.ts +5 -0
- package/dist/modules/auth/dto/register.dto.js +36 -0
- package/dist/modules/auth/dto/register.dto.js.map +1 -0
- package/dist/modules/auth/guards/jwt-auth.guard.d.ts +9 -0
- package/dist/modules/auth/guards/jwt-auth.guard.js +37 -0
- package/dist/modules/auth/guards/jwt-auth.guard.js.map +1 -0
- package/dist/modules/auth/guards/local-auth.guard.d.ts +4 -0
- package/dist/modules/auth/guards/local-auth.guard.js +18 -0
- package/dist/modules/auth/guards/local-auth.guard.js.map +1 -0
- package/dist/modules/auth/guards/oauth-configured.guard.d.ts +11 -0
- package/dist/modules/auth/guards/oauth-configured.guard.js +51 -0
- package/dist/modules/auth/guards/oauth-configured.guard.js.map +1 -0
- package/dist/modules/auth/oauth.controller.d.ts +20 -0
- package/dist/modules/auth/oauth.controller.js +208 -0
- package/dist/modules/auth/oauth.controller.js.map +1 -0
- package/dist/modules/auth/refresh-token.service.d.ts +2 -0
- package/dist/modules/auth/refresh-token.service.js +7 -0
- package/dist/modules/auth/refresh-token.service.js.map +1 -0
- package/dist/modules/auth/strategies/github.strategy.d.ts +12 -0
- package/dist/modules/auth/strategies/github.strategy.js +57 -0
- package/dist/modules/auth/strategies/github.strategy.js.map +1 -0
- package/dist/modules/auth/strategies/google.strategy.d.ts +19 -0
- package/dist/modules/auth/strategies/google.strategy.js +56 -0
- package/dist/modules/auth/strategies/google.strategy.js.map +1 -0
- package/dist/modules/auth/strategies/jwt.strategy.d.ts +18 -0
- package/dist/modules/auth/strategies/jwt.strategy.js +49 -0
- package/dist/modules/auth/strategies/jwt.strategy.js.map +1 -0
- package/dist/modules/auth/strategies/local.strategy.d.ts +11 -0
- package/dist/modules/auth/strategies/local.strategy.js +31 -0
- package/dist/modules/auth/strategies/local.strategy.js.map +1 -0
- package/dist/modules/billing/adapters/billing-adapter.interface.d.ts +1 -0
- package/dist/modules/billing/adapters/billing-adapter.interface.js +6 -0
- package/dist/modules/billing/adapters/billing-adapter.interface.js.map +1 -0
- package/dist/modules/billing/adapters/stripe/stripe.adapter.d.ts +19 -0
- package/dist/modules/billing/adapters/stripe/stripe.adapter.js +118 -0
- package/dist/modules/billing/adapters/stripe/stripe.adapter.js.map +1 -0
- package/dist/modules/billing/billing.controller.d.ts +54 -0
- package/dist/modules/billing/billing.controller.js +180 -0
- package/dist/modules/billing/billing.controller.js.map +1 -0
- package/dist/modules/billing/billing.module.d.ts +2 -0
- package/dist/modules/billing/billing.module.js +57 -0
- package/dist/modules/billing/billing.module.js.map +1 -0
- package/dist/modules/billing/billing.service.d.ts +2 -0
- package/dist/modules/billing/billing.service.js +7 -0
- package/dist/modules/billing/billing.service.js.map +1 -0
- package/dist/modules/billing/usage.service.d.ts +2 -0
- package/dist/modules/billing/usage.service.js +6 -0
- package/dist/modules/billing/usage.service.js.map +1 -0
- package/dist/modules/connectors/connectors.controller.d.ts +16 -0
- package/dist/modules/connectors/connectors.controller.js +142 -0
- package/dist/modules/connectors/connectors.controller.js.map +1 -0
- package/dist/modules/connectors/connectors.module.d.ts +2 -0
- package/dist/modules/connectors/connectors.module.js +20 -0
- package/dist/modules/connectors/connectors.module.js.map +1 -0
- package/dist/modules/conversation/conversation.module.d.ts +2 -0
- package/dist/modules/conversation/conversation.module.js +17 -0
- package/dist/modules/conversation/conversation.module.js.map +1 -0
- package/dist/modules/conversation/conversation.service.d.ts +1 -0
- package/dist/modules/conversation/conversation.service.js +7 -0
- package/dist/modules/conversation/conversation.service.js.map +1 -0
- package/dist/modules/email/adapters/email-adapter.interface.d.ts +1 -0
- package/dist/modules/email/adapters/email-adapter.interface.js +6 -0
- package/dist/modules/email/adapters/email-adapter.interface.js.map +1 -0
- package/dist/modules/email/adapters/noop.adapter.d.ts +1 -0
- package/dist/modules/email/adapters/noop.adapter.js +6 -0
- package/dist/modules/email/adapters/noop.adapter.js.map +1 -0
- package/dist/modules/email/adapters/resend.adapter.d.ts +1 -0
- package/dist/modules/email/adapters/resend.adapter.js +6 -0
- package/dist/modules/email/adapters/resend.adapter.js.map +1 -0
- package/dist/modules/email/email.module.d.ts +2 -0
- package/dist/modules/email/email.module.js +17 -0
- package/dist/modules/email/email.module.js.map +1 -0
- package/dist/modules/email/email.service.d.ts +1 -0
- package/dist/modules/email/email.service.js +6 -0
- package/dist/modules/email/email.service.js.map +1 -0
- package/dist/modules/email/templates/transactional.template.d.ts +18 -0
- package/dist/modules/email/templates/transactional.template.js +43 -0
- package/dist/modules/email/templates/transactional.template.js.map +1 -0
- package/dist/modules/mcp/mcp-admin.controller.d.ts +35 -0
- package/dist/modules/mcp/mcp-admin.controller.js +111 -0
- package/dist/modules/mcp/mcp-admin.controller.js.map +1 -0
- package/dist/modules/mcp/mcp.module.d.ts +8 -0
- package/dist/modules/mcp/mcp.module.js +38 -0
- package/dist/modules/mcp/mcp.module.js.map +1 -0
- package/dist/modules/public-chat/public-chat.controller.d.ts +54 -0
- package/dist/modules/public-chat/public-chat.controller.js +279 -0
- package/dist/modules/public-chat/public-chat.controller.js.map +1 -0
- package/dist/modules/public-chat/public-chat.module.d.ts +2 -0
- package/dist/modules/public-chat/public-chat.module.js +20 -0
- package/dist/modules/public-chat/public-chat.module.js.map +1 -0
- package/dist/modules/queue/jobs.controller.d.ts +23 -0
- package/dist/modules/queue/jobs.controller.js +98 -0
- package/dist/modules/queue/jobs.controller.js.map +1 -0
- package/dist/modules/queue/processors/agent.processor.d.ts +12 -0
- package/dist/modules/queue/processors/agent.processor.js +65 -0
- package/dist/modules/queue/processors/agent.processor.js.map +1 -0
- package/dist/modules/queue/queue.module.d.ts +5 -0
- package/dist/modules/queue/queue.module.js +55 -0
- package/dist/modules/queue/queue.module.js.map +1 -0
- package/dist/modules/queue/queue.service.d.ts +15 -0
- package/dist/modules/queue/queue.service.js +86 -0
- package/dist/modules/queue/queue.service.js.map +1 -0
- package/dist/providers/repositories.providers.d.ts +3 -0
- package/dist/providers/repositories.providers.js +35 -0
- package/dist/providers/repositories.providers.js.map +1 -0
- package/dist/providers/services.providers.d.ts +4 -0
- package/dist/providers/services.providers.js +142 -0
- package/dist/providers/services.providers.js.map +1 -0
- package/dist/redis/redis.provider.d.ts +3 -0
- package/dist/redis/redis.provider.js +48 -0
- package/dist/redis/redis.provider.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.decorator.js","sourceRoot":"","sources":["../../src/auth/public.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAOhC,QAAA,aAAa,GAAG,qBAAqB,CAAC;AAQ5C,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,IAAA,oBAAW,EAAC,qBAAa,EAAE,IAAI,CAAC,CAAC;AAAhD,QAAA,MAAM,UAA0C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AGENT_FORGE_HOOKS = exports.CURRENT_USER = exports.AGENT_QUEUE_NAME = exports.AGENT_FORGE_CONFIG = void 0;
|
|
4
|
+
var core_1 = require("@agentforge-io/core");
|
|
5
|
+
Object.defineProperty(exports, "AGENT_FORGE_CONFIG", { enumerable: true, get: function () { return core_1.AGENT_FORGE_CONFIG; } });
|
|
6
|
+
Object.defineProperty(exports, "AGENT_QUEUE_NAME", { enumerable: true, get: function () { return core_1.AGENT_QUEUE_NAME; } });
|
|
7
|
+
Object.defineProperty(exports, "CURRENT_USER", { enumerable: true, get: function () { return core_1.CURRENT_USER; } });
|
|
8
|
+
exports.AGENT_FORGE_HOOKS = 'AGENT_FORGE_HOOKS';
|
|
9
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAGA,4CAAyF;AAAhF,0GAAA,kBAAkB,OAAA;AAAE,wGAAA,gBAAgB,OAAA;AAAE,oGAAA,YAAY,OAAA;AAW9C,QAAA,iBAAiB,GAAG,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AgentRunnerService } from '@agentforge-io/core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentRunnerService = void 0;
|
|
4
|
+
var core_1 = require("@agentforge-io/core");
|
|
5
|
+
Object.defineProperty(exports, "AgentRunnerService", { enumerable: true, get: function () { return core_1.AgentRunnerService; } });
|
|
6
|
+
//# sourceMappingURL=agent-runner.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-runner.service.js","sourceRoot":"","sources":["../../src/core/agent-runner.service.ts"],"names":[],"mappings":";;;AAAA,4CAAyD;AAAhD,0GAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrchestratorError = exports.OrchestratorService = void 0;
|
|
4
|
+
var core_1 = require("@agentforge-io/core");
|
|
5
|
+
Object.defineProperty(exports, "OrchestratorService", { enumerable: true, get: function () { return core_1.OrchestratorService; } });
|
|
6
|
+
Object.defineProperty(exports, "OrchestratorError", { enumerable: true, get: function () { return core_1.OrchestratorError; } });
|
|
7
|
+
//# sourceMappingURL=orchestrator.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator.service.js","sourceRoot":"","sources":["../../src/core/orchestrator.service.ts"],"names":[],"mappings":";;;AAAA,4CAA6E;AAApE,2GAAA,mBAAmB,OAAA;AAAE,yGAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ToolRegistryService } from '@agentforge-io/core';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ToolRegistryService = void 0;
|
|
4
|
+
var core_1 = require("@agentforge-io/core");
|
|
5
|
+
Object.defineProperty(exports, "ToolRegistryService", { enumerable: true, get: function () { return core_1.ToolRegistryService; } });
|
|
6
|
+
//# sourceMappingURL=tool-registry.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-registry.service.js","sourceRoot":"","sources":["../../src/core/tool-registry.service.ts"],"names":[],"mappings":";;;AAAA,4CAA0D;AAAjD,2GAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AuthIdentityEntity } from '@agentforge/typeorm';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthIdentityEntity = void 0;
|
|
4
|
+
var typeorm_1 = require("@agentforge/typeorm");
|
|
5
|
+
Object.defineProperty(exports, "AuthIdentityEntity", { enumerable: true, get: function () { return typeorm_1.AuthIdentityEntity; } });
|
|
6
|
+
//# sourceMappingURL=auth-identity.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-identity.entity.js","sourceRoot":"","sources":["../../../src/database/entities/auth-identity.entity.ts"],"names":[],"mappings":";;;AAEA,+CAAyD;AAAhD,6GAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConversationEntity } from '@agentforge/typeorm';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConversationEntity = void 0;
|
|
4
|
+
var typeorm_1 = require("@agentforge/typeorm");
|
|
5
|
+
Object.defineProperty(exports, "ConversationEntity", { enumerable: true, get: function () { return typeorm_1.ConversationEntity; } });
|
|
6
|
+
//# sourceMappingURL=conversation.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation.entity.js","sourceRoot":"","sources":["../../../src/database/entities/conversation.entity.ts"],"names":[],"mappings":";;;AAEA,+CAAyD;AAAhD,6GAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EmailTokenEntity } from '@agentforge/typeorm';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailTokenEntity = void 0;
|
|
4
|
+
var typeorm_1 = require("@agentforge/typeorm");
|
|
5
|
+
Object.defineProperty(exports, "EmailTokenEntity", { enumerable: true, get: function () { return typeorm_1.EmailTokenEntity; } });
|
|
6
|
+
//# sourceMappingURL=email-token.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-token.entity.js","sourceRoot":"","sources":["../../../src/database/entities/email-token.entity.ts"],"names":[],"mappings":";;;AAEA,+CAAuD;AAA9C,2GAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { UserEntity } from './user.entity';
|
|
2
|
+
export { ConversationEntity } from './conversation.entity';
|
|
3
|
+
export { MessageEntity } from './message.entity';
|
|
4
|
+
export { RefreshTokenEntity } from './refresh-token.entity';
|
|
5
|
+
export { AuthIdentityEntity } from './auth-identity.entity';
|
|
6
|
+
export { EmailTokenEntity } from './email-token.entity';
|
|
7
|
+
export type { EmailTokenPurpose } from '@agentforge/core';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailTokenEntity = exports.AuthIdentityEntity = exports.RefreshTokenEntity = exports.MessageEntity = exports.ConversationEntity = exports.UserEntity = void 0;
|
|
4
|
+
var user_entity_1 = require("./user.entity");
|
|
5
|
+
Object.defineProperty(exports, "UserEntity", { enumerable: true, get: function () { return user_entity_1.UserEntity; } });
|
|
6
|
+
var conversation_entity_1 = require("./conversation.entity");
|
|
7
|
+
Object.defineProperty(exports, "ConversationEntity", { enumerable: true, get: function () { return conversation_entity_1.ConversationEntity; } });
|
|
8
|
+
var message_entity_1 = require("./message.entity");
|
|
9
|
+
Object.defineProperty(exports, "MessageEntity", { enumerable: true, get: function () { return message_entity_1.MessageEntity; } });
|
|
10
|
+
var refresh_token_entity_1 = require("./refresh-token.entity");
|
|
11
|
+
Object.defineProperty(exports, "RefreshTokenEntity", { enumerable: true, get: function () { return refresh_token_entity_1.RefreshTokenEntity; } });
|
|
12
|
+
var auth_identity_entity_1 = require("./auth-identity.entity");
|
|
13
|
+
Object.defineProperty(exports, "AuthIdentityEntity", { enumerable: true, get: function () { return auth_identity_entity_1.AuthIdentityEntity; } });
|
|
14
|
+
var email_token_entity_1 = require("./email-token.entity");
|
|
15
|
+
Object.defineProperty(exports, "EmailTokenEntity", { enumerable: true, get: function () { return email_token_entity_1.EmailTokenEntity; } });
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/database/entities/index.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAC3B,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AACtB,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA;AAC3B,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA;AAC3B,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MessageEntity } from '@agentforge/typeorm';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageEntity = void 0;
|
|
4
|
+
var typeorm_1 = require("@agentforge/typeorm");
|
|
5
|
+
Object.defineProperty(exports, "MessageEntity", { enumerable: true, get: function () { return typeorm_1.MessageEntity; } });
|
|
6
|
+
//# sourceMappingURL=message.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.entity.js","sourceRoot":"","sources":["../../../src/database/entities/message.entity.ts"],"names":[],"mappings":";;;AAEA,+CAAoD;AAA3C,wGAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RefreshTokenEntity } from '@agentforge/typeorm';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RefreshTokenEntity = void 0;
|
|
4
|
+
var typeorm_1 = require("@agentforge/typeorm");
|
|
5
|
+
Object.defineProperty(exports, "RefreshTokenEntity", { enumerable: true, get: function () { return typeorm_1.RefreshTokenEntity; } });
|
|
6
|
+
//# sourceMappingURL=refresh-token.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh-token.entity.js","sourceRoot":"","sources":["../../../src/database/entities/refresh-token.entity.ts"],"names":[],"mappings":";;;AAEA,+CAAyD;AAAhD,6GAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SubscriptionEntity } from '@agentforge/typeorm';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscriptionEntity = void 0;
|
|
4
|
+
var typeorm_1 = require("@agentforge/typeorm");
|
|
5
|
+
Object.defineProperty(exports, "SubscriptionEntity", { enumerable: true, get: function () { return typeorm_1.SubscriptionEntity; } });
|
|
6
|
+
//# sourceMappingURL=subscription.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription.entity.js","sourceRoot":"","sources":["../../../src/database/entities/subscription.entity.ts"],"names":[],"mappings":";;;AAEA,+CAAyD;AAAhD,6GAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UsageRecordEntity } from '@agentforge/typeorm';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UsageRecordEntity = void 0;
|
|
4
|
+
var typeorm_1 = require("@agentforge/typeorm");
|
|
5
|
+
Object.defineProperty(exports, "UsageRecordEntity", { enumerable: true, get: function () { return typeorm_1.UsageRecordEntity; } });
|
|
6
|
+
//# sourceMappingURL=usage-record.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-record.entity.js","sourceRoot":"","sources":["../../../src/database/entities/usage-record.entity.ts"],"names":[],"mappings":";;;AAEA,+CAAwD;AAA/C,4GAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UserEntity } from '@agentforge/typeorm';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserEntity = void 0;
|
|
4
|
+
var typeorm_1 = require("@agentforge/typeorm");
|
|
5
|
+
Object.defineProperty(exports, "UserEntity", { enumerable: true, get: function () { return typeorm_1.UserEntity; } });
|
|
6
|
+
//# sourceMappingURL=user.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../../src/database/entities/user.entity.ts"],"names":[],"mappings":";;;AAEA,+CAAiD;AAAxC,qGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const AGENT_TOOL_METADATA = "AGENT_TOOL_METADATA";
|
|
2
|
+
export interface AgentToolMetadata {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: Record<string, unknown>;
|
|
6
|
+
agents?: string[];
|
|
7
|
+
}
|
|
8
|
+
export declare const AgentTool: (metadata: AgentToolMetadata) => import("@nestjs/common").CustomDecorator<string>;
|
|
9
|
+
export declare function defineTool(tool: {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
inputSchema: Record<string, unknown>;
|
|
13
|
+
agents?: string[];
|
|
14
|
+
execute: (input: Record<string, unknown>, context: any) => Promise<string>;
|
|
15
|
+
}): {
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
inputSchema: Record<string, unknown>;
|
|
19
|
+
agents?: string[];
|
|
20
|
+
execute: (input: Record<string, unknown>, context: any) => Promise<string>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentTool = exports.AGENT_TOOL_METADATA = void 0;
|
|
4
|
+
exports.defineTool = defineTool;
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
exports.AGENT_TOOL_METADATA = 'AGENT_TOOL_METADATA';
|
|
7
|
+
const AgentTool = (metadata) => (0, common_1.SetMetadata)(exports.AGENT_TOOL_METADATA, metadata);
|
|
8
|
+
exports.AgentTool = AgentTool;
|
|
9
|
+
function defineTool(tool) {
|
|
10
|
+
return tool;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=agent-tool.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-tool.decorator.js","sourceRoot":"","sources":["../../src/decorators/agent-tool.decorator.ts"],"names":[],"mappings":";;;AAmDA,gCAQC;AA3DD,2CAA6C;AAEhC,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAiClD,MAAM,SAAS,GAAG,CAAC,QAA2B,EAAE,EAAE,CACvD,IAAA,oBAAW,EAAC,2BAAmB,EAAE,QAAQ,CAAC,CAAC;AADhC,QAAA,SAAS,aACuB;AAe7C,SAAgB,UAAU,CAAC,IAM1B;IACC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const AGENTFORGE_RATE_LIMIT_META = "AGENTFORGE_RATE_LIMIT";
|
|
2
|
+
export declare const AGENTFORGE_RATE_LIMIT_SKIP_META = "AGENTFORGE_RATE_LIMIT_SKIP";
|
|
3
|
+
export interface RateLimitMetadata {
|
|
4
|
+
bucket: string;
|
|
5
|
+
limit: number;
|
|
6
|
+
windowMs: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const AgentForgeRateLimit: (meta: RateLimitMetadata) => MethodDecorator & ClassDecorator;
|
|
9
|
+
export declare const SkipRateLimit: () => MethodDecorator & ClassDecorator;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SkipRateLimit = exports.AgentForgeRateLimit = exports.AGENTFORGE_RATE_LIMIT_SKIP_META = exports.AGENTFORGE_RATE_LIMIT_META = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
exports.AGENTFORGE_RATE_LIMIT_META = 'AGENTFORGE_RATE_LIMIT';
|
|
6
|
+
exports.AGENTFORGE_RATE_LIMIT_SKIP_META = 'AGENTFORGE_RATE_LIMIT_SKIP';
|
|
7
|
+
const AgentForgeRateLimit = (meta) => (0, common_1.SetMetadata)(exports.AGENTFORGE_RATE_LIMIT_META, meta);
|
|
8
|
+
exports.AgentForgeRateLimit = AgentForgeRateLimit;
|
|
9
|
+
const SkipRateLimit = () => (0, common_1.SetMetadata)(exports.AGENTFORGE_RATE_LIMIT_SKIP_META, true);
|
|
10
|
+
exports.SkipRateLimit = SkipRateLimit;
|
|
11
|
+
//# sourceMappingURL=rate-limit.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rate-limit.decorator.js","sourceRoot":"","sources":["../../src/decorators/rate-limit.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAEhC,QAAA,0BAA0B,GAAG,uBAAuB,CAAC;AACrD,QAAA,+BAA+B,GAAG,4BAA4B,CAAC;AAgBrE,MAAM,mBAAmB,GAAG,CAAC,IAAuB,EAAoC,EAAE,CAC/F,IAAA,oBAAW,EAAC,kCAA0B,EAAE,IAAI,CAAC,CAAC;AADnC,QAAA,mBAAmB,uBACgB;AAMzC,MAAM,aAAa,GAAG,GAAqC,EAAE,CAClE,IAAA,oBAAW,EAAC,uCAA+B,EAAE,IAAI,CAAC,CAAC;AADxC,QAAA,aAAa,iBAC2B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequirePlan = exports.REQUIRED_PLAN_KEY = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
exports.REQUIRED_PLAN_KEY = 'REQUIRED_PLAN';
|
|
6
|
+
const RequirePlan = (...planIds) => (0, common_1.SetMetadata)(exports.REQUIRED_PLAN_KEY, planIds);
|
|
7
|
+
exports.RequirePlan = RequirePlan;
|
|
8
|
+
//# sourceMappingURL=require-plan.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-plan.decorator.js","sourceRoot":"","sources":["../../src/decorators/require-plan.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAEhC,QAAA,iBAAiB,GAAG,eAAe,CAAC;AAY1C,MAAM,WAAW,GAAG,CAAC,GAAG,OAAiB,EAAE,EAAE,CAClD,IAAA,oBAAW,EAAC,yBAAiB,EAAE,OAAO,CAAC,CAAC;AAD7B,QAAA,WAAW,eACkB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AgentForgeExceptionFilter = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
let AgentForgeExceptionFilter = class AgentForgeExceptionFilter {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.logger = new common_1.Logger('AgentForge');
|
|
14
|
+
}
|
|
15
|
+
catch(exception, host) {
|
|
16
|
+
if (exception instanceof common_1.HttpException) {
|
|
17
|
+
const res = host.switchToHttp().getResponse();
|
|
18
|
+
const status = exception.getStatus();
|
|
19
|
+
res.status(status).json(exception.getResponse());
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const err = exception;
|
|
23
|
+
const status = typeof err?.status === 'number' && err.status >= 400 && err.status < 600
|
|
24
|
+
? err.status
|
|
25
|
+
: 500;
|
|
26
|
+
if (status >= 500) {
|
|
27
|
+
this.logger.error(`Unhandled error: ${err?.message ?? exception}`, exception?.stack);
|
|
28
|
+
}
|
|
29
|
+
const res = host.switchToHttp().getResponse();
|
|
30
|
+
res.status(status).json({
|
|
31
|
+
error: err?.code ?? 'internal_error',
|
|
32
|
+
message: err?.message ?? 'Internal server error',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.AgentForgeExceptionFilter = AgentForgeExceptionFilter;
|
|
37
|
+
exports.AgentForgeExceptionFilter = AgentForgeExceptionFilter = __decorate([
|
|
38
|
+
(0, common_1.Catch)()
|
|
39
|
+
], AgentForgeExceptionFilter);
|
|
40
|
+
//# sourceMappingURL=agentforge-exception.filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentforge-exception.filter.js","sourceRoot":"","sources":["../../src/filters/agentforge-exception.filter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAMwB;AAmBjB,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAA/B;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,YAAY,CAAC,CAAC;IA+BrD,CAAC;IA7BC,KAAK,CAAC,SAAkB,EAAE,IAAmB;QAG3C,IAAI,SAAS,YAAY,sBAAa,EAAE,CAAC;YACvC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,WAAW,EAAY,CAAC;YACxD,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC;YACrC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;YACjD,OAAO;QACT,CAAC;QAED,MAAM,GAAG,GAAG,SAAiF,CAAC;QAC9F,MAAM,MAAM,GAAG,OAAO,GAAG,EAAE,MAAM,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG;YACrF,CAAC,CAAC,GAAG,CAAC,MAAM;YACZ,CAAC,CAAC,GAAG,CAAC;QAER,IAAI,MAAM,IAAI,GAAG,EAAE,CAAC;YAElB,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,oBAAoB,GAAG,EAAE,OAAO,IAAI,SAAS,EAAE,EAC9C,SAAmB,EAAE,KAAK,CAC5B,CAAC;QACJ,CAAC;QAED,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,WAAW,EAAY,CAAC;QACxD,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;YACtB,KAAK,EAAE,GAAG,EAAE,IAAI,IAAI,gBAAgB;YACpC,OAAO,EAAE,GAAG,EAAE,OAAO,IAAI,uBAAuB;SACjD,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAhCY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,cAAK,GAAE;GACK,yBAAyB,CAgCrC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
import { type RateLimiter } from '@agentforge-io/core';
|
|
4
|
+
export declare class AgentForgeRateLimitGuard implements CanActivate {
|
|
5
|
+
private readonly reflector;
|
|
6
|
+
private readonly limiter;
|
|
7
|
+
private readonly logger;
|
|
8
|
+
constructor(reflector: Reflector, limiter: RateLimiter);
|
|
9
|
+
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var AgentForgeRateLimitGuard_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AgentForgeRateLimitGuard = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const core_1 = require("@nestjs/core");
|
|
19
|
+
const core_2 = require("@agentforge-io/core");
|
|
20
|
+
const rate_limit_decorator_1 = require("../decorators/rate-limit.decorator");
|
|
21
|
+
const DEFAULT_BUCKET = 'default';
|
|
22
|
+
const DEFAULT_LIMIT = 100;
|
|
23
|
+
const DEFAULT_WINDOW_MS = 60_000;
|
|
24
|
+
let AgentForgeRateLimitGuard = AgentForgeRateLimitGuard_1 = class AgentForgeRateLimitGuard {
|
|
25
|
+
constructor(reflector, limiter) {
|
|
26
|
+
this.reflector = reflector;
|
|
27
|
+
this.limiter = limiter;
|
|
28
|
+
this.logger = new common_1.Logger(AgentForgeRateLimitGuard_1.name);
|
|
29
|
+
}
|
|
30
|
+
async canActivate(context) {
|
|
31
|
+
const skip = this.reflector.getAllAndOverride(rate_limit_decorator_1.AGENTFORGE_RATE_LIMIT_SKIP_META, [
|
|
32
|
+
context.getHandler(),
|
|
33
|
+
context.getClass(),
|
|
34
|
+
]);
|
|
35
|
+
if (skip)
|
|
36
|
+
return true;
|
|
37
|
+
const meta = this.reflector.getAllAndOverride(rate_limit_decorator_1.AGENTFORGE_RATE_LIMIT_META, [
|
|
38
|
+
context.getHandler(),
|
|
39
|
+
context.getClass(),
|
|
40
|
+
]) ?? { bucket: DEFAULT_BUCKET, limit: DEFAULT_LIMIT, windowMs: DEFAULT_WINDOW_MS };
|
|
41
|
+
const http = context.switchToHttp();
|
|
42
|
+
const req = http.getRequest();
|
|
43
|
+
const res = http.getResponse();
|
|
44
|
+
const id = req.ip ?? req.socket.remoteAddress ?? 'unknown';
|
|
45
|
+
const key = `${meta.bucket}:${id}`;
|
|
46
|
+
let result;
|
|
47
|
+
try {
|
|
48
|
+
result = await this.limiter.consume(key, {
|
|
49
|
+
windowMs: meta.windowMs,
|
|
50
|
+
max: meta.limit,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
this.logger.error(`Rate limiter error — failing open: ${err.message}`);
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
res.setHeader('X-RateLimit-Limit', String(meta.limit));
|
|
58
|
+
res.setHeader('X-RateLimit-Remaining', String(result.remaining));
|
|
59
|
+
res.setHeader('X-RateLimit-Reset', String(Math.ceil(result.retryAfterMs / 1000)));
|
|
60
|
+
if (!result.allowed) {
|
|
61
|
+
res.setHeader('Retry-After', String(Math.ceil(result.retryAfterMs / 1000)));
|
|
62
|
+
throw new common_1.HttpException({ error: 'rate_limited', message: 'Too many requests. Try again later.' }, common_1.HttpStatus.TOO_MANY_REQUESTS);
|
|
63
|
+
}
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.AgentForgeRateLimitGuard = AgentForgeRateLimitGuard;
|
|
68
|
+
exports.AgentForgeRateLimitGuard = AgentForgeRateLimitGuard = AgentForgeRateLimitGuard_1 = __decorate([
|
|
69
|
+
(0, common_1.Injectable)(),
|
|
70
|
+
__param(1, (0, common_1.Inject)(core_2.RATE_LIMITER)),
|
|
71
|
+
__metadata("design:paramtypes", [core_1.Reflector, Object])
|
|
72
|
+
], AgentForgeRateLimitGuard);
|
|
73
|
+
//# sourceMappingURL=rate-limit.guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rate-limit.guard.js","sourceRoot":"","sources":["../../src/guards/rate-limit.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAQwB;AACxB,uCAAyC;AACzC,8CAAqE;AAErE,6EAI4C;AAG5C,MAAM,cAAc,GAAG,SAAS,CAAC;AACjC,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAa1B,IAAM,wBAAwB,gCAA9B,MAAM,wBAAwB;IAGnC,YACmB,SAAoB,EACf,OAAqC;QAD1C,cAAS,GAAT,SAAS,CAAW;QACE,YAAO,GAAP,OAAO,CAAa;QAJ5C,WAAM,GAAG,IAAI,eAAM,CAAC,0BAAwB,CAAC,IAAI,CAAC,CAAC;IAKjE,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,OAAyB;QACzC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAU,sDAA+B,EAAE;YACtF,OAAO,CAAC,UAAU,EAAE;YACpB,OAAO,CAAC,QAAQ,EAAE;SACnB,CAAC,CAAC;QACH,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAEtB,MAAM,IAAI,GACR,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAoB,iDAA0B,EAAE;YAC9E,OAAO,CAAC,UAAU,EAAE;YACpB,OAAO,CAAC,QAAQ,EAAE;SACnB,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;QAEtF,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;QACpC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,EAAW,CAAC;QACvC,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAY,CAAC;QAEzC,MAAM,EAAE,GAAG,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,aAAa,IAAI,SAAS,CAAC;QAC3D,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;QAEnC,IAAI,MAAM,CAAC;QACX,IAAI,CAAC;YACH,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE;gBACvC,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,GAAG,EAAE,IAAI,CAAC,KAAK;aAChB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sCAAuC,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;YAClF,OAAO,IAAI,CAAC;QACd,CAAC;QAED,GAAG,CAAC,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACvD,GAAG,CAAC,SAAS,CAAC,uBAAuB,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QACjE,GAAG,CAAC,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAElF,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,GAAG,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAC5E,MAAM,IAAI,sBAAa,CACrB,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,qCAAqC,EAAE,EACzE,mBAAU,CAAC,iBAAiB,CAC7B,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AArDY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;IAMR,WAAA,IAAA,eAAM,EAAC,mBAAY,CAAC,CAAA;qCADO,gBAAS;GAJ5B,wBAAwB,CAqDpC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
|
2
|
+
import { Reflector } from '@nestjs/core';
|
|
3
|
+
import { type UserRepository, UsageService } from '@agentforge/core';
|
|
4
|
+
export declare class UsageLimitGuard implements CanActivate {
|
|
5
|
+
private readonly reflector;
|
|
6
|
+
private readonly usageService;
|
|
7
|
+
private readonly users;
|
|
8
|
+
private readonly logger;
|
|
9
|
+
constructor(reflector: Reflector, usageService: UsageService, users: UserRepository);
|
|
10
|
+
canActivate(context: ExecutionContext): Promise<boolean>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var UsageLimitGuard_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UsageLimitGuard = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const core_1 = require("@nestjs/core");
|
|
19
|
+
const core_2 = require("@agentforge/core");
|
|
20
|
+
const require_plan_decorator_1 = require("../decorators/require-plan.decorator");
|
|
21
|
+
let UsageLimitGuard = UsageLimitGuard_1 = class UsageLimitGuard {
|
|
22
|
+
constructor(reflector, usageService, users) {
|
|
23
|
+
this.reflector = reflector;
|
|
24
|
+
this.usageService = usageService;
|
|
25
|
+
this.users = users;
|
|
26
|
+
this.logger = new common_1.Logger(UsageLimitGuard_1.name);
|
|
27
|
+
}
|
|
28
|
+
async canActivate(context) {
|
|
29
|
+
const request = context.switchToHttp().getRequest();
|
|
30
|
+
const userId = request.user?.userId;
|
|
31
|
+
if (!userId)
|
|
32
|
+
return true;
|
|
33
|
+
const requiredPlans = this.reflector.getAllAndOverride(require_plan_decorator_1.REQUIRED_PLAN_KEY, [
|
|
34
|
+
context.getHandler(),
|
|
35
|
+
context.getClass(),
|
|
36
|
+
]);
|
|
37
|
+
if (requiredPlans?.length) {
|
|
38
|
+
const user = await this.users.findById(userId);
|
|
39
|
+
if (!user || !requiredPlans.includes(user.currentPlanId)) {
|
|
40
|
+
throw new common_1.ForbiddenException(`This feature requires one of these plans: ${requiredPlans.join(', ')}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const { allowed, reason } = await this.usageService.checkLimits(userId);
|
|
44
|
+
if (!allowed) {
|
|
45
|
+
throw new common_1.ForbiddenException(`Usage limit exceeded: ${reason}`);
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
exports.UsageLimitGuard = UsageLimitGuard;
|
|
51
|
+
exports.UsageLimitGuard = UsageLimitGuard = UsageLimitGuard_1 = __decorate([
|
|
52
|
+
(0, common_1.Injectable)(),
|
|
53
|
+
__param(2, (0, common_1.Inject)(core_2.USER_REPOSITORY)),
|
|
54
|
+
__metadata("design:paramtypes", [core_1.Reflector,
|
|
55
|
+
core_2.UsageService, Object])
|
|
56
|
+
], UsageLimitGuard);
|
|
57
|
+
//# sourceMappingURL=usage-limit.guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-limit.guard.js","sourceRoot":"","sources":["../../src/guards/usage-limit.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAOwB;AACxB,uCAAyC;AACzC,2CAAsF;AACtF,iFAAyE;AAalE,IAAM,eAAe,uBAArB,MAAM,eAAe;IAG1B,YACmB,SAAoB,EACpB,YAA0B,EAClB,KAAsC;QAF9C,cAAS,GAAT,SAAS,CAAW;QACpB,iBAAY,GAAZ,YAAY,CAAc;QACD,UAAK,GAAL,KAAK,CAAgB;QALhD,WAAM,GAAG,IAAI,eAAM,CAAC,iBAAe,CAAC,IAAI,CAAC,CAAC;IAMxD,CAAC;IAEJ,KAAK,CAAC,WAAW,CAAC,OAAyB;QACzC,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAE7C,CAAC;QAGL,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;QAEpC,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAGzB,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAW,0CAAiB,EAAE;YAClF,OAAO,CAAC,UAAU,EAAE;YACpB,OAAO,CAAC,QAAQ,EAAE;SACnB,CAAC,CAAC;QAEH,IAAI,aAAa,EAAE,MAAM,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC/C,IAAI,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzD,MAAM,IAAI,2BAAkB,CAC1B,6CAA6C,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACxE,CAAC;YACJ,CAAC;QACH,CAAC;QAGD,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACxE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,2BAAkB,CAAC,yBAAyB,MAAM,EAAE,CAAC,CAAC;QAClE,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AA1CY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;IAOR,WAAA,IAAA,eAAM,EAAC,sBAAe,CAAC,CAAA;qCAFI,gBAAS;QACN,mBAAY;GALlC,eAAe,CA0C3B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { AgentForgeModule } from './agent-forge.module';
|
|
2
|
+
export type { AgentForgeModuleOptions } from './agent-forge.module';
|
|
3
|
+
export { AGENT_FORGE_CONFIG, AGENT_QUEUE_NAME, AGENT_FORGE_HOOKS } from './constants';
|
|
4
|
+
export { CurrentUser } from './auth/current-user.decorator';
|
|
5
|
+
export type { AuthUser } from './auth/current-user.decorator';
|
|
6
|
+
export { Public, IS_PUBLIC_KEY } from './auth/public.decorator';
|
|
7
|
+
export { AgentTool, defineTool } from './decorators/agent-tool.decorator';
|
|
8
|
+
export type { AgentToolMetadata } from './decorators/agent-tool.decorator';
|
|
9
|
+
export { AgentForgeRateLimit, SkipRateLimit, type RateLimitMetadata, } from './decorators/rate-limit.decorator';
|
|
10
|
+
export { AgentForgeRateLimitGuard } from './guards/rate-limit.guard';
|
|
11
|
+
export { AgentForgeExceptionFilter } from './filters/agentforge-exception.filter';
|
|
12
|
+
export { CreateConversationDto } from './modules/agent/dto/create-conversation.dto';
|
|
13
|
+
export { SendMessageDto } from './modules/agent/dto/send-message.dto';
|
|
14
|
+
export { AGENT_RESOLVER } from './providers/services.providers';
|
|
15
|
+
export { ConnectorsModule } from './modules/connectors/connectors.module';
|
|
16
|
+
export { ConnectorsController } from './modules/connectors/connectors.controller';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectorsController = exports.ConnectorsModule = exports.AGENT_RESOLVER = exports.SendMessageDto = exports.CreateConversationDto = exports.AgentForgeExceptionFilter = exports.AgentForgeRateLimitGuard = exports.SkipRateLimit = exports.AgentForgeRateLimit = exports.defineTool = exports.AgentTool = exports.IS_PUBLIC_KEY = exports.Public = exports.CurrentUser = exports.AGENT_FORGE_HOOKS = exports.AGENT_QUEUE_NAME = exports.AGENT_FORGE_CONFIG = exports.AgentForgeModule = void 0;
|
|
4
|
+
var agent_forge_module_1 = require("./agent-forge.module");
|
|
5
|
+
Object.defineProperty(exports, "AgentForgeModule", { enumerable: true, get: function () { return agent_forge_module_1.AgentForgeModule; } });
|
|
6
|
+
var constants_1 = require("./constants");
|
|
7
|
+
Object.defineProperty(exports, "AGENT_FORGE_CONFIG", { enumerable: true, get: function () { return constants_1.AGENT_FORGE_CONFIG; } });
|
|
8
|
+
Object.defineProperty(exports, "AGENT_QUEUE_NAME", { enumerable: true, get: function () { return constants_1.AGENT_QUEUE_NAME; } });
|
|
9
|
+
Object.defineProperty(exports, "AGENT_FORGE_HOOKS", { enumerable: true, get: function () { return constants_1.AGENT_FORGE_HOOKS; } });
|
|
10
|
+
var current_user_decorator_1 = require("./auth/current-user.decorator");
|
|
11
|
+
Object.defineProperty(exports, "CurrentUser", { enumerable: true, get: function () { return current_user_decorator_1.CurrentUser; } });
|
|
12
|
+
var public_decorator_1 = require("./auth/public.decorator");
|
|
13
|
+
Object.defineProperty(exports, "Public", { enumerable: true, get: function () { return public_decorator_1.Public; } });
|
|
14
|
+
Object.defineProperty(exports, "IS_PUBLIC_KEY", { enumerable: true, get: function () { return public_decorator_1.IS_PUBLIC_KEY; } });
|
|
15
|
+
var agent_tool_decorator_1 = require("./decorators/agent-tool.decorator");
|
|
16
|
+
Object.defineProperty(exports, "AgentTool", { enumerable: true, get: function () { return agent_tool_decorator_1.AgentTool; } });
|
|
17
|
+
Object.defineProperty(exports, "defineTool", { enumerable: true, get: function () { return agent_tool_decorator_1.defineTool; } });
|
|
18
|
+
var rate_limit_decorator_1 = require("./decorators/rate-limit.decorator");
|
|
19
|
+
Object.defineProperty(exports, "AgentForgeRateLimit", { enumerable: true, get: function () { return rate_limit_decorator_1.AgentForgeRateLimit; } });
|
|
20
|
+
Object.defineProperty(exports, "SkipRateLimit", { enumerable: true, get: function () { return rate_limit_decorator_1.SkipRateLimit; } });
|
|
21
|
+
var rate_limit_guard_1 = require("./guards/rate-limit.guard");
|
|
22
|
+
Object.defineProperty(exports, "AgentForgeRateLimitGuard", { enumerable: true, get: function () { return rate_limit_guard_1.AgentForgeRateLimitGuard; } });
|
|
23
|
+
var agentforge_exception_filter_1 = require("./filters/agentforge-exception.filter");
|
|
24
|
+
Object.defineProperty(exports, "AgentForgeExceptionFilter", { enumerable: true, get: function () { return agentforge_exception_filter_1.AgentForgeExceptionFilter; } });
|
|
25
|
+
var create_conversation_dto_1 = require("./modules/agent/dto/create-conversation.dto");
|
|
26
|
+
Object.defineProperty(exports, "CreateConversationDto", { enumerable: true, get: function () { return create_conversation_dto_1.CreateConversationDto; } });
|
|
27
|
+
var send_message_dto_1 = require("./modules/agent/dto/send-message.dto");
|
|
28
|
+
Object.defineProperty(exports, "SendMessageDto", { enumerable: true, get: function () { return send_message_dto_1.SendMessageDto; } });
|
|
29
|
+
var services_providers_1 = require("./providers/services.providers");
|
|
30
|
+
Object.defineProperty(exports, "AGENT_RESOLVER", { enumerable: true, get: function () { return services_providers_1.AGENT_RESOLVER; } });
|
|
31
|
+
var connectors_module_1 = require("./modules/connectors/connectors.module");
|
|
32
|
+
Object.defineProperty(exports, "ConnectorsModule", { enumerable: true, get: function () { return connectors_module_1.ConnectorsModule; } });
|
|
33
|
+
var connectors_controller_1 = require("./modules/connectors/connectors.controller");
|
|
34
|
+
Object.defineProperty(exports, "ConnectorsController", { enumerable: true, get: function () { return connectors_controller_1.ConnectorsController; } });
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,2DAAwD;AAA/C,sHAAA,gBAAgB,OAAA;AAIzB,yCAAsF;AAA7E,+GAAA,kBAAkB,OAAA;AAAE,6GAAA,gBAAgB,OAAA;AAAE,8GAAA,iBAAiB,OAAA;AAGhE,wEAA4D;AAAnD,qHAAA,WAAW,OAAA;AAEpB,4DAAgE;AAAvD,0GAAA,MAAM,OAAA;AAAE,iHAAA,aAAa,OAAA;AAG9B,0EAA0E;AAAjE,iHAAA,SAAS,OAAA;AAAE,kHAAA,UAAU,OAAA;AAE9B,0EAI2C;AAHzC,2HAAA,mBAAmB,OAAA;AACnB,qHAAA,aAAa,OAAA;AAKf,8DAAqE;AAA5D,4HAAA,wBAAwB,OAAA;AAGjC,qFAAkF;AAAzE,wIAAA,yBAAyB,OAAA;AAGlC,uFAAoF;AAA3E,gIAAA,qBAAqB,OAAA;AAC9B,yEAAsE;AAA7D,kHAAA,cAAc,OAAA;AAGvB,qEAAgE;AAAvD,oHAAA,cAAc,OAAA;AAGvB,4EAA0E;AAAjE,qHAAA,gBAAgB,OAAA;AACzB,oFAAkF;AAAzE,6HAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export declare class UsageTrackingInterceptor implements NestInterceptor {
|
|
4
|
+
private readonly logger;
|
|
5
|
+
intercept(context: ExecutionContext, next: CallHandler): Observable<unknown>;
|
|
6
|
+
}
|