@oneuptime/common 11.5.4 → 11.5.5
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/Models/DatabaseModels/AIAgentTaskPullRequest.ts +56 -45
- package/Models/DatabaseModels/AIInsight.ts +748 -0
- package/Models/DatabaseModels/AIRun.ts +262 -0
- package/Models/DatabaseModels/CodeRepository.ts +42 -0
- package/Models/DatabaseModels/GlobalConfig.ts +105 -0
- package/Models/DatabaseModels/Index.ts +4 -8
- package/Models/DatabaseModels/InstanceHealthLog.ts +277 -0
- package/Models/DatabaseModels/LlmLog.ts +33 -0
- package/Models/DatabaseModels/Project.ts +123 -6
- package/Models/DatabaseModels/Runbook.ts +1 -1
- package/Server/API/AIAgentDataAPI.ts +802 -140
- package/Server/API/AIAgentTaskAPI.ts +132 -69
- package/Server/API/AIAgentTaskLogAPI.ts +65 -41
- package/Server/API/AIAgentTaskPullRequestAPI.ts +41 -0
- package/Server/API/AIInsightAPI.ts +220 -0
- package/Server/API/AIInvestigationAPI.ts +363 -1
- package/Server/API/CodeFixRunAPI.ts +251 -0
- package/Server/API/GitHubAPI.ts +246 -3
- package/Server/API/TelemetryExceptionAPI.ts +193 -48
- package/Server/EnvironmentConfig.ts +1 -1
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783943300000-DropServiceCodeRepository.ts +26 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783947444597-CodeFixRunsOnAIRun.ts +73 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783950962813-AddCodeFixTaskType.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783954040984-AddInstrumentationFixTasksFlag.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783957160597-MigrationName.ts +51 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783958542237-AddTaskContextToAIRun.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783965945957-AddInvestigationVerdictAndGrade.ts +47 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783970619301-AddFixGuardrailColumns.ts +53 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783970619302-DropLegacyAIAgentTaskTables.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783977781677-AddCiStatusToFixPullRequests.ts +37 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783990000000-AddCompletionTokensToLlmLog.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784010274993-AddSentinelInsight.ts +75 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784010274994-AddSentinelInsightFlags.ts +37 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784030612266-RenameSentinelToAI.ts +203 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784033837629-MigrationName.ts +163 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +30 -0
- package/Server/Infrastructure/Queue.ts +82 -4
- package/Server/Infrastructure/Semaphore.ts +62 -1
- package/Server/Services/AIAgentService.ts +32 -0
- package/Server/Services/AIAgentTaskPullRequestService.ts +117 -0
- package/Server/Services/AIInsightService.ts +174 -0
- package/Server/Services/AIRunEventService.ts +63 -0
- package/Server/Services/AIRunService.ts +259 -1
- package/Server/Services/AIService.ts +249 -7
- package/Server/Services/AlertService.ts +4 -4
- package/Server/Services/CodeRepositoryService.ts +209 -0
- package/Server/Services/GlobalConfigService.ts +148 -0
- package/Server/Services/IncidentService.ts +183 -38
- package/Server/Services/IncidentStateTimelineService.ts +24 -4
- package/Server/Services/Index.ts +4 -4
- package/Server/Services/{AIAgentTaskLogService.ts → InstanceHealthLogService.ts} +1 -1
- package/Server/Services/LlmLogService.ts +27 -0
- package/Server/Services/LlmProviderService.ts +108 -0
- package/Server/Services/MetricBaselineService.ts +123 -0
- package/Server/Services/MonitorService.ts +15 -0
- package/Server/Services/TelemetryExceptionService.ts +323 -116
- package/Server/Services/TraceAggregationService.ts +176 -0
- package/Server/Types/Workflow/ComponentCode.ts +6 -0
- package/Server/Types/Workflow/Components/AI/GenerateText.ts +326 -0
- package/Server/Types/Workflow/Components/Index.ts +2 -0
- package/Server/Utils/AI/Chat/ObservabilityAssistant.ts +1 -1
- package/Server/Utils/AI/CodeFix/CodeAgentWorkspaceGuard.ts +71 -0
- package/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.ts +243 -0
- package/Server/Utils/AI/CodeFix/CodeFixRunQueue.ts +131 -0
- package/Server/Utils/AI/CodeFix/FixRunBudget.ts +148 -0
- package/Server/Utils/AI/CodeFix/OpenPullRequestCap.ts +117 -0
- package/Server/Utils/AI/Eval/EvalCorpus.ts +369 -0
- package/Server/Utils/AI/Eval/EvalScores.ts +172 -0
- package/Server/Utils/AI/Eval/ReplayInvestigation.ts +87 -0
- package/Server/Utils/AI/PerfEvidence/SpanTreeAnalyzer.ts +676 -0
- package/Server/Utils/AI/{Sentinel/SentinelInvestigationEngine.ts → SRE/AIInvestigationEngine.ts} +58 -37
- package/Server/Utils/AI/{Sentinel/SentinelMemory.ts → SRE/AIMemory.ts} +3 -3
- package/Server/Utils/AI/{Sentinel → SRE}/AlertInvestigationRunner.ts +50 -20
- package/Server/Utils/AI/SRE/ConfidenceSignal.ts +293 -0
- package/Server/Utils/AI/SRE/FixFromIncidentTaskTrigger.ts +115 -0
- package/Server/Utils/AI/SRE/FixPerformanceTaskTrigger.ts +223 -0
- package/Server/Utils/AI/{Sentinel → SRE}/IncidentInvestigationRunner.ts +71 -21
- package/Server/Utils/AI/{Sentinel → SRE}/IncidentPostmortemRunner.ts +8 -8
- package/Server/Utils/AI/SRE/Insights/Detectors/ErrorLogSpikeDetector.ts +364 -0
- package/Server/Utils/AI/SRE/Insights/Detectors/ExceptionSpikeDetector.ts +317 -0
- package/Server/Utils/AI/SRE/Insights/Detectors/Index.ts +27 -0
- package/Server/Utils/AI/SRE/Insights/Detectors/MetricDriftDetector.ts +221 -0
- package/Server/Utils/AI/SRE/Insights/Detectors/NewExceptionDetector.ts +238 -0
- package/Server/Utils/AI/SRE/Insights/Detectors/TraceLatencyRegressionDetector.ts +521 -0
- package/Server/Utils/AI/SRE/Insights/FixRouting.ts +242 -0
- package/Server/Utils/AI/SRE/Insights/InsightScanner.ts +290 -0
- package/Server/Utils/AI/SRE/Insights/InsightStore.ts +283 -0
- package/Server/Utils/AI/SRE/Insights/InsightTriageRunner.ts +242 -0
- package/Server/Utils/AI/SRE/Insights/Triage.ts +162 -0
- package/Server/Utils/AI/SRE/Insights/Types.ts +49 -0
- package/Server/Utils/AI/SRE/InstrumentationTaskTrigger.ts +212 -0
- package/Server/Utils/AI/SRE/InvestigationGrader.ts +282 -0
- package/Server/Utils/AI/{Sentinel → SRE}/InvestigationQueue.ts +114 -19
- package/Server/Utils/AI/{Sentinel → SRE}/README.md +4 -4
- package/Server/Utils/AI/SRE/SubjectCodeFixRun.ts +172 -0
- package/Server/Utils/AI/Toolbox/{SentinelActionTools.ts → AIActionTools.ts} +22 -1
- package/Server/Utils/AI/Toolbox/Index.ts +2 -2
- package/Server/Utils/AnalyticsDatabase/ClickhouseCapacity.ts +526 -0
- package/Server/Utils/CodeRepository/GitHub/GitHub.ts +319 -1
- package/Server/Utils/CodeRepository/ServiceRepoLinkSuggester.ts +221 -0
- package/Server/Utils/CodeRepository/StackTraceRepoResolver.ts +571 -0
- package/Server/Utils/Execute.ts +2 -1
- package/Server/Utils/LLM/LLMService.ts +160 -30
- package/Server/Utils/Monitor/Criteria/SqlMonitorCriteria.ts +152 -0
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +29 -0
- package/Tests/Server/Infrastructure/Queue.test.ts +227 -0
- package/Tests/Server/Infrastructure/SemaphorePermit.test.ts +159 -0
- package/Tests/Server/Services/AIAgentTaskPullRequestOutcomeStats.test.ts +154 -0
- package/Tests/Server/Services/AIInsightService.test.ts +324 -0
- package/Tests/Server/Services/AIRunCodeFixClaim.test.ts +401 -0
- package/Tests/Server/Services/AIRunHumanVerdict.test.ts +161 -0
- package/Tests/Server/Services/AIServiceDailyBudget.test.ts +95 -5
- package/Tests/Server/Services/AIServiceProjectAccess.test.ts +259 -0
- package/Tests/Server/Services/FixFromIncidentTaskTrigger.test.ts +249 -0
- package/Tests/Server/Services/FixPerformanceTaskTrigger.test.ts +274 -0
- package/Tests/Server/Services/GlobalConfigService.test.ts +80 -0
- package/Tests/Server/Services/IncidentInternalNoteAnnouncement.test.ts +1 -1
- package/Tests/Server/Services/InstrumentationTaskTrigger.test.ts +313 -0
- package/Tests/Server/Services/LlmProviderProjectOwned.test.ts +132 -0
- package/Tests/Server/Services/TelemetryExceptionAIFixReadiness.test.ts +405 -0
- package/Tests/Server/Services/TelemetryExceptionCodeFixRun.test.ts +322 -0
- package/Tests/Server/Services/TraceServiceLatencyProfile.test.ts +278 -0
- package/Tests/Server/Types/Workflow/Components/AIGenerateText.test.ts +722 -0
- package/Tests/Server/Utils/AI/{SentinelAlertGating.test.ts → AIAlertGating.test.ts} +19 -19
- package/Tests/Server/Utils/AI/AIConfidenceSignal.test.ts +362 -0
- package/Tests/Server/Utils/AI/{SentinelInvestigationQueue.test.ts → AIInvestigationQueue.test.ts} +19 -19
- package/Tests/Server/Utils/AI/CodeAgentWorkspaceGuard.test.ts +138 -0
- package/Tests/Server/Utils/AI/CodeFixAgentCompletion.test.ts +335 -0
- package/Tests/Server/Utils/AI/CodeFixRunQueue.test.ts +134 -0
- package/Tests/Server/Utils/AI/EvalCorpus.test.ts +209 -0
- package/Tests/Server/Utils/AI/EvalScores.test.ts +343 -0
- package/Tests/Server/Utils/AI/FixRunBudget.test.ts +218 -0
- package/Tests/Server/Utils/AI/Insights/ErrorLogSpikeDetector.test.ts +437 -0
- package/Tests/Server/Utils/AI/Insights/ExceptionSpikeDetector.test.ts +287 -0
- package/Tests/Server/Utils/AI/Insights/InsightDetectorsIndex.test.ts +34 -0
- package/Tests/Server/Utils/AI/Insights/InsightFixRouting.test.ts +572 -0
- package/Tests/Server/Utils/AI/Insights/InsightNeverThrowsHardening.test.ts +344 -0
- package/Tests/Server/Utils/AI/Insights/InsightScanner.test.ts +720 -0
- package/Tests/Server/Utils/AI/Insights/InsightStore.test.ts +467 -0
- package/Tests/Server/Utils/AI/Insights/InsightStoreHardening.test.ts +370 -0
- package/Tests/Server/Utils/AI/Insights/InsightTriage.test.ts +210 -0
- package/Tests/Server/Utils/AI/Insights/InsightTriageRunner.test.ts +221 -0
- package/Tests/Server/Utils/AI/Insights/InvestigationQueueInsightSubject.test.ts +328 -0
- package/Tests/Server/Utils/AI/Insights/MetricBaselineDrift.test.ts +182 -0
- package/Tests/Server/Utils/AI/Insights/MetricDriftDetector.test.ts +280 -0
- package/Tests/Server/Utils/AI/Insights/NewExceptionDetector.test.ts +259 -0
- package/Tests/Server/Utils/AI/Insights/TraceLatencyRegressionDetector.test.ts +770 -0
- package/Tests/Server/Utils/AI/InvestigationGrader.test.ts +343 -0
- package/Tests/Server/Utils/AI/LLMServiceRequestPolicy.test.ts +307 -0
- package/Tests/Server/Utils/AI/OpenPullRequestCap.test.ts +170 -0
- package/Tests/Server/Utils/AI/SpanTreeAnalyzer.test.ts +559 -0
- package/Tests/Server/Utils/AnalyticsDatabase/ClickhouseCapacity.test.ts +158 -0
- package/Tests/Server/Utils/GitHubCheckRunsConclusion.test.ts +100 -0
- package/Tests/Server/Utils/GitHubPullRequestStateMapping.test.ts +50 -0
- package/Tests/Server/Utils/Monitor/Criteria/SqlMonitorCriteria.test.ts +266 -0
- package/Tests/Server/Utils/ServiceRepoLinkSuggester.test.ts +167 -0
- package/Tests/Server/Utils/StackTraceRepoResolver.test.ts +527 -0
- package/Tests/Types/AI/AIChatPermissionMode.test.ts +112 -0
- package/Tests/Types/AI/CodeFixTaskType.test.ts +152 -0
- package/Tests/Types/AI/FixPullRequestCiStatus.test.ts +181 -0
- package/Tests/Types/Monitor/MonitorStepSqlMonitor.test.ts +110 -0
- package/Tests/Types/Monitor/SqlDatabaseType.test.ts +55 -0
- package/Tests/Types/Workflow/AIGenerateTextMetadata.test.ts +180 -0
- package/Tests/UI/Components/TableBulkCsvExport.test.tsx +168 -0
- package/Tests/UI/Utils/TableColumnsToCsv.test.ts +523 -0
- package/Types/AI/AIChatTypes.ts +8 -0
- package/Types/AI/AIInsightEvidence.ts +77 -0
- package/Types/AI/AIInsightHumanVerdict.ts +15 -0
- package/Types/AI/AIInsightSeverity.ts +13 -0
- package/Types/AI/AIInsightStatus.ts +38 -0
- package/Types/AI/AIInsightType.ts +41 -0
- package/Types/AI/AIRunAutoGrade.ts +18 -0
- package/Types/AI/AIRunEventType.ts +5 -0
- package/Types/AI/AIRunHumanVerdict.ts +17 -0
- package/Types/AI/AIRunType.ts +6 -0
- package/Types/AI/CodeFixTaskContext.ts +88 -0
- package/Types/AI/CodeFixTaskType.ts +132 -0
- package/Types/AI/FixPullRequestCiStatus.ts +132 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.ts +67 -0
- package/Types/Incident/IncidentMetricType.ts +7 -0
- package/Types/Monitor/CriteriaFilter.ts +8 -0
- package/Types/Monitor/MonitorCriteriaInstance.ts +67 -0
- package/Types/Monitor/MonitorStep.ts +38 -0
- package/Types/Monitor/MonitorStepSqlMonitor.ts +141 -0
- package/Types/Monitor/MonitorType.ts +17 -0
- package/Types/Monitor/SqlDatabaseType.ts +49 -0
- package/Types/Monitor/SqlMonitor/SqlMonitorResponse.ts +28 -0
- package/Types/Permission.ts +11 -95
- package/Types/Probe/ProbeMonitorResponse.ts +2 -0
- package/Types/Runbook/RunbookStep.ts +26 -2
- package/Types/Runbook/RunbookStepType.ts +1 -0
- package/Types/Workflow/Component.ts +13 -0
- package/Types/Workflow/ComponentID.ts +1 -0
- package/Types/Workflow/Components/AI.ts +148 -0
- package/Types/Workflow/Components.ts +8 -0
- package/UI/Components/AI/GenerateFromAIModal.tsx +1 -1
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +11 -0
- package/UI/Components/MoreMenu/MoreMenu.tsx +1 -1
- package/UI/Components/Table/Table.tsx +38 -2
- package/UI/Utils/TableColumnsToCsv.ts +385 -0
- package/Utils/Monitor/MonitorMetricType.ts +1 -0
- package/build/dist/Models/DatabaseModels/AIAgentTaskPullRequest.js +59 -45
- package/build/dist/Models/DatabaseModels/AIAgentTaskPullRequest.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AIInsight.js +795 -0
- package/build/dist/Models/DatabaseModels/AIInsight.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AIRun.js +274 -0
- package/build/dist/Models/DatabaseModels/AIRun.js.map +1 -1
- package/build/dist/Models/DatabaseModels/CodeRepository.js +43 -0
- package/build/dist/Models/DatabaseModels/CodeRepository.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalConfig.js +110 -0
- package/build/dist/Models/DatabaseModels/GlobalConfig.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +4 -8
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/InstanceHealthLog.js +304 -0
- package/build/dist/Models/DatabaseModels/InstanceHealthLog.js.map +1 -0
- package/build/dist/Models/DatabaseModels/LlmLog.js +35 -0
- package/build/dist/Models/DatabaseModels/LlmLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +127 -6
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Runbook.js +1 -1
- package/build/dist/Models/DatabaseModels/Runbook.js.map +1 -1
- package/build/dist/Server/API/AIAgentDataAPI.js +568 -85
- package/build/dist/Server/API/AIAgentDataAPI.js.map +1 -1
- package/build/dist/Server/API/AIAgentTaskAPI.js +100 -44
- package/build/dist/Server/API/AIAgentTaskAPI.js.map +1 -1
- package/build/dist/Server/API/AIAgentTaskLogAPI.js +49 -25
- package/build/dist/Server/API/AIAgentTaskLogAPI.js.map +1 -1
- package/build/dist/Server/API/AIAgentTaskPullRequestAPI.js +27 -0
- package/build/dist/Server/API/AIAgentTaskPullRequestAPI.js.map +1 -1
- package/build/dist/Server/API/AIInsightAPI.js +140 -0
- package/build/dist/Server/API/AIInsightAPI.js.map +1 -0
- package/build/dist/Server/API/AIInvestigationAPI.js +257 -1
- package/build/dist/Server/API/AIInvestigationAPI.js.map +1 -1
- package/build/dist/Server/API/CodeFixRunAPI.js +181 -0
- package/build/dist/Server/API/CodeFixRunAPI.js.map +1 -0
- package/build/dist/Server/API/GitHubAPI.js +164 -2
- package/build/dist/Server/API/GitHubAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryExceptionAPI.js +148 -43
- package/build/dist/Server/API/TelemetryExceptionAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +1 -1
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783943300000-DropServiceCodeRepository.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783943300000-DropServiceCodeRepository.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783947444597-CodeFixRunsOnAIRun.js +32 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783947444597-CodeFixRunsOnAIRun.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783950962813-AddCodeFixTaskType.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783950962813-AddCodeFixTaskType.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783954040984-AddInstrumentationFixTasksFlag.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783954040984-AddInstrumentationFixTasksFlag.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783957160597-MigrationName.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783957160597-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783958542237-AddTaskContextToAIRun.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783958542237-AddTaskContextToAIRun.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783965945957-AddInvestigationVerdictAndGrade.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783965945957-AddInvestigationVerdictAndGrade.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783970619301-AddFixGuardrailColumns.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783970619301-AddFixGuardrailColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783970619302-DropLegacyAIAgentTaskTables.js +24 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783970619302-DropLegacyAIAgentTaskTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783977781677-AddCiStatusToFixPullRequests.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783977781677-AddCiStatusToFixPullRequests.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783990000000-AddCompletionTokensToLlmLog.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783990000000-AddCompletionTokensToLlmLog.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784010274993-AddSentinelInsight.js +32 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784010274993-AddSentinelInsight.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784010274994-AddSentinelInsightFlags.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784010274994-AddSentinelInsightFlags.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784030612266-RenameSentinelToAI.js +125 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784030612266-RenameSentinelToAI.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784033837629-MigrationName.js +62 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784033837629-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +30 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Queue.js +73 -3
- package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
- package/build/dist/Server/Infrastructure/Semaphore.js +44 -1
- package/build/dist/Server/Infrastructure/Semaphore.js.map +1 -1
- package/build/dist/Server/Services/AIAgentService.js +29 -0
- package/build/dist/Server/Services/AIAgentService.js.map +1 -1
- package/build/dist/Server/Services/AIAgentTaskPullRequestService.js +78 -0
- package/build/dist/Server/Services/AIAgentTaskPullRequestService.js.map +1 -1
- package/build/dist/Server/Services/AIInsightService.js +164 -0
- package/build/dist/Server/Services/AIInsightService.js.map +1 -0
- package/build/dist/Server/Services/AIRunEventService.js +49 -0
- package/build/dist/Server/Services/AIRunEventService.js.map +1 -1
- package/build/dist/Server/Services/AIRunService.js +221 -0
- package/build/dist/Server/Services/AIRunService.js.map +1 -1
- package/build/dist/Server/Services/AIService.js +198 -11
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/AlertService.js +4 -4
- package/build/dist/Server/Services/AlertService.js.map +1 -1
- package/build/dist/Server/Services/CodeRepositoryService.js +180 -0
- package/build/dist/Server/Services/CodeRepositoryService.js.map +1 -1
- package/build/dist/Server/Services/GlobalConfigService.js +84 -0
- package/build/dist/Server/Services/GlobalConfigService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +149 -37
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +24 -4
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +4 -4
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/{AIAgentTaskLogService.js → InstanceHealthLogService.js} +2 -2
- package/build/dist/Server/Services/InstanceHealthLogService.js.map +1 -0
- package/build/dist/Server/Services/LlmLogService.js +23 -0
- package/build/dist/Server/Services/LlmLogService.js.map +1 -1
- package/build/dist/Server/Services/LlmProviderService.js +96 -0
- package/build/dist/Server/Services/LlmProviderService.js.map +1 -1
- package/build/dist/Server/Services/MetricBaselineService.js +65 -0
- package/build/dist/Server/Services/MetricBaselineService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +9 -1
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryExceptionService.js +243 -82
- package/build/dist/Server/Services/TelemetryExceptionService.js.map +1 -1
- package/build/dist/Server/Services/TraceAggregationService.js +124 -0
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Types/Workflow/ComponentCode.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/AI/GenerateText.js +240 -0
- package/build/dist/Server/Types/Workflow/Components/AI/GenerateText.js.map +1 -0
- package/build/dist/Server/Types/Workflow/Components/Index.js +2 -0
- package/build/dist/Server/Types/Workflow/Components/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/CodeFix/CodeAgentWorkspaceGuard.js +48 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeAgentWorkspaceGuard.js.map +1 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js +174 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js.map +1 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixRunQueue.js +126 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixRunQueue.js.map +1 -0
- package/build/dist/Server/Utils/AI/CodeFix/FixRunBudget.js +131 -0
- package/build/dist/Server/Utils/AI/CodeFix/FixRunBudget.js.map +1 -0
- package/build/dist/Server/Utils/AI/CodeFix/OpenPullRequestCap.js +99 -0
- package/build/dist/Server/Utils/AI/CodeFix/OpenPullRequestCap.js.map +1 -0
- package/build/dist/Server/Utils/AI/Eval/EvalCorpus.js +245 -0
- package/build/dist/Server/Utils/AI/Eval/EvalCorpus.js.map +1 -0
- package/build/dist/Server/Utils/AI/Eval/EvalScores.js +83 -0
- package/build/dist/Server/Utils/AI/Eval/EvalScores.js.map +1 -0
- package/build/dist/Server/Utils/AI/Eval/ReplayInvestigation.js +12 -0
- package/build/dist/Server/Utils/AI/Eval/ReplayInvestigation.js.map +1 -0
- package/build/dist/Server/Utils/AI/PerfEvidence/SpanTreeAnalyzer.js +439 -0
- package/build/dist/Server/Utils/AI/PerfEvidence/SpanTreeAnalyzer.js.map +1 -0
- package/build/dist/Server/Utils/AI/{Sentinel/SentinelInvestigationEngine.js → SRE/AIInvestigationEngine.js} +47 -31
- package/build/dist/Server/Utils/AI/SRE/AIInvestigationEngine.js.map +1 -0
- package/build/dist/Server/Utils/AI/{Sentinel/SentinelMemory.js → SRE/AIMemory.js} +5 -5
- package/build/dist/Server/Utils/AI/SRE/AIMemory.js.map +1 -0
- package/build/dist/Server/Utils/AI/{Sentinel → SRE}/AlertInvestigationRunner.js +42 -19
- package/build/dist/Server/Utils/AI/SRE/AlertInvestigationRunner.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/ConfidenceSignal.js +226 -0
- package/build/dist/Server/Utils/AI/SRE/ConfidenceSignal.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/FixFromIncidentTaskTrigger.js +100 -0
- package/build/dist/Server/Utils/AI/SRE/FixFromIncidentTaskTrigger.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/FixPerformanceTaskTrigger.js +174 -0
- package/build/dist/Server/Utils/AI/SRE/FixPerformanceTaskTrigger.js.map +1 -0
- package/build/dist/Server/Utils/AI/{Sentinel → SRE}/IncidentInvestigationRunner.js +60 -22
- package/build/dist/Server/Utils/AI/SRE/IncidentInvestigationRunner.js.map +1 -0
- package/build/dist/Server/Utils/AI/{Sentinel → SRE}/IncidentPostmortemRunner.js +9 -9
- package/build/dist/Server/Utils/AI/SRE/IncidentPostmortemRunner.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/ErrorLogSpikeDetector.js +268 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/ErrorLogSpikeDetector.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/ExceptionSpikeDetector.js +226 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/ExceptionSpikeDetector.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/Index.js +26 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/Index.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/MetricDriftDetector.js +159 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/MetricDriftDetector.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/NewExceptionDetector.js +177 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/NewExceptionDetector.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/TraceLatencyRegressionDetector.js +384 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Detectors/TraceLatencyRegressionDetector.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/FixRouting.js +180 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/FixRouting.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/InsightScanner.js +269 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/InsightScanner.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/InsightStore.js +231 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/InsightStore.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/InsightTriageRunner.js +206 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/InsightTriageRunner.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Triage.js +121 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Triage.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Types.js +2 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/Types.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/InstrumentationTaskTrigger.js +148 -0
- package/build/dist/Server/Utils/AI/SRE/InstrumentationTaskTrigger.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js +231 -0
- package/build/dist/Server/Utils/AI/SRE/InvestigationGrader.js.map +1 -0
- package/build/dist/Server/Utils/AI/{Sentinel → SRE}/InvestigationQueue.js +102 -23
- package/build/dist/Server/Utils/AI/SRE/InvestigationQueue.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/SubjectCodeFixRun.js +167 -0
- package/build/dist/Server/Utils/AI/SRE/SubjectCodeFixRun.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/{SentinelActionTools.js → AIActionTools.js} +18 -2
- package/build/dist/Server/Utils/AI/Toolbox/AIActionTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +2 -2
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/ClickhouseCapacity.js +301 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/ClickhouseCapacity.js.map +1 -0
- package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js +240 -2
- package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js.map +1 -1
- package/build/dist/Server/Utils/CodeRepository/ServiceRepoLinkSuggester.js +127 -0
- package/build/dist/Server/Utils/CodeRepository/ServiceRepoLinkSuggester.js.map +1 -0
- package/build/dist/Server/Utils/CodeRepository/StackTraceRepoResolver.js +336 -0
- package/build/dist/Server/Utils/CodeRepository/StackTraceRepoResolver.js.map +1 -0
- package/build/dist/Server/Utils/Execute.js.map +1 -1
- package/build/dist/Server/Utils/LLM/LLMService.js +125 -25
- package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/Criteria/SqlMonitorCriteria.js +120 -0
- package/build/dist/Server/Utils/Monitor/Criteria/SqlMonitorCriteria.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +21 -0
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Types/AI/AIInsightEvidence.js +2 -0
- package/build/dist/Types/AI/AIInsightEvidence.js.map +1 -0
- package/build/dist/Types/AI/AIInsightHumanVerdict.js +16 -0
- package/build/dist/Types/AI/AIInsightHumanVerdict.js.map +1 -0
- package/build/dist/Types/AI/AIInsightSeverity.js +14 -0
- package/build/dist/Types/AI/AIInsightSeverity.js.map +1 -0
- package/build/dist/Types/AI/AIInsightStatus.js +36 -0
- package/build/dist/Types/AI/AIInsightStatus.js.map +1 -0
- package/build/dist/Types/AI/AIInsightType.js +42 -0
- package/build/dist/Types/AI/AIInsightType.js.map +1 -0
- package/build/dist/Types/AI/AIRunAutoGrade.js +19 -0
- package/build/dist/Types/AI/AIRunAutoGrade.js.map +1 -0
- package/build/dist/Types/AI/AIRunEventType.js +5 -0
- package/build/dist/Types/AI/AIRunEventType.js.map +1 -1
- package/build/dist/Types/AI/AIRunHumanVerdict.js +18 -0
- package/build/dist/Types/AI/AIRunHumanVerdict.js.map +1 -0
- package/build/dist/Types/AI/AIRunType.js +6 -0
- package/build/dist/Types/AI/AIRunType.js.map +1 -1
- package/build/dist/Types/AI/CodeFixTaskContext.js +29 -0
- package/build/dist/Types/AI/CodeFixTaskContext.js.map +1 -0
- package/build/dist/Types/AI/CodeFixTaskType.js +122 -0
- package/build/dist/Types/AI/CodeFixTaskType.js.map +1 -0
- package/build/dist/Types/AI/FixPullRequestCiStatus.js +102 -0
- package/build/dist/Types/AI/FixPullRequestCiStatus.js.map +1 -0
- package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js +55 -0
- package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js.map +1 -1
- package/build/dist/Types/Incident/IncidentMetricType.js +7 -0
- package/build/dist/Types/Incident/IncidentMetricType.js.map +1 -1
- package/build/dist/Types/Monitor/CriteriaFilter.js +7 -0
- package/build/dist/Types/Monitor/CriteriaFilter.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js +62 -0
- package/build/dist/Types/Monitor/MonitorCriteriaInstance.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +28 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepSqlMonitor.js +93 -0
- package/build/dist/Types/Monitor/MonitorStepSqlMonitor.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorType.js +15 -0
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/SqlDatabaseType.js +47 -0
- package/build/dist/Types/Monitor/SqlDatabaseType.js.map +1 -0
- package/build/dist/Types/Monitor/SqlMonitor/SqlMonitorResponse.js +2 -0
- package/build/dist/Types/Monitor/SqlMonitor/SqlMonitorResponse.js.map +1 -0
- package/build/dist/Types/Permission.js +10 -84
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Runbook/RunbookStepType.js +1 -0
- package/build/dist/Types/Runbook/RunbookStepType.js.map +1 -1
- package/build/dist/Types/Workflow/ComponentID.js +1 -0
- package/build/dist/Types/Workflow/ComponentID.js.map +1 -1
- package/build/dist/Types/Workflow/Components/AI.js +135 -0
- package/build/dist/Types/Workflow/Components/AI.js.map +1 -0
- package/build/dist/Types/Workflow/Components.js +7 -0
- package/build/dist/Types/Workflow/Components.js.map +1 -1
- package/build/dist/UI/Components/AI/GenerateFromAIModal.js +1 -1
- package/build/dist/UI/Components/AI/GenerateFromAIModal.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +9 -0
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
- package/build/dist/UI/Components/MoreMenu/MoreMenu.js +1 -1
- package/build/dist/UI/Components/Table/Table.js +28 -2
- package/build/dist/UI/Components/Table/Table.js.map +1 -1
- package/build/dist/UI/Utils/TableColumnsToCsv.js +291 -0
- package/build/dist/UI/Utils/TableColumnsToCsv.js.map +1 -0
- package/build/dist/Utils/Monitor/MonitorMetricType.js +1 -0
- package/build/dist/Utils/Monitor/MonitorMetricType.js.map +1 -1
- package/package.json +1 -1
- package/Models/DatabaseModels/AIAgentTask.ts +0 -660
- package/Models/DatabaseModels/AIAgentTaskLog.ts +0 -426
- package/Models/DatabaseModels/AIAgentTaskTelemetryException.ts +0 -399
- package/Models/DatabaseModels/ServiceCodeRepository.ts +0 -647
- package/Server/Services/AIAgentTaskService.ts +0 -240
- package/Server/Services/AIAgentTaskTelemetryExceptionService.ts +0 -39
- package/Server/Services/ServiceCodeRepositoryService.ts +0 -55
- package/Tests/Server/Services/AIAgentTaskServiceClaim.test.ts +0 -146
- package/Types/AI/AIAgentTaskMetadata.ts +0 -25
- package/Types/AI/AIAgentTaskType.ts +0 -40
- package/build/dist/Models/DatabaseModels/AIAgentTask.js +0 -691
- package/build/dist/Models/DatabaseModels/AIAgentTask.js.map +0 -1
- package/build/dist/Models/DatabaseModels/AIAgentTaskLog.js +0 -447
- package/build/dist/Models/DatabaseModels/AIAgentTaskLog.js.map +0 -1
- package/build/dist/Models/DatabaseModels/AIAgentTaskTelemetryException.js +0 -415
- package/build/dist/Models/DatabaseModels/AIAgentTaskTelemetryException.js.map +0 -1
- package/build/dist/Models/DatabaseModels/ServiceCodeRepository.js +0 -665
- package/build/dist/Models/DatabaseModels/ServiceCodeRepository.js.map +0 -1
- package/build/dist/Server/Services/AIAgentTaskLogService.js.map +0 -1
- package/build/dist/Server/Services/AIAgentTaskService.js +0 -217
- package/build/dist/Server/Services/AIAgentTaskService.js.map +0 -1
- package/build/dist/Server/Services/AIAgentTaskTelemetryExceptionService.js +0 -36
- package/build/dist/Server/Services/AIAgentTaskTelemetryExceptionService.js.map +0 -1
- package/build/dist/Server/Services/ServiceCodeRepositoryService.js +0 -54
- package/build/dist/Server/Services/ServiceCodeRepositoryService.js.map +0 -1
- package/build/dist/Server/Utils/AI/Sentinel/AlertInvestigationRunner.js.map +0 -1
- package/build/dist/Server/Utils/AI/Sentinel/IncidentInvestigationRunner.js.map +0 -1
- package/build/dist/Server/Utils/AI/Sentinel/IncidentPostmortemRunner.js.map +0 -1
- package/build/dist/Server/Utils/AI/Sentinel/InvestigationQueue.js.map +0 -1
- package/build/dist/Server/Utils/AI/Sentinel/SentinelInvestigationEngine.js.map +0 -1
- package/build/dist/Server/Utils/AI/Sentinel/SentinelMemory.js.map +0 -1
- package/build/dist/Server/Utils/AI/Toolbox/SentinelActionTools.js.map +0 -1
- package/build/dist/Types/AI/AIAgentTaskMetadata.js +0 -6
- package/build/dist/Types/AI/AIAgentTaskMetadata.js.map +0 -1
- package/build/dist/Types/AI/AIAgentTaskType.js +0 -29
- package/build/dist/Types/AI/AIAgentTaskType.js.map +0 -1
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import UserMiddleware from "../Middleware/UserAuthorization";
|
|
2
|
+
import CommonAPI from "./CommonAPI";
|
|
3
|
+
import Express, {
|
|
4
|
+
ExpressRequest,
|
|
5
|
+
ExpressResponse,
|
|
6
|
+
ExpressRouter,
|
|
7
|
+
NextFunction,
|
|
8
|
+
} from "../Utils/Express";
|
|
9
|
+
import Response from "../Utils/Response";
|
|
10
|
+
import DatabaseCommonInteractionProps from "../../Types/BaseDatabase/DatabaseCommonInteractionProps";
|
|
11
|
+
import ObjectID from "../../Types/ObjectID";
|
|
12
|
+
import PositiveNumber from "../../Types/PositiveNumber";
|
|
13
|
+
import BadDataException from "../../Types/Exception/BadDataException";
|
|
14
|
+
import NotAuthorizedException from "../../Types/Exception/NotAuthorizedException";
|
|
15
|
+
import SortOrder from "../../Types/BaseDatabase/SortOrder";
|
|
16
|
+
import Query from "../../Types/BaseDatabase/Query";
|
|
17
|
+
import Select from "../Types/Database/Select";
|
|
18
|
+
import { JSONObject } from "../../Types/JSON";
|
|
19
|
+
import AIRunType from "../../Types/AI/AIRunType";
|
|
20
|
+
import { CodeFixTaskTypeHelper } from "../../Types/AI/CodeFixTaskType";
|
|
21
|
+
import AIRun from "../../Models/DatabaseModels/AIRun";
|
|
22
|
+
import AIRunEvent from "../../Models/DatabaseModels/AIRunEvent";
|
|
23
|
+
import Project from "../../Models/DatabaseModels/Project";
|
|
24
|
+
import BaseModel from "../../Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel";
|
|
25
|
+
import ProjectService from "../Services/ProjectService";
|
|
26
|
+
import AIRunService from "../Services/AIRunService";
|
|
27
|
+
import AIRunEventService from "../Services/AIRunEventService";
|
|
28
|
+
|
|
29
|
+
const DEFAULT_LIMIT: number = 25;
|
|
30
|
+
const MAX_LIMIT: number = 100;
|
|
31
|
+
const MAX_EVENTS: number = 500;
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* Dedicated read endpoints for the dashboard's AI fix-task pages.
|
|
35
|
+
*
|
|
36
|
+
* Code-fix runs are system-authored AIRuns (runType CodeFix, userId = null)
|
|
37
|
+
* and are therefore hidden by the per-user privacy pin on the generic
|
|
38
|
+
* AIRun / AIRunEvent CRUD. So access is gated explicitly here — the same
|
|
39
|
+
* pattern as AIInvestigationAPI: first confirm the caller can read the
|
|
40
|
+
* parent object (the project) under THEIR permissions, then read the runs
|
|
41
|
+
* and their events as root.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
const RUN_SELECT: Select<AIRun> = {
|
|
45
|
+
_id: true,
|
|
46
|
+
status: true,
|
|
47
|
+
createdAt: true,
|
|
48
|
+
startedAt: true,
|
|
49
|
+
completedAt: true,
|
|
50
|
+
errorMessage: true,
|
|
51
|
+
triggeredByTelemetryExceptionId: true,
|
|
52
|
+
totalTokens: true,
|
|
53
|
+
codeFixTaskType: true,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
* Serialize a run with codeFixTaskType normalized: a null column means
|
|
58
|
+
* FixException (rows created before task recipes existed), and clients
|
|
59
|
+
* should never have to know about the legacy null.
|
|
60
|
+
*/
|
|
61
|
+
function runToJson(run: AIRun): JSONObject {
|
|
62
|
+
const runJson: JSONObject = BaseModel.toJSONArray([run], AIRun)[0] || {};
|
|
63
|
+
|
|
64
|
+
runJson["codeFixTaskType"] = CodeFixTaskTypeHelper.fromDatabaseValue(
|
|
65
|
+
run.codeFixTaskType,
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
return runJson;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default class CodeFixRunAPI {
|
|
72
|
+
public router!: ExpressRouter;
|
|
73
|
+
|
|
74
|
+
public constructor() {
|
|
75
|
+
this.router = Express.getRouter();
|
|
76
|
+
this.initRoutes();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public getRouter(): ExpressRouter {
|
|
80
|
+
return this.router;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
private initRoutes(): void {
|
|
84
|
+
// List the project's code-fix runs, newest first.
|
|
85
|
+
this.router.post(
|
|
86
|
+
"/code-fix-run/list",
|
|
87
|
+
UserMiddleware.getUserMiddleware,
|
|
88
|
+
async (
|
|
89
|
+
req: ExpressRequest,
|
|
90
|
+
res: ExpressResponse,
|
|
91
|
+
next: NextFunction,
|
|
92
|
+
): Promise<void> => {
|
|
93
|
+
try {
|
|
94
|
+
const props: DatabaseCommonInteractionProps =
|
|
95
|
+
await this.getAccessCheckedProps(req);
|
|
96
|
+
|
|
97
|
+
const body: JSONObject = (req.body as JSONObject) || {};
|
|
98
|
+
|
|
99
|
+
let limit: number = DEFAULT_LIMIT;
|
|
100
|
+
|
|
101
|
+
if (typeof body["limit"] === "number") {
|
|
102
|
+
limit = body["limit"];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
limit = Math.min(Math.max(Math.floor(limit), 1), MAX_LIMIT);
|
|
106
|
+
|
|
107
|
+
let skip: number = 0;
|
|
108
|
+
|
|
109
|
+
if (typeof body["skip"] === "number") {
|
|
110
|
+
skip = Math.max(Math.floor(body["skip"]), 0);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const query: Query<AIRun> = {
|
|
114
|
+
projectId: props.tenantId!,
|
|
115
|
+
runType: AIRunType.CodeFix,
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// Root read after the tenant access check above.
|
|
119
|
+
const runs: Array<AIRun> = await AIRunService.findBy({
|
|
120
|
+
query: query,
|
|
121
|
+
select: RUN_SELECT,
|
|
122
|
+
sort: { createdAt: SortOrder.Descending },
|
|
123
|
+
limit: limit,
|
|
124
|
+
skip: skip,
|
|
125
|
+
props: { isRoot: true },
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
const count: PositiveNumber = await AIRunService.countBy({
|
|
129
|
+
query: query,
|
|
130
|
+
props: { isRoot: true },
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
Response.sendJsonObjectResponse(req, res, {
|
|
134
|
+
runs: runs.map((run: AIRun): JSONObject => {
|
|
135
|
+
return runToJson(run);
|
|
136
|
+
}),
|
|
137
|
+
count: count.toNumber(),
|
|
138
|
+
});
|
|
139
|
+
return;
|
|
140
|
+
} catch (err) {
|
|
141
|
+
next(err);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
// One run + its ordered glass-box event trail.
|
|
148
|
+
this.router.post(
|
|
149
|
+
"/code-fix-run/get/:runId",
|
|
150
|
+
UserMiddleware.getUserMiddleware,
|
|
151
|
+
async (
|
|
152
|
+
req: ExpressRequest,
|
|
153
|
+
res: ExpressResponse,
|
|
154
|
+
next: NextFunction,
|
|
155
|
+
): Promise<void> => {
|
|
156
|
+
try {
|
|
157
|
+
const props: DatabaseCommonInteractionProps =
|
|
158
|
+
await this.getAccessCheckedProps(req);
|
|
159
|
+
|
|
160
|
+
const runIdString: string | undefined = req.params["runId"];
|
|
161
|
+
|
|
162
|
+
if (!runIdString) {
|
|
163
|
+
throw new BadDataException("runId is required.");
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const runId: ObjectID = new ObjectID(runIdString);
|
|
167
|
+
|
|
168
|
+
/*
|
|
169
|
+
* Root read, but pinned to the caller's (access-checked) project —
|
|
170
|
+
* a run id from another project resolves to "not found".
|
|
171
|
+
*/
|
|
172
|
+
const run: AIRun | null = await AIRunService.findOneBy({
|
|
173
|
+
query: {
|
|
174
|
+
_id: runId.toString(),
|
|
175
|
+
projectId: props.tenantId!,
|
|
176
|
+
runType: AIRunType.CodeFix,
|
|
177
|
+
},
|
|
178
|
+
select: RUN_SELECT,
|
|
179
|
+
props: { isRoot: true },
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
if (!run) {
|
|
183
|
+
throw new BadDataException(
|
|
184
|
+
"Code fix run not found (or it does not belong to this project).",
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const events: Array<AIRunEvent> = await AIRunEventService.findBy({
|
|
189
|
+
query: { aiRunId: run.id! },
|
|
190
|
+
select: {
|
|
191
|
+
_id: true,
|
|
192
|
+
sequence: true,
|
|
193
|
+
eventType: true,
|
|
194
|
+
toolName: true,
|
|
195
|
+
resultSummary: true,
|
|
196
|
+
createdAt: true,
|
|
197
|
+
},
|
|
198
|
+
sort: { sequence: SortOrder.Ascending },
|
|
199
|
+
limit: MAX_EVENTS,
|
|
200
|
+
skip: 0,
|
|
201
|
+
props: { isRoot: true },
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
Response.sendJsonObjectResponse(req, res, {
|
|
205
|
+
run: runToJson(run),
|
|
206
|
+
events: BaseModel.toJSONArray(events, AIRunEvent),
|
|
207
|
+
});
|
|
208
|
+
return;
|
|
209
|
+
} catch (err) {
|
|
210
|
+
next(err);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/*
|
|
218
|
+
* Requires a logged-in session and a tenant, then verifies project access
|
|
219
|
+
* by reading the project under the USER's permissions (null when the user
|
|
220
|
+
* is not a member). Returns the props for further use.
|
|
221
|
+
*/
|
|
222
|
+
private async getAccessCheckedProps(
|
|
223
|
+
req: ExpressRequest,
|
|
224
|
+
): Promise<DatabaseCommonInteractionProps> {
|
|
225
|
+
const props: DatabaseCommonInteractionProps =
|
|
226
|
+
await CommonAPI.getDatabaseCommonInteractionProps(req);
|
|
227
|
+
|
|
228
|
+
if (!props.userId) {
|
|
229
|
+
throw new NotAuthorizedException("A logged-in user session is required.");
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (!props.tenantId) {
|
|
233
|
+
throw new BadDataException("Project ID is required (tenantid header).");
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Access check under the USER's permissions (null when not allowed).
|
|
237
|
+
const project: Project | null = await ProjectService.findOneById({
|
|
238
|
+
id: props.tenantId,
|
|
239
|
+
select: { _id: true },
|
|
240
|
+
props: props,
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
if (!project) {
|
|
244
|
+
throw new NotAuthorizedException(
|
|
245
|
+
"Project not found (or you do not have access to it).",
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
return props;
|
|
250
|
+
}
|
|
251
|
+
}
|
package/Server/API/GitHubAPI.ts
CHANGED
|
@@ -9,7 +9,8 @@ import BadDataException from "../../Types/Exception/BadDataException";
|
|
|
9
9
|
import NotAuthenticatedException from "../../Types/Exception/NotAuthenticatedException";
|
|
10
10
|
import NotAuthorizedException from "../../Types/Exception/NotAuthorizedException";
|
|
11
11
|
import logger, { getLogAttributesFromRequest } from "../Utils/Logger";
|
|
12
|
-
import { JSONObject } from "../../Types/JSON";
|
|
12
|
+
import { JSONArray, JSONObject } from "../../Types/JSON";
|
|
13
|
+
import LIMIT_MAX from "../../Types/Database/LimitMax";
|
|
13
14
|
import {
|
|
14
15
|
DashboardClientUrl,
|
|
15
16
|
GitHubAppName,
|
|
@@ -20,10 +21,13 @@ import GitHubUtil, {
|
|
|
20
21
|
GitHubRepository,
|
|
21
22
|
GitHubInstallationNotFoundError,
|
|
22
23
|
} from "../Utils/CodeRepository/GitHub/GitHub";
|
|
23
|
-
import CodeRepositoryService
|
|
24
|
+
import CodeRepositoryService, {
|
|
25
|
+
ImportReposFromInstallationResult,
|
|
26
|
+
} from "../Services/CodeRepositoryService";
|
|
24
27
|
import ProjectService from "../Services/ProjectService";
|
|
25
28
|
import AccessTokenService from "../Services/AccessTokenService";
|
|
26
29
|
import CodeRepository from "../../Models/DatabaseModels/CodeRepository";
|
|
30
|
+
import Project from "../../Models/DatabaseModels/Project";
|
|
27
31
|
import CodeRepositoryType from "../../Types/CodeRepository/CodeRepositoryType";
|
|
28
32
|
import URL from "../../Types/API/URL";
|
|
29
33
|
import UserMiddleware from "../Middleware/UserAuthorization";
|
|
@@ -32,6 +36,141 @@ import BaseModel from "../../Models/DatabaseModels/DatabaseBaseModel/DatabaseBas
|
|
|
32
36
|
import { UserTenantAccessPermission } from "../../Types/Permission";
|
|
33
37
|
|
|
34
38
|
export default class GitHubAPI {
|
|
39
|
+
/*
|
|
40
|
+
* Resolves the projects linked to a GitHub App installation. The
|
|
41
|
+
* installation ID is stored on the Project when the install callback runs
|
|
42
|
+
* (mirroring how the uninstall webhook resolves projects). As a fallback,
|
|
43
|
+
* also look at existing CodeRepository rows that carry the installation ID
|
|
44
|
+
* (e.g. if the ID was cleared from the project but repositories remain).
|
|
45
|
+
*/
|
|
46
|
+
private static async getProjectIdsForInstallation(
|
|
47
|
+
installationId: string,
|
|
48
|
+
): Promise<Array<ObjectID>> {
|
|
49
|
+
const projectIds: Array<string> = [];
|
|
50
|
+
|
|
51
|
+
const projects: Array<Project> = await ProjectService.findBy({
|
|
52
|
+
query: {
|
|
53
|
+
gitHubAppInstallationId: installationId,
|
|
54
|
+
},
|
|
55
|
+
select: {
|
|
56
|
+
_id: true,
|
|
57
|
+
},
|
|
58
|
+
limit: LIMIT_MAX,
|
|
59
|
+
skip: 0,
|
|
60
|
+
props: {
|
|
61
|
+
isRoot: true,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
for (const project of projects) {
|
|
66
|
+
if (project.id) {
|
|
67
|
+
projectIds.push(project.id.toString());
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const codeRepositories: Array<CodeRepository> =
|
|
72
|
+
await CodeRepositoryService.findBy({
|
|
73
|
+
query: {
|
|
74
|
+
gitHubAppInstallationId: installationId,
|
|
75
|
+
},
|
|
76
|
+
select: {
|
|
77
|
+
projectId: true,
|
|
78
|
+
},
|
|
79
|
+
limit: LIMIT_MAX,
|
|
80
|
+
skip: 0,
|
|
81
|
+
props: {
|
|
82
|
+
isRoot: true,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
for (const codeRepository of codeRepositories) {
|
|
87
|
+
if (
|
|
88
|
+
codeRepository.projectId &&
|
|
89
|
+
!projectIds.includes(codeRepository.projectId.toString())
|
|
90
|
+
) {
|
|
91
|
+
projectIds.push(codeRepository.projectId.toString());
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return projectIds.map((projectId: string) => {
|
|
96
|
+
return new ObjectID(projectId);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Imports all repositories in an installation into every project linked to it.
|
|
101
|
+
private static async importInstallationRepositoriesForLinkedProjects(
|
|
102
|
+
installationId: string,
|
|
103
|
+
): Promise<void> {
|
|
104
|
+
const projectIds: Array<ObjectID> =
|
|
105
|
+
await GitHubAPI.getProjectIdsForInstallation(installationId);
|
|
106
|
+
|
|
107
|
+
if (projectIds.length === 0) {
|
|
108
|
+
logger.info(
|
|
109
|
+
`GitHub webhook: no projects linked to installation ${installationId}. Skipping repository import.`,
|
|
110
|
+
);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
for (const projectId of projectIds) {
|
|
115
|
+
const importResult: ImportReposFromInstallationResult =
|
|
116
|
+
await CodeRepositoryService.importReposFromInstallation({
|
|
117
|
+
projectId: projectId,
|
|
118
|
+
installationId: installationId,
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
logger.info(
|
|
122
|
+
`GitHub webhook: imported ${importResult.imported} repositories (${importResult.skipped} skipped) into project ${projectId.toString()} for installation ${installationId}`,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/*
|
|
128
|
+
* Deletes CodeRepository rows for repositories that were removed from the
|
|
129
|
+
* installation. Once a repository is removed we can no longer mint tokens
|
|
130
|
+
* for it, so keeping the row around is a dead end. Uses the service delete
|
|
131
|
+
* so cascades / SET NULLs apply.
|
|
132
|
+
*/
|
|
133
|
+
private static async removeRepositoriesForInstallation(
|
|
134
|
+
installationId: string,
|
|
135
|
+
removedRepositories: JSONArray,
|
|
136
|
+
): Promise<void> {
|
|
137
|
+
for (const removedRepository of removedRepositories) {
|
|
138
|
+
const fullName: string | undefined = (removedRepository as JSONObject)?.[
|
|
139
|
+
"full_name"
|
|
140
|
+
]?.toString();
|
|
141
|
+
|
|
142
|
+
if (!fullName) {
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const slashIndex: number = fullName.indexOf("/");
|
|
147
|
+
|
|
148
|
+
if (slashIndex <= 0) {
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const organizationName: string = fullName.substring(0, slashIndex);
|
|
153
|
+
const repositoryName: string = fullName.substring(slashIndex + 1);
|
|
154
|
+
|
|
155
|
+
const deletedCount: number = await CodeRepositoryService.deleteBy({
|
|
156
|
+
query: {
|
|
157
|
+
gitHubAppInstallationId: installationId,
|
|
158
|
+
organizationName: organizationName,
|
|
159
|
+
repositoryName: repositoryName,
|
|
160
|
+
},
|
|
161
|
+
limit: LIMIT_MAX,
|
|
162
|
+
skip: 0,
|
|
163
|
+
props: {
|
|
164
|
+
isRoot: true,
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
logger.info(
|
|
169
|
+
`GitHub webhook: removed ${deletedCount} repository record(s) for ${fullName} (installation ${installationId})`,
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
35
174
|
public getRouter(): ExpressRouter {
|
|
36
175
|
const router: ExpressRouter = Express.getRouter();
|
|
37
176
|
|
|
@@ -135,6 +274,34 @@ export default class GitHubAPI {
|
|
|
135
274
|
},
|
|
136
275
|
});
|
|
137
276
|
|
|
277
|
+
/*
|
|
278
|
+
* Import all repositories in the installation automatically so the
|
|
279
|
+
* user does not have to pick them one at a time. Failures are
|
|
280
|
+
* logged but do not fail the callback — the import is retried via
|
|
281
|
+
* the installation_repositories webhook or on reinstall.
|
|
282
|
+
*/
|
|
283
|
+
try {
|
|
284
|
+
const importResult: ImportReposFromInstallationResult =
|
|
285
|
+
await CodeRepositoryService.importReposFromInstallation({
|
|
286
|
+
projectId: new ObjectID(projectId),
|
|
287
|
+
installationId: installationId,
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
logger.info(
|
|
291
|
+
`GitHub App installation ${installationId}: imported ${importResult.imported} repositories (${importResult.skipped} skipped) into project ${projectId}`,
|
|
292
|
+
getLogAttributesFromRequest(req as OneUptimeRequest),
|
|
293
|
+
);
|
|
294
|
+
} catch (importError) {
|
|
295
|
+
logger.error(
|
|
296
|
+
`GitHub Auth Callback: Failed to import repositories from installation ${installationId} into project ${projectId}:`,
|
|
297
|
+
getLogAttributesFromRequest(req as OneUptimeRequest),
|
|
298
|
+
);
|
|
299
|
+
logger.error(
|
|
300
|
+
importError,
|
|
301
|
+
getLogAttributesFromRequest(req as OneUptimeRequest),
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
|
|
138
305
|
// Redirect back to dashboard with installation ID
|
|
139
306
|
const redirectUrl: string = `${DashboardClientUrl.toString()}/${projectId}/code-repository?installation_id=${installationId}`;
|
|
140
307
|
|
|
@@ -518,7 +685,7 @@ export default class GitHubAPI {
|
|
|
518
685
|
getLogAttributesFromRequest(req as OneUptimeRequest),
|
|
519
686
|
);
|
|
520
687
|
|
|
521
|
-
// Handle installation events -
|
|
688
|
+
// Handle installation events - install and uninstall of the app
|
|
522
689
|
if (event === "installation") {
|
|
523
690
|
const action: string | undefined = (req.body as JSONObject)?.[
|
|
524
691
|
"action"
|
|
@@ -527,6 +694,28 @@ export default class GitHubAPI {
|
|
|
527
694
|
(req.body as JSONObject)?.["installation"] as JSONObject
|
|
528
695
|
)?.["id"]?.toString();
|
|
529
696
|
|
|
697
|
+
/*
|
|
698
|
+
* App installed - import all repositories in the installation
|
|
699
|
+
* into any project linked to it. This covers installs done
|
|
700
|
+
* directly from GitHub (marketplace) without our redirect flow.
|
|
701
|
+
*/
|
|
702
|
+
if (action === "created" && installationId) {
|
|
703
|
+
try {
|
|
704
|
+
await GitHubAPI.importInstallationRepositoriesForLinkedProjects(
|
|
705
|
+
installationId,
|
|
706
|
+
);
|
|
707
|
+
} catch (importError) {
|
|
708
|
+
logger.error(
|
|
709
|
+
`Failed to import repositories for GitHub App installation ${installationId}:`,
|
|
710
|
+
getLogAttributesFromRequest(req as OneUptimeRequest),
|
|
711
|
+
);
|
|
712
|
+
logger.error(
|
|
713
|
+
importError,
|
|
714
|
+
getLogAttributesFromRequest(req as OneUptimeRequest),
|
|
715
|
+
);
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
530
719
|
if (action === "deleted" && installationId) {
|
|
531
720
|
logger.info(
|
|
532
721
|
`GitHub App installation ${installationId} was deleted. Clearing from database...`,
|
|
@@ -581,6 +770,60 @@ export default class GitHubAPI {
|
|
|
581
770
|
}
|
|
582
771
|
}
|
|
583
772
|
|
|
773
|
+
/*
|
|
774
|
+
* Handle repositories being added to / removed from the
|
|
775
|
+
* installation so connected repositories stay in sync with GitHub
|
|
776
|
+
* without any manual picking.
|
|
777
|
+
*/
|
|
778
|
+
if (event === "installation_repositories") {
|
|
779
|
+
const body: JSONObject = req.body as JSONObject;
|
|
780
|
+
const installationId: string | undefined = (
|
|
781
|
+
body["installation"] as JSONObject
|
|
782
|
+
)?.["id"]?.toString();
|
|
783
|
+
|
|
784
|
+
if (installationId) {
|
|
785
|
+
const repositoriesAdded: JSONArray =
|
|
786
|
+
(body["repositories_added"] as JSONArray) || [];
|
|
787
|
+
const repositoriesRemoved: JSONArray =
|
|
788
|
+
(body["repositories_removed"] as JSONArray) || [];
|
|
789
|
+
|
|
790
|
+
if (repositoriesAdded.length > 0) {
|
|
791
|
+
try {
|
|
792
|
+
await GitHubAPI.importInstallationRepositoriesForLinkedProjects(
|
|
793
|
+
installationId,
|
|
794
|
+
);
|
|
795
|
+
} catch (importError) {
|
|
796
|
+
logger.error(
|
|
797
|
+
`Failed to import added repositories for GitHub App installation ${installationId}:`,
|
|
798
|
+
getLogAttributesFromRequest(req as OneUptimeRequest),
|
|
799
|
+
);
|
|
800
|
+
logger.error(
|
|
801
|
+
importError,
|
|
802
|
+
getLogAttributesFromRequest(req as OneUptimeRequest),
|
|
803
|
+
);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
if (repositoriesRemoved.length > 0) {
|
|
808
|
+
try {
|
|
809
|
+
await GitHubAPI.removeRepositoriesForInstallation(
|
|
810
|
+
installationId,
|
|
811
|
+
repositoriesRemoved,
|
|
812
|
+
);
|
|
813
|
+
} catch (removeError) {
|
|
814
|
+
logger.error(
|
|
815
|
+
`Failed to remove repositories for GitHub App installation ${installationId}:`,
|
|
816
|
+
getLogAttributesFromRequest(req as OneUptimeRequest),
|
|
817
|
+
);
|
|
818
|
+
logger.error(
|
|
819
|
+
removeError,
|
|
820
|
+
getLogAttributesFromRequest(req as OneUptimeRequest),
|
|
821
|
+
);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
|
|
584
827
|
/*
|
|
585
828
|
* Handle different webhook events here
|
|
586
829
|
* For now, just acknowledge receipt
|