manifest 5.45.0 → 6.0.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/CONTRACT.md +50 -0
- package/README.md +69 -100
- package/dist/index.cjs +472 -0
- package/dist/index.d.cts +24 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +443 -12
- package/docs/guide.md +77 -0
- package/package.json +36 -79
- package/dist/backend/analytics/analytics.module.js +0 -60
- package/dist/backend/analytics/controllers/agent-analytics.controller.js +0 -69
- package/dist/backend/analytics/controllers/agents.controller.js +0 -176
- package/dist/backend/analytics/controllers/costs.controller.js +0 -71
- package/dist/backend/analytics/controllers/messages.controller.js +0 -67
- package/dist/backend/analytics/controllers/overview.controller.js +0 -104
- package/dist/backend/analytics/controllers/tokens.controller.js +0 -74
- package/dist/backend/analytics/dto/messages-query.dto.js +0 -73
- package/dist/backend/analytics/services/agent-analytics.service.js +0 -125
- package/dist/backend/analytics/services/agent-lifecycle.service.js +0 -102
- package/dist/backend/analytics/services/aggregation.service.js +0 -205
- package/dist/backend/analytics/services/message-details.service.js +0 -146
- package/dist/backend/analytics/services/messages-query.service.js +0 -196
- package/dist/backend/analytics/services/query-helpers.js +0 -45
- package/dist/backend/analytics/services/timeseries-queries.service.js +0 -237
- package/dist/backend/app.module.js +0 -94
- package/dist/backend/auth/auth.instance.js +0 -121
- package/dist/backend/auth/auth.module.js +0 -17
- package/dist/backend/auth/current-user.decorator.js +0 -9
- package/dist/backend/auth/local-auth.guard.js +0 -51
- package/dist/backend/auth/session.guard.js +0 -57
- package/dist/backend/common/common.module.js +0 -41
- package/dist/backend/common/constants/api-key.constants.js +0 -6
- package/dist/backend/common/constants/cache.constants.js +0 -8
- package/dist/backend/common/constants/local-mode.constants.js +0 -102
- package/dist/backend/common/constants/ollama.js +0 -5
- package/dist/backend/common/constants/providers.js +0 -134
- package/dist/backend/common/decorators/public.decorator.js +0 -8
- package/dist/backend/common/dto/create-agent.dto.js +0 -26
- package/dist/backend/common/dto/range-query.dto.js +0 -29
- package/dist/backend/common/dto/rename-agent.dto.js +0 -26
- package/dist/backend/common/filters/spa-fallback.filter.js +0 -46
- package/dist/backend/common/guards/api-key.guard.js +0 -89
- package/dist/backend/common/interceptors/agent-cache.interceptor.js +0 -39
- package/dist/backend/common/interceptors/user-cache.interceptor.js +0 -39
- package/dist/backend/common/services/ingest-event-bus.service.js +0 -44
- package/dist/backend/common/services/manifest-runtime.service.js +0 -39
- package/dist/backend/common/services/tenant-cache.service.js +0 -56
- package/dist/backend/common/utils/anthropic-model-id.js +0 -36
- package/dist/backend/common/utils/cost-calculator.js +0 -19
- package/dist/backend/common/utils/crypto.util.js +0 -72
- package/dist/backend/common/utils/frontend-path.js +0 -21
- package/dist/backend/common/utils/hash.util.js +0 -32
- package/dist/backend/common/utils/local-ip.js +0 -33
- package/dist/backend/common/utils/period.util.js +0 -55
- package/dist/backend/common/utils/provider-aliases.js +0 -13
- package/dist/backend/common/utils/provider-inference.js +0 -7
- package/dist/backend/common/utils/range.util.js +0 -29
- package/dist/backend/common/utils/slugify.js +0 -13
- package/dist/backend/common/utils/sql-dialect.js +0 -71
- package/dist/backend/common/utils/subscription-support.js +0 -12
- package/dist/backend/common/utils/ttl-cache.js +0 -59
- package/dist/backend/common/utils/url-validation.js +0 -107
- package/dist/backend/config/app.config.js +0 -48
- package/dist/backend/database/database-seeder.service.js +0 -180
- package/dist/backend/database/database.module.js +0 -199
- package/dist/backend/database/datasource.js +0 -28
- package/dist/backend/database/local-bootstrap.service.js +0 -161
- package/dist/backend/database/migrations/1771464895790-InitialSchema.js +0 -91
- package/dist/backend/database/migrations/1771500000000-HashApiKeys.js +0 -67
- package/dist/backend/database/migrations/1771600000000-AddModelCapabilities.js +0 -27
- package/dist/backend/database/migrations/1771600000000-ModelPricingImprovements.js +0 -60
- package/dist/backend/database/migrations/1771700000000-AddRoutingTables.js +0 -50
- package/dist/backend/database/migrations/1771700000000-EmailProviderConfigs.js +0 -31
- package/dist/backend/database/migrations/1771800000000-AddNotificationEmailAndOptionalDomain.js +0 -16
- package/dist/backend/database/migrations/1771800000000-AddQualityScore.js +0 -50
- package/dist/backend/database/migrations/1771800100000-SeedQualityScores.js +0 -45
- package/dist/backend/database/migrations/1771900000000-EncryptApiKeys.js +0 -34
- package/dist/backend/database/migrations/1772000000000-MakeApiKeyNullable.js +0 -16
- package/dist/backend/database/migrations/1772100000000-AddRoutingTier.js +0 -17
- package/dist/backend/database/migrations/1772200000000-AddLimitAction.js +0 -17
- package/dist/backend/database/migrations/1772300000000-AddRoutingReason.js +0 -17
- package/dist/backend/database/migrations/1772400000000-AddAgentDisplayName.js +0 -13
- package/dist/backend/database/migrations/1772500000000-PerAgentRouting.js +0 -82
- package/dist/backend/database/migrations/1772668898071-AddCustomProviders.js +0 -31
- package/dist/backend/database/migrations/1772682112419-NullablePricing.js +0 -17
- package/dist/backend/database/migrations/1772843035514-AddPerformanceIndexes.js +0 -56
- package/dist/backend/database/migrations/1772900000000-AddProviderAuthType.js +0 -13
- package/dist/backend/database/migrations/1772905146384-AddDashboardIndexes.js +0 -24
- package/dist/backend/database/migrations/1772905260464-AddFallbacks.js +0 -18
- package/dist/backend/database/migrations/1772920000000-AddModelDisplayName.js +0 -14
- package/dist/backend/database/migrations/1772940000000-DropRedundantIndexes.js +0 -39
- package/dist/backend/database/migrations/1772948502780-BackfillTenantId.js +0 -20
- package/dist/backend/database/migrations/1772960000000-DropUnusedIndexes.js +0 -19
- package/dist/backend/database/migrations/1772960000000-PurgeNonCuratedModels.js +0 -86
- package/dist/backend/database/migrations/1773000000000-ExpandProviderUniqueKey.js +0 -19
- package/dist/backend/database/migrations/1773100000000-AddOverrideAuthType.js +0 -18
- package/dist/backend/database/migrations/1773200000000-AddMessageAuthType.js +0 -18
- package/dist/backend/database/migrations/1773202787708-AddModelsAgentIndex.js +0 -16
- package/dist/backend/database/migrations/1773300000000-AddEmailProviderKeyPrefix.js +0 -13
- package/dist/backend/database/migrations/1773400000000-AddProviderModelCache.js +0 -15
- package/dist/backend/database/migrations/1773500000000-DropModelPricingTables.js +0 -51
- package/dist/backend/database/migrations/1773600000000-AddOverrideProvider.js +0 -18
- package/dist/backend/database/migrations/1773650000000-AddProviderRegion.js +0 -13
- package/dist/backend/database/migrations/1773700000000-DropSecurityEventTable.js +0 -24
- package/dist/backend/database/migrations/1773800000000-FixNegativeCosts.js +0 -12
- package/dist/backend/database/migrations/1773900000000-AddKeyPrefixIndex.js +0 -15
- package/dist/backend/database/migrations/1774000000000-WidenKeyHashColumn.js +0 -15
- package/dist/backend/database/migrations/1774896789000-WidenApiKeyColumn.js +0 -14
- package/dist/backend/database/models-dev-sync.service.js +0 -238
- package/dist/backend/database/ollama-sync.service.js +0 -70
- package/dist/backend/database/pricing-sync.service.js +0 -116
- package/dist/backend/database/quality-score.util.js +0 -76
- package/dist/backend/database/seed-messages.js +0 -66
- package/dist/backend/entities/agent-api-key.entity.js +0 -91
- package/dist/backend/entities/agent-log.entity.js +0 -71
- package/dist/backend/entities/agent-message.entity.js +0 -158
- package/dist/backend/entities/agent.entity.js +0 -75
- package/dist/backend/entities/api-key.entity.js +0 -62
- package/dist/backend/entities/cost-snapshot.entity.js +0 -56
- package/dist/backend/entities/custom-provider.entity.js +0 -64
- package/dist/backend/entities/email-provider-config.entity.js +0 -72
- package/dist/backend/entities/llm-call.entity.js +0 -106
- package/dist/backend/entities/notification-log.entity.js +0 -67
- package/dist/backend/entities/notification-rule.entity.js +0 -84
- package/dist/backend/entities/tenant.entity.js +0 -62
- package/dist/backend/entities/tier-assignment.entity.js +0 -72
- package/dist/backend/entities/token-usage-snapshot.entity.js +0 -71
- package/dist/backend/entities/tool-execution.entity.js +0 -60
- package/dist/backend/entities/user-provider.entity.js +0 -87
- package/dist/backend/github/github.controller.js +0 -53
- package/dist/backend/github/github.module.js +0 -20
- package/dist/backend/health/health.controller.js +0 -51
- package/dist/backend/health/health.module.js +0 -22
- package/dist/backend/health/version-check.service.js +0 -95
- package/dist/backend/main.js +0 -153
- package/dist/backend/model-discovery/anthropic-subscription-probe.js +0 -87
- package/dist/backend/model-discovery/known-model-prices.js +0 -18
- package/dist/backend/model-discovery/model-discovery.module.js +0 -28
- package/dist/backend/model-discovery/model-discovery.service.js +0 -309
- package/dist/backend/model-discovery/model-fallback.js +0 -234
- package/dist/backend/model-discovery/model-fetcher.js +0 -3
- package/dist/backend/model-discovery/provider-model-fetcher.service.js +0 -376
- package/dist/backend/model-discovery/provider-model-registry.service.js +0 -84
- package/dist/backend/model-prices/model-name-normalizer.js +0 -129
- package/dist/backend/model-prices/model-prices.controller.js +0 -39
- package/dist/backend/model-prices/model-prices.module.js +0 -41
- package/dist/backend/model-prices/model-prices.service.js +0 -45
- package/dist/backend/model-prices/model-pricing-cache.service.js +0 -171
- package/dist/backend/notifications/dto/notification-rule.dto.js +0 -82
- package/dist/backend/notifications/dto/set-email-provider.dto.js +0 -86
- package/dist/backend/notifications/dto/set-notification-email.dto.js +0 -24
- package/dist/backend/notifications/emails/reset-password.js +0 -108
- package/dist/backend/notifications/emails/test-email.js +0 -91
- package/dist/backend/notifications/emails/threshold-alert.js +0 -187
- package/dist/backend/notifications/emails/verify-email.js +0 -108
- package/dist/backend/notifications/notifications.controller.js +0 -208
- package/dist/backend/notifications/notifications.module.js +0 -35
- package/dist/backend/notifications/services/email-provider-config.service.js +0 -184
- package/dist/backend/notifications/services/email-provider-validation.js +0 -47
- package/dist/backend/notifications/services/email-providers/email-provider.interface.js +0 -3
- package/dist/backend/notifications/services/email-providers/mailgun.provider.js +0 -62
- package/dist/backend/notifications/services/email-providers/resend.provider.js +0 -51
- package/dist/backend/notifications/services/email-providers/resolve-provider.js +0 -19
- package/dist/backend/notifications/services/email-providers/send-email.js +0 -34
- package/dist/backend/notifications/services/email-providers/sendgrid.provider.js +0 -59
- package/dist/backend/notifications/services/limit-check.service.js +0 -160
- package/dist/backend/notifications/services/notification-cron.service.js +0 -151
- package/dist/backend/notifications/services/notification-email.service.js +0 -65
- package/dist/backend/notifications/services/notification-log.service.js +0 -84
- package/dist/backend/notifications/services/notification-rules.service.js +0 -156
- package/dist/backend/otlp/guards/agent-key-auth.guard.js +0 -226
- package/dist/backend/otlp/interfaces/ingestion-context.interface.js +0 -3
- package/dist/backend/otlp/otlp-deprecated.controller.js +0 -61
- package/dist/backend/otlp/otlp.module.js +0 -30
- package/dist/backend/otlp/services/api-key.service.js +0 -143
- package/dist/backend/public-stats/public-stats.controller.js +0 -141
- package/dist/backend/public-stats/public-stats.module.js +0 -26
- package/dist/backend/public-stats/public-stats.service.js +0 -226
- package/dist/backend/routing/copilot.controller.js +0 -79
- package/dist/backend/routing/custom-provider/custom-provider.controller.js +0 -131
- package/dist/backend/routing/custom-provider/custom-provider.module.js +0 -27
- package/dist/backend/routing/custom-provider/custom-provider.service.js +0 -161
- package/dist/backend/routing/dto/custom-provider.dto.js +0 -124
- package/dist/backend/routing/dto/resolve-request.dto.js +0 -63
- package/dist/backend/routing/dto/resolve-response.js +0 -3
- package/dist/backend/routing/dto/routing.dto.js +0 -136
- package/dist/backend/routing/model.controller.js +0 -105
- package/dist/backend/routing/oauth/copilot-device-auth.service.js +0 -77
- package/dist/backend/routing/oauth/minimax-oauth-helpers.js +0 -70
- package/dist/backend/routing/oauth/minimax-oauth.controller.js +0 -80
- package/dist/backend/routing/oauth/minimax-oauth.service.js +0 -252
- package/dist/backend/routing/oauth/oauth.module.js +0 -29
- package/dist/backend/routing/oauth/openai-oauth.controller.js +0 -138
- package/dist/backend/routing/oauth/openai-oauth.service.js +0 -273
- package/dist/backend/routing/oauth/openai-oauth.types.js +0 -45
- package/dist/backend/routing/provider-base-url.js +0 -25
- package/dist/backend/routing/provider.controller.js +0 -152
- package/dist/backend/routing/proxy/anthropic-adapter.js +0 -295
- package/dist/backend/routing/proxy/cache-injection.js +0 -33
- package/dist/backend/routing/proxy/chatgpt-adapter.js +0 -272
- package/dist/backend/routing/proxy/chatgpt-helpers.js +0 -108
- package/dist/backend/routing/proxy/copilot-token.service.js +0 -63
- package/dist/backend/routing/proxy/fallback-status-codes.js +0 -7
- package/dist/backend/routing/proxy/google-adapter.js +0 -314
- package/dist/backend/routing/proxy/provider-client-converters.js +0 -190
- package/dist/backend/routing/proxy/provider-client.js +0 -130
- package/dist/backend/routing/proxy/provider-endpoints.js +0 -182
- package/dist/backend/routing/proxy/proxy-error-sanitizer.js +0 -40
- package/dist/backend/routing/proxy/proxy-exception.filter.js +0 -67
- package/dist/backend/routing/proxy/proxy-fallback.service.js +0 -227
- package/dist/backend/routing/proxy/proxy-friendly-response.js +0 -115
- package/dist/backend/routing/proxy/proxy-message-dedup.js +0 -121
- package/dist/backend/routing/proxy/proxy-message-recorder.js +0 -262
- package/dist/backend/routing/proxy/proxy-rate-limiter.js +0 -81
- package/dist/backend/routing/proxy/proxy-response-handler.js +0 -202
- package/dist/backend/routing/proxy/proxy-transport.js +0 -90
- package/dist/backend/routing/proxy/proxy-types.js +0 -3
- package/dist/backend/routing/proxy/proxy.controller.js +0 -174
- package/dist/backend/routing/proxy/proxy.module.js +0 -62
- package/dist/backend/routing/proxy/proxy.service.js +0 -227
- package/dist/backend/routing/proxy/session-momentum.service.js +0 -66
- package/dist/backend/routing/proxy/stream-writer.js +0 -147
- package/dist/backend/routing/proxy/thought-signature-cache.js +0 -45
- package/dist/backend/routing/qwen-region.js +0 -51
- package/dist/backend/routing/resolve/resolve.controller.js +0 -106
- package/dist/backend/routing/resolve/resolve.module.js +0 -28
- package/dist/backend/routing/resolve/resolve.service.js +0 -126
- package/dist/backend/routing/routing-core/provider-key.service.js +0 -190
- package/dist/backend/routing/routing-core/provider.service.js +0 -305
- package/dist/backend/routing/routing-core/resolve-agent.service.js +0 -62
- package/dist/backend/routing/routing-core/routing-cache.service.js +0 -73
- package/dist/backend/routing/routing-core/routing-core.module.js +0 -56
- package/dist/backend/routing/routing-core/routing-invalidation.service.js +0 -90
- package/dist/backend/routing/routing-core/tier-auto-assign.service.js +0 -138
- package/dist/backend/routing/routing-core/tier.service.js +0 -179
- package/dist/backend/routing/routing.module.js +0 -46
- package/dist/backend/routing/tier.controller.js +0 -129
- package/dist/backend/scoring/__tests__/fixtures.js +0 -191
- package/dist/backend/scoring/config.js +0 -383
- package/dist/backend/scoring/dimensions/contextual-dimensions.js +0 -85
- package/dist/backend/scoring/dimensions/index.js +0 -17
- package/dist/backend/scoring/dimensions/keyword-dimensions.js +0 -47
- package/dist/backend/scoring/dimensions/structural-dimensions.js +0 -118
- package/dist/backend/scoring/index.js +0 -186
- package/dist/backend/scoring/keyword-trie.js +0 -75
- package/dist/backend/scoring/momentum.js +0 -50
- package/dist/backend/scoring/overrides.js +0 -55
- package/dist/backend/scoring/sigmoid.js +0 -24
- package/dist/backend/scoring/text-extractor.js +0 -67
- package/dist/backend/scoring/types.js +0 -6
- package/dist/backend/sse/sse.controller.js +0 -45
- package/dist/backend/sse/sse.module.js +0 -20
- package/dist/node_modules/manifest-shared/dist/cjs/api-key.d.ts +0 -2
- package/dist/node_modules/manifest-shared/dist/cjs/api-key.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/api-key.js +0 -5
- package/dist/node_modules/manifest-shared/dist/cjs/api-key.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/auth-types.d.ts +0 -3
- package/dist/node_modules/manifest-shared/dist/cjs/auth-types.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/auth-types.js +0 -5
- package/dist/node_modules/manifest-shared/dist/cjs/auth-types.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/index.d.ts +0 -10
- package/dist/node_modules/manifest-shared/dist/cjs/index.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/index.js +0 -22
- package/dist/node_modules/manifest-shared/dist/cjs/index.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/provider-inference.d.ts +0 -8
- package/dist/node_modules/manifest-shared/dist/cjs/provider-inference.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/provider-inference.js +0 -37
- package/dist/node_modules/manifest-shared/dist/cjs/provider-inference.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/resolve-response.d.ts +0 -12
- package/dist/node_modules/manifest-shared/dist/cjs/resolve-response.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/resolve-response.js +0 -3
- package/dist/node_modules/manifest-shared/dist/cjs/resolve-response.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/configs.d.ts +0 -4
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/configs.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/configs.js +0 -80
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/configs.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/helpers.d.ts +0 -6
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/helpers.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/helpers.js +0 -25
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/helpers.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/index.d.ts +0 -4
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/index.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/index.js +0 -12
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/index.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/types.d.ts +0 -17
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/types.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/types.js +0 -3
- package/dist/node_modules/manifest-shared/dist/cjs/subscription/types.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/tiers.d.ts +0 -5
- package/dist/node_modules/manifest-shared/dist/cjs/tiers.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/cjs/tiers.js +0 -17
- package/dist/node_modules/manifest-shared/dist/cjs/tiers.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/api-key.d.ts +0 -2
- package/dist/node_modules/manifest-shared/dist/esm/api-key.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/api-key.js +0 -2
- package/dist/node_modules/manifest-shared/dist/esm/api-key.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/auth-types.d.ts +0 -3
- package/dist/node_modules/manifest-shared/dist/esm/auth-types.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/auth-types.js +0 -2
- package/dist/node_modules/manifest-shared/dist/esm/auth-types.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/index.d.ts +0 -10
- package/dist/node_modules/manifest-shared/dist/esm/index.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/index.js +0 -6
- package/dist/node_modules/manifest-shared/dist/esm/index.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/provider-inference.d.ts +0 -8
- package/dist/node_modules/manifest-shared/dist/esm/provider-inference.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/provider-inference.js +0 -33
- package/dist/node_modules/manifest-shared/dist/esm/provider-inference.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/resolve-response.d.ts +0 -12
- package/dist/node_modules/manifest-shared/dist/esm/resolve-response.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/resolve-response.js +0 -2
- package/dist/node_modules/manifest-shared/dist/esm/resolve-response.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/subscription/configs.d.ts +0 -4
- package/dist/node_modules/manifest-shared/dist/esm/subscription/configs.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/subscription/configs.js +0 -77
- package/dist/node_modules/manifest-shared/dist/esm/subscription/configs.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/subscription/helpers.d.ts +0 -6
- package/dist/node_modules/manifest-shared/dist/esm/subscription/helpers.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/subscription/helpers.js +0 -19
- package/dist/node_modules/manifest-shared/dist/esm/subscription/helpers.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/subscription/index.d.ts +0 -4
- package/dist/node_modules/manifest-shared/dist/esm/subscription/index.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/subscription/index.js +0 -3
- package/dist/node_modules/manifest-shared/dist/esm/subscription/index.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/subscription/types.d.ts +0 -17
- package/dist/node_modules/manifest-shared/dist/esm/subscription/types.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/subscription/types.js +0 -2
- package/dist/node_modules/manifest-shared/dist/esm/subscription/types.js.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/tiers.d.ts +0 -5
- package/dist/node_modules/manifest-shared/dist/esm/tiers.d.ts.map +0 -1
- package/dist/node_modules/manifest-shared/dist/esm/tiers.js +0 -14
- package/dist/node_modules/manifest-shared/dist/esm/tiers.js.map +0 -1
- package/dist/node_modules/manifest-shared/package.json +0 -26
- package/dist/openclaw.plugin.json +0 -37
- package/dist/package.json +0 -94
- package/dist/server.d.ts +0 -8
- package/dist/server.js +0 -69
- package/openclaw.plugin.json +0 -37
- package/public/assets/Account-B_3C4z7e.js +0 -1
- package/public/assets/AuthBadge-Dj2KkXRW.js +0 -1
- package/public/assets/ConnectProvider-DxPYovG2.js +0 -1
- package/public/assets/CopyButton-BWMVlK2w.js +0 -1
- package/public/assets/FreeModels-BzNWxfZl.js +0 -1
- package/public/assets/Help-ifWIlcDo.js +0 -1
- package/public/assets/Limits-BLW0fW8j.js +0 -1
- package/public/assets/Login-DvUR0ri0.js +0 -1
- package/public/assets/MessageLog-BsuwgHos.js +0 -1
- package/public/assets/ModelPrices-8EpyI4cZ.js +0 -1
- package/public/assets/Overview-B2DQeTd2.js +0 -1
- package/public/assets/Pagination-D8BOkffh.js +0 -1
- package/public/assets/ProviderTokens-nv6wk29Y.js +0 -1
- package/public/assets/Register-WBrQ1E73.js +0 -1
- package/public/assets/ResetPassword-CWdklAXJ.js +0 -1
- package/public/assets/Routing-BqfY1unJ.js +0 -6
- package/public/assets/Settings-na6aYffS.js +0 -1
- package/public/assets/SetupStepAddProvider-CSNkQmoC.js +0 -3
- package/public/assets/SocialButtons-DG2BtKEz.js +0 -1
- package/public/assets/auth-Bcnz6mJV.js +0 -1
- package/public/assets/chart-utils-DTt1NOye.js +0 -1
- package/public/assets/charts-Cty976qB.js +0 -3
- package/public/assets/charts-Saz_VHki.css +0 -1
- package/public/assets/index-ByYwCwOa.js +0 -2
- package/public/assets/index-DhaXpWfr.css +0 -1
- package/public/assets/model-display-Bd0Zg5Lp.js +0 -1
- package/public/assets/overview-B6Wy_RSw.js +0 -1
- package/public/assets/overview-vZEzTjBP.css +0 -1
- package/public/assets/provider-api-key-urls-1G6okUJ7.js +0 -1
- package/public/assets/routing-UGVXjYdE.js +0 -1
- package/public/assets/routing-utils-BVCa9TKk.js +0 -1
- package/public/assets/vendor-C-Y5oNOq.js +0 -1
- package/public/example-messages.svg +0 -1
- package/public/example-overview.svg +0 -1
- package/public/favicon.ico +0 -0
- package/public/fonts/boxicons/boxicons-duotone.min.css +0 -37
- package/public/fonts/boxicons/boxicons-duotone.woff2 +0 -0
- package/public/fonts/bricolage-grotesque-latin.woff2 +0 -0
- package/public/fonts/dm-sans-latin.woff2 +0 -0
- package/public/fonts/jetbrains-mono-latin.woff2 +0 -0
- package/public/icons/caret-down.svg +0 -1
- package/public/icons/cohere.svg +0 -30
- package/public/icons/free.svg +0 -91
- package/public/icons/gemini.svg +0 -25
- package/public/icons/kilocode.jpg +0 -0
- package/public/icons/nvidia.svg +0 -1
- package/public/icons/providers/alibaba.svg +0 -1
- package/public/icons/providers/amazon.svg +0 -1
- package/public/icons/providers/anthropic.svg +0 -1
- package/public/icons/providers/cohere.svg +0 -1
- package/public/icons/providers/deepseek.svg +0 -1
- package/public/icons/providers/google.svg +0 -1
- package/public/icons/providers/meta.svg +0 -1
- package/public/icons/providers/mistral.svg +0 -1
- package/public/icons/providers/moonshot.svg +0 -1
- package/public/icons/providers/openai.svg +0 -1
- package/public/icons/providers/xai.svg +0 -1
- package/public/icons/providers/zhipu.svg +0 -1
- package/public/icons/qwen.svg +0 -1
- package/public/images/oauth-callback-example.mp4 +0 -0
- package/public/images/oauth-callback-example.png +0 -0
- package/public/index.html +0 -41
- package/public/logo-white.svg +0 -93
- package/public/logo.svg +0 -93
- package/public/logos/mailgun.svg +0 -13
- package/public/logos/resend.svg +0 -4
- package/public/logos/sendgrid.svg +0 -18
- package/public/manifest-logo.png +0 -0
- package/public/theme-init.js +0 -6
|
@@ -1,60 +0,0 @@
|
|
|
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.AnalyticsModule = void 0;
|
|
10
|
-
const common_1 = require("@nestjs/common");
|
|
11
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
-
const agent_message_entity_1 = require("../entities/agent-message.entity");
|
|
13
|
-
const agent_entity_1 = require("../entities/agent.entity");
|
|
14
|
-
const tenant_entity_1 = require("../entities/tenant.entity");
|
|
15
|
-
const llm_call_entity_1 = require("../entities/llm-call.entity");
|
|
16
|
-
const tool_execution_entity_1 = require("../entities/tool-execution.entity");
|
|
17
|
-
const agent_log_entity_1 = require("../entities/agent-log.entity");
|
|
18
|
-
const otlp_module_1 = require("../otlp/otlp.module");
|
|
19
|
-
const routing_core_module_1 = require("../routing/routing-core/routing-core.module");
|
|
20
|
-
const aggregation_service_1 = require("./services/aggregation.service");
|
|
21
|
-
const agent_lifecycle_service_1 = require("./services/agent-lifecycle.service");
|
|
22
|
-
const timeseries_queries_service_1 = require("./services/timeseries-queries.service");
|
|
23
|
-
const messages_query_service_1 = require("./services/messages-query.service");
|
|
24
|
-
const message_details_service_1 = require("./services/message-details.service");
|
|
25
|
-
const agent_analytics_service_1 = require("./services/agent-analytics.service");
|
|
26
|
-
const overview_controller_1 = require("./controllers/overview.controller");
|
|
27
|
-
const tokens_controller_1 = require("./controllers/tokens.controller");
|
|
28
|
-
const costs_controller_1 = require("./controllers/costs.controller");
|
|
29
|
-
const messages_controller_1 = require("./controllers/messages.controller");
|
|
30
|
-
const agents_controller_1 = require("./controllers/agents.controller");
|
|
31
|
-
const agent_analytics_controller_1 = require("./controllers/agent-analytics.controller");
|
|
32
|
-
let AnalyticsModule = class AnalyticsModule {
|
|
33
|
-
};
|
|
34
|
-
exports.AnalyticsModule = AnalyticsModule;
|
|
35
|
-
exports.AnalyticsModule = AnalyticsModule = __decorate([
|
|
36
|
-
(0, common_1.Module)({
|
|
37
|
-
imports: [
|
|
38
|
-
typeorm_1.TypeOrmModule.forFeature([agent_message_entity_1.AgentMessage, agent_entity_1.Agent, tenant_entity_1.Tenant, llm_call_entity_1.LlmCall, tool_execution_entity_1.ToolExecution, agent_log_entity_1.AgentLog]),
|
|
39
|
-
otlp_module_1.OtlpModule,
|
|
40
|
-
routing_core_module_1.RoutingCoreModule,
|
|
41
|
-
],
|
|
42
|
-
controllers: [
|
|
43
|
-
overview_controller_1.OverviewController,
|
|
44
|
-
tokens_controller_1.TokensController,
|
|
45
|
-
costs_controller_1.CostsController,
|
|
46
|
-
messages_controller_1.MessagesController,
|
|
47
|
-
agents_controller_1.AgentsController,
|
|
48
|
-
agent_analytics_controller_1.AgentAnalyticsController,
|
|
49
|
-
],
|
|
50
|
-
providers: [
|
|
51
|
-
aggregation_service_1.AggregationService,
|
|
52
|
-
agent_lifecycle_service_1.AgentLifecycleService,
|
|
53
|
-
timeseries_queries_service_1.TimeseriesQueriesService,
|
|
54
|
-
messages_query_service_1.MessagesQueryService,
|
|
55
|
-
message_details_service_1.MessageDetailsService,
|
|
56
|
-
agent_analytics_service_1.AgentAnalyticsService,
|
|
57
|
-
],
|
|
58
|
-
})
|
|
59
|
-
], AnalyticsModule);
|
|
60
|
-
//# sourceMappingURL=analytics.module.js.map
|
|
@@ -1,69 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.AgentAnalyticsController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const cache_manager_1 = require("@nestjs/cache-manager");
|
|
18
|
-
const public_decorator_1 = require("../../common/decorators/public.decorator");
|
|
19
|
-
const agent_key_auth_guard_1 = require("../../otlp/guards/agent-key-auth.guard");
|
|
20
|
-
const agent_analytics_service_1 = require("../services/agent-analytics.service");
|
|
21
|
-
const range_query_dto_1 = require("../../common/dto/range-query.dto");
|
|
22
|
-
const agent_cache_interceptor_1 = require("../../common/interceptors/agent-cache.interceptor");
|
|
23
|
-
const cache_constants_1 = require("../../common/constants/cache.constants");
|
|
24
|
-
let AgentAnalyticsController = class AgentAnalyticsController {
|
|
25
|
-
analytics;
|
|
26
|
-
constructor(analytics) {
|
|
27
|
-
this.analytics = analytics;
|
|
28
|
-
}
|
|
29
|
-
async getUsage(query, req) {
|
|
30
|
-
const range = query.range ?? '24h';
|
|
31
|
-
const ctx = req.ingestionContext;
|
|
32
|
-
const usage = await this.analytics.getUsage(range, ctx);
|
|
33
|
-
return {
|
|
34
|
-
...usage,
|
|
35
|
-
agentName: ctx.agentName,
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
async getCosts(query, req) {
|
|
39
|
-
const range = query.range ?? '7d';
|
|
40
|
-
const ctx = req.ingestionContext;
|
|
41
|
-
return this.analytics.getCosts(range, ctx);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.AgentAnalyticsController = AgentAnalyticsController;
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, common_1.Get)('usage'),
|
|
47
|
-
__param(0, (0, common_1.Query)()),
|
|
48
|
-
__param(1, (0, common_1.Req)()),
|
|
49
|
-
__metadata("design:type", Function),
|
|
50
|
-
__metadata("design:paramtypes", [range_query_dto_1.RangeQueryDto, Object]),
|
|
51
|
-
__metadata("design:returntype", Promise)
|
|
52
|
-
], AgentAnalyticsController.prototype, "getUsage", null);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, common_1.Get)('costs'),
|
|
55
|
-
__param(0, (0, common_1.Query)()),
|
|
56
|
-
__param(1, (0, common_1.Req)()),
|
|
57
|
-
__metadata("design:type", Function),
|
|
58
|
-
__metadata("design:paramtypes", [range_query_dto_1.RangeQueryDto, Object]),
|
|
59
|
-
__metadata("design:returntype", Promise)
|
|
60
|
-
], AgentAnalyticsController.prototype, "getCosts", null);
|
|
61
|
-
exports.AgentAnalyticsController = AgentAnalyticsController = __decorate([
|
|
62
|
-
(0, common_1.Controller)('api/v1/agent'),
|
|
63
|
-
(0, public_decorator_1.Public)(),
|
|
64
|
-
(0, common_1.UseGuards)(agent_key_auth_guard_1.AgentKeyAuthGuard),
|
|
65
|
-
(0, common_1.UseInterceptors)(agent_cache_interceptor_1.AgentCacheInterceptor),
|
|
66
|
-
(0, cache_manager_1.CacheTTL)(cache_constants_1.DASHBOARD_CACHE_TTL_MS),
|
|
67
|
-
__metadata("design:paramtypes", [agent_analytics_service_1.AgentAnalyticsService])
|
|
68
|
-
], AgentAnalyticsController);
|
|
69
|
-
//# sourceMappingURL=agent-analytics.controller.js.map
|
|
@@ -1,176 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.AgentsController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const typeorm_1 = require("typeorm");
|
|
18
|
-
const cache_manager_1 = require("@nestjs/cache-manager");
|
|
19
|
-
const config_1 = require("@nestjs/config");
|
|
20
|
-
const timeseries_queries_service_1 = require("../services/timeseries-queries.service");
|
|
21
|
-
const agent_lifecycle_service_1 = require("../services/agent-lifecycle.service");
|
|
22
|
-
const api_key_service_1 = require("../../otlp/services/api-key.service");
|
|
23
|
-
const current_user_decorator_1 = require("../../auth/current-user.decorator");
|
|
24
|
-
const create_agent_dto_1 = require("../../common/dto/create-agent.dto");
|
|
25
|
-
const rename_agent_dto_1 = require("../../common/dto/rename-agent.dto");
|
|
26
|
-
const user_cache_interceptor_1 = require("../../common/interceptors/user-cache.interceptor");
|
|
27
|
-
const cache_constants_1 = require("../../common/constants/cache.constants");
|
|
28
|
-
const local_mode_constants_1 = require("../../common/constants/local-mode.constants");
|
|
29
|
-
const slugify_1 = require("../../common/utils/slugify");
|
|
30
|
-
const tenant_cache_service_1 = require("../../common/services/tenant-cache.service");
|
|
31
|
-
let AgentsController = class AgentsController {
|
|
32
|
-
timeseries;
|
|
33
|
-
lifecycle;
|
|
34
|
-
apiKeyGenerator;
|
|
35
|
-
config;
|
|
36
|
-
tenantCache;
|
|
37
|
-
cacheManager;
|
|
38
|
-
constructor(timeseries, lifecycle, apiKeyGenerator, config, tenantCache, cacheManager) {
|
|
39
|
-
this.timeseries = timeseries;
|
|
40
|
-
this.lifecycle = lifecycle;
|
|
41
|
-
this.apiKeyGenerator = apiKeyGenerator;
|
|
42
|
-
this.config = config;
|
|
43
|
-
this.tenantCache = tenantCache;
|
|
44
|
-
this.cacheManager = cacheManager;
|
|
45
|
-
}
|
|
46
|
-
agentListCacheKey(userId) {
|
|
47
|
-
return `${userId}:/api/v1/agents`;
|
|
48
|
-
}
|
|
49
|
-
async getAgents(user) {
|
|
50
|
-
const tenantId = (await this.tenantCache.resolve(user.id)) ?? undefined;
|
|
51
|
-
const agents = await this.timeseries.getAgentList(user.id, tenantId);
|
|
52
|
-
return { agents };
|
|
53
|
-
}
|
|
54
|
-
async createAgent(user, body) {
|
|
55
|
-
const slug = (0, slugify_1.slugify)(body.name);
|
|
56
|
-
if (!slug) {
|
|
57
|
-
throw new common_1.BadRequestException('Agent name produces an empty slug');
|
|
58
|
-
}
|
|
59
|
-
const displayName = body.name.trim();
|
|
60
|
-
let result;
|
|
61
|
-
try {
|
|
62
|
-
result = await this.apiKeyGenerator.onboardAgent({
|
|
63
|
-
tenantName: user.id,
|
|
64
|
-
agentName: slug,
|
|
65
|
-
displayName,
|
|
66
|
-
email: user.email,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
catch (error) {
|
|
70
|
-
if (error instanceof typeorm_1.QueryFailedError && /unique|duplicate/i.test(error.message)) {
|
|
71
|
-
throw new common_1.ConflictException(`Agent "${slug}" already exists`);
|
|
72
|
-
}
|
|
73
|
-
throw error;
|
|
74
|
-
}
|
|
75
|
-
await this.cacheManager.del(this.agentListCacheKey(user.id));
|
|
76
|
-
return {
|
|
77
|
-
agent: { id: result.agentId, name: slug, display_name: displayName },
|
|
78
|
-
apiKey: result.apiKey,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
async getAgentKey(user, agentName) {
|
|
82
|
-
const keyData = await this.apiKeyGenerator.getKeyForAgent(user.id, agentName);
|
|
83
|
-
const customEndpoint = this.config.get('app.pluginOtlpEndpoint', '');
|
|
84
|
-
const isLocal = this.config.get('MANIFEST_MODE') === 'local';
|
|
85
|
-
const localKey = isLocal && agentName === local_mode_constants_1.LOCAL_AGENT_NAME ? (0, local_mode_constants_1.readLocalApiKey)() : undefined;
|
|
86
|
-
const apiKey = localKey ?? keyData.fullKey ?? undefined;
|
|
87
|
-
return {
|
|
88
|
-
keyPrefix: keyData.keyPrefix,
|
|
89
|
-
...(apiKey ? { apiKey } : {}),
|
|
90
|
-
...(customEndpoint ? { pluginEndpoint: customEndpoint } : {}),
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
async rotateAgentKey(user, agentName) {
|
|
94
|
-
const result = await this.apiKeyGenerator.rotateKey(user.id, agentName);
|
|
95
|
-
return { apiKey: result.apiKey };
|
|
96
|
-
}
|
|
97
|
-
async renameAgent(user, agentName, body) {
|
|
98
|
-
const slug = (0, slugify_1.slugify)(body.name);
|
|
99
|
-
if (!slug) {
|
|
100
|
-
throw new common_1.BadRequestException('Agent name produces an empty slug');
|
|
101
|
-
}
|
|
102
|
-
const displayName = body.name.trim();
|
|
103
|
-
await this.lifecycle.renameAgent(user.id, agentName, slug, displayName);
|
|
104
|
-
await this.cacheManager.del(this.agentListCacheKey(user.id));
|
|
105
|
-
return { renamed: true, name: slug, display_name: displayName };
|
|
106
|
-
}
|
|
107
|
-
async deleteAgent(user, agentName) {
|
|
108
|
-
if (this.config.get('MANIFEST_MODE') === 'local' && agentName === local_mode_constants_1.LOCAL_AGENT_NAME) {
|
|
109
|
-
throw new common_1.ForbiddenException('Cannot delete the default local agent');
|
|
110
|
-
}
|
|
111
|
-
await this.lifecycle.deleteAgent(user.id, agentName);
|
|
112
|
-
await this.cacheManager.del(this.agentListCacheKey(user.id));
|
|
113
|
-
return { deleted: true };
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
exports.AgentsController = AgentsController;
|
|
117
|
-
__decorate([
|
|
118
|
-
(0, common_1.Get)('agents'),
|
|
119
|
-
(0, common_1.UseInterceptors)(user_cache_interceptor_1.UserCacheInterceptor),
|
|
120
|
-
(0, cache_manager_1.CacheTTL)(cache_constants_1.AGENT_LIST_CACHE_TTL_MS),
|
|
121
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
122
|
-
__metadata("design:type", Function),
|
|
123
|
-
__metadata("design:paramtypes", [Object]),
|
|
124
|
-
__metadata("design:returntype", Promise)
|
|
125
|
-
], AgentsController.prototype, "getAgents", null);
|
|
126
|
-
__decorate([
|
|
127
|
-
(0, common_1.Post)('agents'),
|
|
128
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
129
|
-
__param(1, (0, common_1.Body)()),
|
|
130
|
-
__metadata("design:type", Function),
|
|
131
|
-
__metadata("design:paramtypes", [Object, create_agent_dto_1.CreateAgentDto]),
|
|
132
|
-
__metadata("design:returntype", Promise)
|
|
133
|
-
], AgentsController.prototype, "createAgent", null);
|
|
134
|
-
__decorate([
|
|
135
|
-
(0, common_1.Get)('agents/:agentName/key'),
|
|
136
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
137
|
-
__param(1, (0, common_1.Param)('agentName')),
|
|
138
|
-
__metadata("design:type", Function),
|
|
139
|
-
__metadata("design:paramtypes", [Object, String]),
|
|
140
|
-
__metadata("design:returntype", Promise)
|
|
141
|
-
], AgentsController.prototype, "getAgentKey", null);
|
|
142
|
-
__decorate([
|
|
143
|
-
(0, common_1.Post)('agents/:agentName/rotate-key'),
|
|
144
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
145
|
-
__param(1, (0, common_1.Param)('agentName')),
|
|
146
|
-
__metadata("design:type", Function),
|
|
147
|
-
__metadata("design:paramtypes", [Object, String]),
|
|
148
|
-
__metadata("design:returntype", Promise)
|
|
149
|
-
], AgentsController.prototype, "rotateAgentKey", null);
|
|
150
|
-
__decorate([
|
|
151
|
-
(0, common_1.Patch)('agents/:agentName'),
|
|
152
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
153
|
-
__param(1, (0, common_1.Param)('agentName')),
|
|
154
|
-
__param(2, (0, common_1.Body)()),
|
|
155
|
-
__metadata("design:type", Function),
|
|
156
|
-
__metadata("design:paramtypes", [Object, String, rename_agent_dto_1.RenameAgentDto]),
|
|
157
|
-
__metadata("design:returntype", Promise)
|
|
158
|
-
], AgentsController.prototype, "renameAgent", null);
|
|
159
|
-
__decorate([
|
|
160
|
-
(0, common_1.Delete)('agents/:agentName'),
|
|
161
|
-
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
162
|
-
__param(1, (0, common_1.Param)('agentName')),
|
|
163
|
-
__metadata("design:type", Function),
|
|
164
|
-
__metadata("design:paramtypes", [Object, String]),
|
|
165
|
-
__metadata("design:returntype", Promise)
|
|
166
|
-
], AgentsController.prototype, "deleteAgent", null);
|
|
167
|
-
exports.AgentsController = AgentsController = __decorate([
|
|
168
|
-
(0, common_1.Controller)('api/v1'),
|
|
169
|
-
__param(5, (0, common_1.Inject)(cache_manager_1.CACHE_MANAGER)),
|
|
170
|
-
__metadata("design:paramtypes", [timeseries_queries_service_1.TimeseriesQueriesService,
|
|
171
|
-
agent_lifecycle_service_1.AgentLifecycleService,
|
|
172
|
-
api_key_service_1.ApiKeyGeneratorService,
|
|
173
|
-
config_1.ConfigService,
|
|
174
|
-
tenant_cache_service_1.TenantCacheService, Object])
|
|
175
|
-
], AgentsController);
|
|
176
|
-
//# sourceMappingURL=agents.controller.js.map
|
|
@@ -1,71 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.CostsController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const cache_manager_1 = require("@nestjs/cache-manager");
|
|
18
|
-
const range_query_dto_1 = require("../../common/dto/range-query.dto");
|
|
19
|
-
const aggregation_service_1 = require("../services/aggregation.service");
|
|
20
|
-
const timeseries_queries_service_1 = require("../services/timeseries-queries.service");
|
|
21
|
-
const current_user_decorator_1 = require("../../auth/current-user.decorator");
|
|
22
|
-
const user_cache_interceptor_1 = require("../../common/interceptors/user-cache.interceptor");
|
|
23
|
-
const cache_constants_1 = require("../../common/constants/cache.constants");
|
|
24
|
-
const query_helpers_1 = require("../services/query-helpers");
|
|
25
|
-
let CostsController = class CostsController {
|
|
26
|
-
aggregation;
|
|
27
|
-
timeseries;
|
|
28
|
-
constructor(aggregation, timeseries) {
|
|
29
|
-
this.aggregation = aggregation;
|
|
30
|
-
this.timeseries = timeseries;
|
|
31
|
-
}
|
|
32
|
-
async getCosts(query, user) {
|
|
33
|
-
const range = query.range ?? '7d';
|
|
34
|
-
const agentName = query.agent_name;
|
|
35
|
-
const [{ costUsage: hourly }, { costUsage: daily }, byModel, prevCost] = await Promise.all([
|
|
36
|
-
this.timeseries.getTimeseries(range, user.id, true, undefined, agentName),
|
|
37
|
-
this.timeseries.getTimeseries(range, user.id, false, undefined, agentName),
|
|
38
|
-
this.timeseries.getCostByModel(range, user.id, agentName),
|
|
39
|
-
this.aggregation.getPreviousCostTotal(range, user.id, agentName),
|
|
40
|
-
]);
|
|
41
|
-
const currentCost = hourly.reduce((s, h) => s + h.cost, 0);
|
|
42
|
-
return {
|
|
43
|
-
summary: {
|
|
44
|
-
weekly_cost: {
|
|
45
|
-
value: currentCost,
|
|
46
|
-
trend_pct: (0, query_helpers_1.computeTrend)(currentCost, prevCost),
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
daily,
|
|
50
|
-
hourly,
|
|
51
|
-
by_model: byModel,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
exports.CostsController = CostsController;
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, common_1.Get)('costs'),
|
|
58
|
-
__param(0, (0, common_1.Query)()),
|
|
59
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
60
|
-
__metadata("design:type", Function),
|
|
61
|
-
__metadata("design:paramtypes", [range_query_dto_1.RangeQueryDto, Object]),
|
|
62
|
-
__metadata("design:returntype", Promise)
|
|
63
|
-
], CostsController.prototype, "getCosts", null);
|
|
64
|
-
exports.CostsController = CostsController = __decorate([
|
|
65
|
-
(0, common_1.Controller)('api/v1'),
|
|
66
|
-
(0, common_1.UseInterceptors)(user_cache_interceptor_1.UserCacheInterceptor),
|
|
67
|
-
(0, cache_manager_1.CacheTTL)(cache_constants_1.DASHBOARD_CACHE_TTL_MS),
|
|
68
|
-
__metadata("design:paramtypes", [aggregation_service_1.AggregationService,
|
|
69
|
-
timeseries_queries_service_1.TimeseriesQueriesService])
|
|
70
|
-
], CostsController);
|
|
71
|
-
//# sourceMappingURL=costs.controller.js.map
|
|
@@ -1,67 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.MessagesController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const messages_query_dto_1 = require("../dto/messages-query.dto");
|
|
18
|
-
const messages_query_service_1 = require("../services/messages-query.service");
|
|
19
|
-
const message_details_service_1 = require("../services/message-details.service");
|
|
20
|
-
const current_user_decorator_1 = require("../../auth/current-user.decorator");
|
|
21
|
-
let MessagesController = class MessagesController {
|
|
22
|
-
messagesQuery;
|
|
23
|
-
messageDetails;
|
|
24
|
-
constructor(messagesQuery, messageDetails) {
|
|
25
|
-
this.messagesQuery = messagesQuery;
|
|
26
|
-
this.messageDetails = messageDetails;
|
|
27
|
-
}
|
|
28
|
-
async getMessages(query, user) {
|
|
29
|
-
return this.messagesQuery.getMessages({
|
|
30
|
-
range: query.range,
|
|
31
|
-
userId: user.id,
|
|
32
|
-
provider: query.provider,
|
|
33
|
-
service_type: query.service_type,
|
|
34
|
-
cost_min: query.cost_min,
|
|
35
|
-
cost_max: query.cost_max,
|
|
36
|
-
limit: Math.min(query.limit ?? 50, 200),
|
|
37
|
-
cursor: query.cursor,
|
|
38
|
-
agent_name: query.agent_name,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
async getMessageDetails(id, user) {
|
|
42
|
-
return this.messageDetails.getDetails(id, user.id);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
exports.MessagesController = MessagesController;
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, common_1.Get)('messages'),
|
|
48
|
-
__param(0, (0, common_1.Query)()),
|
|
49
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
50
|
-
__metadata("design:type", Function),
|
|
51
|
-
__metadata("design:paramtypes", [messages_query_dto_1.MessagesQueryDto, Object]),
|
|
52
|
-
__metadata("design:returntype", Promise)
|
|
53
|
-
], MessagesController.prototype, "getMessages", null);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, common_1.Get)('messages/:id/details'),
|
|
56
|
-
__param(0, (0, common_1.Param)('id')),
|
|
57
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
58
|
-
__metadata("design:type", Function),
|
|
59
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
60
|
-
__metadata("design:returntype", Promise)
|
|
61
|
-
], MessagesController.prototype, "getMessageDetails", null);
|
|
62
|
-
exports.MessagesController = MessagesController = __decorate([
|
|
63
|
-
(0, common_1.Controller)('api/v1'),
|
|
64
|
-
__metadata("design:paramtypes", [messages_query_service_1.MessagesQueryService,
|
|
65
|
-
message_details_service_1.MessageDetailsService])
|
|
66
|
-
], MessagesController);
|
|
67
|
-
//# sourceMappingURL=messages.controller.js.map
|
|
@@ -1,104 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.OverviewController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const cache_manager_1 = require("@nestjs/cache-manager");
|
|
18
|
-
const range_query_dto_1 = require("../../common/dto/range-query.dto");
|
|
19
|
-
const range_util_1 = require("../../common/utils/range.util");
|
|
20
|
-
const aggregation_service_1 = require("../services/aggregation.service");
|
|
21
|
-
const timeseries_queries_service_1 = require("../services/timeseries-queries.service");
|
|
22
|
-
const current_user_decorator_1 = require("../../auth/current-user.decorator");
|
|
23
|
-
const user_cache_interceptor_1 = require("../../common/interceptors/user-cache.interceptor");
|
|
24
|
-
const cache_constants_1 = require("../../common/constants/cache.constants");
|
|
25
|
-
const tenant_cache_service_1 = require("../../common/services/tenant-cache.service");
|
|
26
|
-
const provider_service_1 = require("../../routing/routing-core/provider.service");
|
|
27
|
-
const resolve_agent_service_1 = require("../../routing/routing-core/resolve-agent.service");
|
|
28
|
-
let OverviewController = class OverviewController {
|
|
29
|
-
aggregation;
|
|
30
|
-
timeseries;
|
|
31
|
-
tenantCache;
|
|
32
|
-
providerService;
|
|
33
|
-
resolveAgent;
|
|
34
|
-
constructor(aggregation, timeseries, tenantCache, providerService, resolveAgent) {
|
|
35
|
-
this.aggregation = aggregation;
|
|
36
|
-
this.timeseries = timeseries;
|
|
37
|
-
this.tenantCache = tenantCache;
|
|
38
|
-
this.providerService = providerService;
|
|
39
|
-
this.resolveAgent = resolveAgent;
|
|
40
|
-
}
|
|
41
|
-
async getOverview(query, user) {
|
|
42
|
-
const range = query.range ?? '24h';
|
|
43
|
-
const agentName = query.agent_name;
|
|
44
|
-
const hourly = (0, range_util_1.isHourlyRange)(range);
|
|
45
|
-
const tenantId = (await this.tenantCache.resolve(user.id)) ?? undefined;
|
|
46
|
-
const [summary, tsData, costByModel, recentActivity, activeSkills, hasData, hasProviders] = await Promise.all([
|
|
47
|
-
this.aggregation.getSummaryMetrics(range, user.id, tenantId, agentName),
|
|
48
|
-
this.timeseries.getTimeseries(range, user.id, hourly, tenantId, agentName),
|
|
49
|
-
this.timeseries.getCostByModel(range, user.id, agentName, tenantId),
|
|
50
|
-
this.timeseries.getRecentActivity(range, user.id, 5, agentName, tenantId),
|
|
51
|
-
this.timeseries.getActiveSkills(range, user.id, agentName, tenantId),
|
|
52
|
-
this.aggregation.hasAnyData(user.id, agentName, tenantId),
|
|
53
|
-
this.hasActiveProviders(user.id, agentName),
|
|
54
|
-
]);
|
|
55
|
-
return {
|
|
56
|
-
summary: {
|
|
57
|
-
tokens_today: summary.tokens.tokens_today,
|
|
58
|
-
cost_today: summary.cost,
|
|
59
|
-
messages: summary.messages,
|
|
60
|
-
services_hit: { total: 0, healthy: 0, issues: 0 },
|
|
61
|
-
},
|
|
62
|
-
token_usage: tsData.tokenUsage,
|
|
63
|
-
cost_usage: tsData.costUsage,
|
|
64
|
-
message_usage: tsData.messageUsage,
|
|
65
|
-
cost_by_model: costByModel,
|
|
66
|
-
recent_activity: recentActivity,
|
|
67
|
-
active_skills: activeSkills,
|
|
68
|
-
has_data: hasData,
|
|
69
|
-
has_providers: hasProviders,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
async hasActiveProviders(userId, agentName) {
|
|
73
|
-
if (!agentName)
|
|
74
|
-
return false;
|
|
75
|
-
try {
|
|
76
|
-
const agent = await this.resolveAgent.resolve(userId, agentName);
|
|
77
|
-
const providers = await this.providerService.getProviders(agent.id);
|
|
78
|
-
return providers.some((p) => p.is_active);
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
exports.OverviewController = OverviewController;
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, common_1.Get)('overview'),
|
|
88
|
-
__param(0, (0, common_1.Query)()),
|
|
89
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
90
|
-
__metadata("design:type", Function),
|
|
91
|
-
__metadata("design:paramtypes", [range_query_dto_1.RangeQueryDto, Object]),
|
|
92
|
-
__metadata("design:returntype", Promise)
|
|
93
|
-
], OverviewController.prototype, "getOverview", null);
|
|
94
|
-
exports.OverviewController = OverviewController = __decorate([
|
|
95
|
-
(0, common_1.Controller)('api/v1'),
|
|
96
|
-
(0, common_1.UseInterceptors)(user_cache_interceptor_1.UserCacheInterceptor),
|
|
97
|
-
(0, cache_manager_1.CacheTTL)(cache_constants_1.DASHBOARD_CACHE_TTL_MS),
|
|
98
|
-
__metadata("design:paramtypes", [aggregation_service_1.AggregationService,
|
|
99
|
-
timeseries_queries_service_1.TimeseriesQueriesService,
|
|
100
|
-
tenant_cache_service_1.TenantCacheService,
|
|
101
|
-
provider_service_1.ProviderService,
|
|
102
|
-
resolve_agent_service_1.ResolveAgentService])
|
|
103
|
-
], OverviewController);
|
|
104
|
-
//# sourceMappingURL=overview.controller.js.map
|
|
@@ -1,74 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.TokensController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const cache_manager_1 = require("@nestjs/cache-manager");
|
|
18
|
-
const range_query_dto_1 = require("../../common/dto/range-query.dto");
|
|
19
|
-
const aggregation_service_1 = require("../services/aggregation.service");
|
|
20
|
-
const timeseries_queries_service_1 = require("../services/timeseries-queries.service");
|
|
21
|
-
const current_user_decorator_1 = require("../../auth/current-user.decorator");
|
|
22
|
-
const user_cache_interceptor_1 = require("../../common/interceptors/user-cache.interceptor");
|
|
23
|
-
const cache_constants_1 = require("../../common/constants/cache.constants");
|
|
24
|
-
const query_helpers_1 = require("../services/query-helpers");
|
|
25
|
-
let TokensController = class TokensController {
|
|
26
|
-
aggregation;
|
|
27
|
-
timeseries;
|
|
28
|
-
constructor(aggregation, timeseries) {
|
|
29
|
-
this.aggregation = aggregation;
|
|
30
|
-
this.timeseries = timeseries;
|
|
31
|
-
}
|
|
32
|
-
async getTokens(query, user) {
|
|
33
|
-
const range = query.range ?? '24h';
|
|
34
|
-
const agentName = query.agent_name;
|
|
35
|
-
const [{ tokenUsage: hourly }, { tokenUsage: daily }, prevTokens] = await Promise.all([
|
|
36
|
-
this.timeseries.getTimeseries(range, user.id, true, undefined, agentName),
|
|
37
|
-
this.timeseries.getTimeseries(range, user.id, false, undefined, agentName),
|
|
38
|
-
this.aggregation.getPreviousTokenTotal(range, user.id, agentName),
|
|
39
|
-
]);
|
|
40
|
-
const inputTotal = hourly.reduce((s, h) => s + h.input_tokens, 0);
|
|
41
|
-
const outputTotal = hourly.reduce((s, h) => s + h.output_tokens, 0);
|
|
42
|
-
const current = inputTotal + outputTotal;
|
|
43
|
-
return {
|
|
44
|
-
summary: {
|
|
45
|
-
total_tokens: {
|
|
46
|
-
value: current,
|
|
47
|
-
trend_pct: (0, query_helpers_1.computeTrend)(current, prevTokens),
|
|
48
|
-
sub_values: { input: inputTotal, output: outputTotal },
|
|
49
|
-
},
|
|
50
|
-
input_tokens: inputTotal,
|
|
51
|
-
output_tokens: outputTotal,
|
|
52
|
-
},
|
|
53
|
-
hourly,
|
|
54
|
-
daily,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
exports.TokensController = TokensController;
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, common_1.Get)('tokens'),
|
|
61
|
-
__param(0, (0, common_1.Query)()),
|
|
62
|
-
__param(1, (0, current_user_decorator_1.CurrentUser)()),
|
|
63
|
-
__metadata("design:type", Function),
|
|
64
|
-
__metadata("design:paramtypes", [range_query_dto_1.RangeQueryDto, Object]),
|
|
65
|
-
__metadata("design:returntype", Promise)
|
|
66
|
-
], TokensController.prototype, "getTokens", null);
|
|
67
|
-
exports.TokensController = TokensController = __decorate([
|
|
68
|
-
(0, common_1.Controller)('api/v1'),
|
|
69
|
-
(0, common_1.UseInterceptors)(user_cache_interceptor_1.UserCacheInterceptor),
|
|
70
|
-
(0, cache_manager_1.CacheTTL)(cache_constants_1.DASHBOARD_CACHE_TTL_MS),
|
|
71
|
-
__metadata("design:paramtypes", [aggregation_service_1.AggregationService,
|
|
72
|
-
timeseries_queries_service_1.TimeseriesQueriesService])
|
|
73
|
-
], TokensController);
|
|
74
|
-
//# sourceMappingURL=tokens.controller.js.map
|