@oneuptime/common 11.5.8 → 11.5.10
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/AnalyticsModels/Index.ts +13 -0
- package/Models/AnalyticsModels/MetricItemAggMV1mByContainer.ts +178 -0
- package/Models/AnalyticsModels/MetricItemAggMV1mByK8sCluster.ts +179 -0
- package/Models/AnalyticsModels/MetricItemAggMV1mByService.ts +179 -0
- package/Models/AnalyticsModels/NetworkFlow.ts +397 -0
- package/Models/DatabaseModels/AIAgentTaskPullRequest.ts +15 -6
- package/Models/DatabaseModels/AIRun.ts +37 -0
- package/Models/DatabaseModels/AIRunEvent.ts +34 -1
- package/Models/DatabaseModels/EnterpriseLicenseInstance.ts +18 -0
- package/Models/DatabaseModels/GlobalConfig.ts +36 -0
- package/Models/DatabaseModels/Index.ts +2 -0
- package/Models/DatabaseModels/MarketingConversion.ts +198 -0
- package/Models/DatabaseModels/MetricSavedView.ts +34 -0
- package/Models/DatabaseModels/MetricType.ts +74 -0
- package/Models/DatabaseModels/NetworkDevice.ts +332 -0
- package/Models/DatabaseModels/NetworkDeviceDiscoveryScan.ts +328 -0
- package/Models/DatabaseModels/NetworkInterface.ts +58 -0
- package/Models/DatabaseModels/Project.ts +62 -0
- package/Models/DatabaseModels/StatusPage.ts +42 -0
- package/Models/DatabaseModels/User.ts +37 -0
- package/Server/API/AIAgentTaskAPI.ts +38 -12
- package/Server/API/AIAgentTaskLogAPI.ts +49 -0
- package/Server/API/AIChatAPI.ts +16 -0
- package/Server/API/AIReadinessAPI.ts +84 -0
- package/Server/API/BaseAnalyticsAPI.ts +23 -0
- package/Server/API/CodeFixRunAPI.ts +182 -0
- package/Server/API/EnterpriseLicenseAPI.ts +14 -0
- package/Server/API/TelemetryExceptionAPI.ts +6 -1
- package/Server/EnvironmentConfig.ts +84 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784124919694-AddAITaskNumberAndRunTranscript.ts +95 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784135099754-AllowNullAiAgentOnPullRequest.ts +52 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784137457184-AddEnableMcpServerToStatusPage.ts +30 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784191414522-AddCounterSemanticsToMetricType.ts +38 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784191414600-AddViewTypeToMetricSavedView.ts +28 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784200000000-AddSnmpV3ColumnsToNetworkDeviceDiscoveryScan.ts +49 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784211212164-AddNetworkDeviceInventoryAndDiscoverySchedule.ts +108 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784218257664-AddEnterpriseLicenseNotificationColumns.ts +31 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784293516000-AddAttributionColumnsToUserAndProject.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1784298000000-AddMarketingConversionTable.ts +35 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +20 -0
- package/Server/Services/AIRunEventService.ts +15 -1
- package/Server/Services/AIRunService.ts +38 -1
- package/Server/Services/AnalyticsDatabaseService.ts +70 -1
- package/Server/Services/IncidentService.ts +13 -0
- package/Server/Services/Index.ts +10 -0
- package/Server/Services/LlmProviderService.ts +2 -0
- package/Server/Services/MarketingConversionService.ts +10 -0
- package/Server/Services/MetricItemAggMV1mByContainerService.ts +31 -0
- package/Server/Services/MetricItemAggMV1mByK8sClusterService.ts +31 -0
- package/Server/Services/MetricItemAggMV1mByServiceService.ts +31 -0
- package/Server/Services/MetricService.ts +970 -122
- package/Server/Services/MonitorService.ts +14 -0
- package/Server/Services/NetworkDeviceOwnerTeamService.ts +42 -0
- package/Server/Services/NetworkDeviceOwnerUserService.ts +106 -0
- package/Server/Services/NetworkFlowService.ts +11 -0
- package/Server/Services/OnCallDutyPolicyService.ts +11 -1
- package/Server/Services/ProjectService.ts +178 -0
- package/Server/Services/SpanService.ts +13 -9
- package/Server/Services/StatusPageService.ts +97 -0
- package/Server/Services/TeamMemberService.ts +11 -0
- package/Server/Services/TelemetryExceptionService.ts +19 -90
- package/Server/Services/UserService.ts +59 -0
- package/Server/Types/AnalyticsDatabase/AggregateBy.ts +37 -7
- package/Server/Types/Markdown.ts +9 -9
- package/Server/Types/MarkdownSlugify.ts +47 -0
- package/Server/Utils/AI/AIRunTranscript.ts +240 -0
- package/Server/Utils/AI/Chat/ChatAgentRunner.ts +9 -0
- package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +119 -5
- package/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.ts +75 -0
- package/Server/Utils/AI/CodeFix/CodeFixReadiness.ts +235 -0
- package/Server/Utils/AI/SRE/Insights/FixRouting.ts +2 -3
- package/Server/Utils/AI/Toolbox/CodeTools.ts +883 -0
- package/Server/Utils/AI/Toolbox/CodeWriteTools.ts +519 -0
- package/Server/Utils/AI/Toolbox/Index.ts +27 -0
- package/Server/Utils/AI/Toolbox/ScheduledMaintenanceTools.ts +279 -0
- package/Server/Utils/AnalyticsDatabase/ClickhouseCapacity.ts +19 -1
- package/Server/Utils/Attribution.ts +99 -0
- package/Server/Utils/CodeRepository/GitHub/GitHub.ts +600 -0
- package/Server/Utils/CodeRepository/StackTraceRepoResolver.ts +7 -2
- package/Server/Utils/LLM/LLMService.ts +397 -18
- package/Server/Utils/Marketing/ConversionUploadProvider.ts +103 -0
- package/Server/Utils/Marketing/ConversionUploadProviders.ts +22 -0
- package/Server/Utils/Marketing/Providers/GoogleAds.ts +270 -0
- package/Server/Utils/Marketing/Providers/LinkedIn.ts +147 -0
- package/Server/Utils/Marketing/Providers/Meta.ts +148 -0
- package/Server/Utils/Marketing/Providers/MicrosoftAds.ts +196 -0
- package/Server/Utils/Marketing/Providers/Reddit.ts +178 -0
- package/Server/Utils/Monitor/MonitorAlert.ts +71 -7
- package/Server/Utils/Monitor/MonitorCriteriaEvaluator.ts +31 -19
- package/Server/Utils/Monitor/MonitorIncident.ts +71 -7
- package/Server/Utils/Monitor/MonitorMetricUtil.ts +57 -0
- package/Server/Utils/Monitor/MonitorTemplateUtil.ts +94 -0
- package/Server/Utils/Monitor/NetworkDeviceHydrationUtil.ts +19 -11
- package/Server/Utils/Monitor/NetworkInventoryUtil.ts +125 -14
- package/Server/Utils/ProductAnalytics.ts +133 -0
- package/Server/Utils/Telemetry/Telemetry.ts +39 -0
- package/Server/Utils/Telemetry/TelemetryEntity.ts +21 -0
- package/Tests/Models/StatusPageEnableMcpServer.test.ts +125 -0
- package/Tests/Server/API/BaseAnalyticsAPI.test.ts +72 -0
- package/Tests/Server/Infrastructure/SemaphorePermit.test.ts +9 -1
- package/Tests/Server/Services/AnalyticsDatabaseService.test.ts +21 -2
- package/Tests/Server/Services/MetricEntityMVKeyParity.test.ts +173 -0
- package/Tests/Server/Services/MetricServiceAggregate.test.ts +1391 -0
- package/Tests/Server/Services/NetworkDeviceOwnerServices.test.ts +260 -0
- package/Tests/Server/Services/StatusPageServiceMcp.test.ts +223 -0
- package/Tests/Server/Services/TelemetryExceptionAIFixReadiness.test.ts +26 -3
- package/Tests/Server/Services/TelemetryExceptionCodeFixRun.test.ts +12 -0
- package/Tests/Server/Types/Markdown.test.ts +106 -0
- package/Tests/Server/Utils/AI/AIRunTranscript.test.ts +182 -0
- package/Tests/Server/Utils/AI/CodeFixReadiness.test.ts +411 -0
- package/Tests/Server/Utils/AI/CodeTools.test.ts +596 -0
- package/Tests/Server/Utils/AI/CodeWriteTools.test.ts +475 -0
- package/Tests/Server/Utils/AI/LLMServiceModelCompatibility.test.ts +548 -0
- package/Tests/Server/Utils/AI/ObservabilityChatPrompt.test.ts +142 -0
- package/Tests/Server/Utils/AI/ScheduledMaintenanceTools.test.ts +176 -0
- package/Tests/Server/Utils/AnalyticsDatabase/ClickhouseCapacity.test.ts +63 -0
- package/Tests/Server/Utils/GitHubGetFileContent.test.ts +197 -0
- package/Tests/Server/Utils/Monitor/MonitorTemplateUtilNetworkDevice.test.ts +389 -0
- package/Tests/Server/Utils/Monitor/NetworkDeviceHydrationUtil.test.ts +502 -0
- package/Tests/Server/Utils/Monitor/NetworkInventoryUtil.test.ts +764 -0
- package/Tests/Types/AI/AIAgentTaskStatus.test.ts +7 -6
- package/Tests/Types/AI/AIChatPageContext.test.ts +0 -0
- package/Tests/Types/AI/AIRunStatus.test.ts +42 -0
- package/Tests/Types/BaseDatabase/AggregationIntervalUtil.test.ts +111 -2
- package/Tests/Types/Database/EndsWith.test.ts +64 -0
- package/Tests/Types/Database/GreaterThan.test.ts +62 -0
- package/Tests/Types/Database/GreaterThanOrEqual.test.ts +65 -0
- package/Tests/Types/Database/GreaterThanOrNull.test.ts +63 -0
- package/Tests/Types/Database/Includes.test.ts +65 -0
- package/Tests/Types/Database/IncludesAll.test.ts +65 -0
- package/Tests/Types/Database/IncludesNone.test.ts +65 -0
- package/Tests/Types/Database/IsNull.test.ts +44 -0
- package/Tests/Types/Database/LessThan.test.ts +62 -0
- package/Tests/Types/Database/LessThanOrEqual.test.ts +62 -0
- package/Tests/Types/Database/LessThanOrNull.test.ts +62 -0
- package/Tests/Types/Database/MultiSearch.test.ts +81 -0
- package/Tests/Types/Database/NotContains.test.ts +64 -0
- package/Tests/Types/Database/NotNull.test.ts +44 -0
- package/Tests/Types/Database/StartsWith.test.ts +64 -0
- package/Tests/Types/Log/LogSeverity.test.ts +78 -0
- package/Tests/Types/Monitor/MonitorStepSqlMonitor.test.ts +83 -1
- package/Tests/Types/Monitor/SnmpV3EnumParsing.test.ts +247 -0
- package/Tests/Types/Monitor/SnmpVendorTemplate.test.ts +263 -0
- package/Tests/UI/Components/BasicFormDropdownNormalization.test.tsx +167 -0
- package/Tests/UI/Components/Charts/AxisTickColor.test.tsx +66 -0
- package/Tests/UI/Components/XAxis.test.ts +5 -3
- package/Tests/UI/Utils/AIChatExport/ChatWidgetData.test.ts +319 -0
- package/Tests/UI/Utils/AIChatExport/ChatWidgetMarkdown.test.ts +188 -0
- package/Tests/Utils/EnterpriseLicenseUsage.test.ts +76 -0
- package/Tests/Utils/Metrics/MetricExplorerUrl.test.ts +622 -0
- package/Tests/Utils/Metrics/MetricFormulaEvaluator.test.ts +474 -0
- package/Tests/Utils/Telemetry/HeartbeatAvailability.test.ts +52 -4
- package/Types/AI/AIAgentTaskStatus.ts +13 -0
- package/Types/AI/AIChatPageContext.ts +137 -0
- package/Types/AI/AIChatTypes.ts +44 -0
- package/Types/AI/AIFixReadiness.ts +46 -0
- package/Types/AI/AIRunStatus.ts +11 -0
- package/Types/AnalyticsDatabase/AnalyticsTableName.ts +11 -0
- package/Types/BaseDatabase/AggregateBy.ts +31 -2
- package/Types/BaseDatabase/AggregatedResult.ts +22 -0
- package/Types/BaseDatabase/AggregationInterval.ts +11 -0
- package/Types/BaseDatabase/AggregationIntervalUtil.ts +30 -5
- package/Types/Dashboard/DashboardComponents/DashboardTraceChartComponent.ts +16 -0
- package/Types/Email/EmailTemplateType.ts +3 -0
- package/Types/Log/LogSeverity.ts +61 -0
- package/Types/Marketing/MarketingConversion.ts +11 -0
- package/Types/Metrics/MetricQueryConfigData.ts +21 -0
- package/Types/Metrics/MetricQueryData.ts +8 -0
- package/Types/Metrics/MetricViewData.ts +8 -0
- package/Types/Monitor/MonitorMetricType.ts +8 -0
- package/Types/Monitor/MonitorStep.ts +9 -0
- package/Types/Monitor/MonitorStepSqlMonitor.ts +12 -0
- package/Types/Monitor/MonitorType.ts +2 -1
- package/Types/Monitor/SSLMonitor/SslMonitorResponse.ts +17 -12
- package/Types/Monitor/SnmpMonitor/CdpNeighbor.ts +13 -0
- package/Types/Monitor/SnmpMonitor/NetworkTopology.ts +37 -3
- package/Types/Monitor/SnmpMonitor/SnmpAuthProtocol.ts +46 -0
- package/Types/Monitor/SnmpMonitor/SnmpEntityInfo.ts +15 -0
- package/Types/Monitor/SnmpMonitor/SnmpInterface.ts +8 -0
- package/Types/Monitor/SnmpMonitor/SnmpMonitorResponse.ts +17 -8
- package/Types/Monitor/SnmpMonitor/SnmpPrivProtocol.ts +53 -0
- package/Types/Monitor/SnmpMonitor/SnmpSecurityLevel.ts +43 -0
- package/Types/Monitor/SnmpMonitor/SnmpSystemInfo.ts +16 -0
- package/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.ts +119 -3
- package/Types/Monitor/SnmpMonitor/SnmpVersion.ts +40 -0
- package/Types/NetFlow/NetworkFlowRecord.ts +25 -0
- package/Types/Syslog/SyslogMessage.ts +18 -0
- package/Types/Telemetry/TelemetrySavedViewState.ts +9 -0
- package/Types/Telemetry/TelemetrySavedViewType.ts +12 -0
- package/UI/Components/Charts/Area/AreaChart.tsx +51 -0
- package/UI/Components/Charts/Bar/BarChart.tsx +51 -1
- package/UI/Components/Charts/ChartGroup/ChartGroup.tsx +97 -26
- package/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.tsx +336 -3
- package/UI/Components/Charts/ChartLibrary/BarChart/BarChart.tsx +118 -1
- package/UI/Components/Charts/ChartLibrary/LineChart/LineChart.tsx +336 -3
- package/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.ts +7 -0
- package/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.ts +15 -0
- package/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.ts +13 -0
- package/UI/Components/Charts/Line/LineChart.tsx +51 -0
- package/UI/Components/Charts/Types/ReferenceRegionProps.ts +12 -0
- package/UI/Components/Charts/Types/TimeReferenceLineProps.ts +12 -0
- package/UI/Components/Charts/Types/XAxis/XAxisPrecision.ts +1 -0
- package/UI/Components/Charts/Utils/DataPoint.ts +0 -0
- package/UI/Components/Charts/Utils/TimeAnnotation.ts +169 -0
- package/UI/Components/Charts/Utils/XAxis.ts +28 -4
- package/UI/Components/Forms/BasicForm.tsx +26 -8
- package/UI/Components/Icon/Icon.tsx +33 -13
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +9 -0
- package/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.ts +67 -0
- package/UI/Components/Page/ModelPage.tsx +6 -1
- package/UI/Components/TelemetryViewer/components/SavedViewsDropdown.tsx +33 -4
- package/UI/Styles/Theme.css +1324 -0
- package/UI/Utils/AIChatExport/ChatWidgetData.ts +316 -0
- package/UI/Utils/AIChatExport/ChatWidgetMarkdown.ts +349 -0
- package/UI/Utils/AIChatExport/ConversationMarkdown.ts +177 -0
- package/UI/Utils/AIChatExport/MarkdownBlocks.ts +327 -0
- package/UI/Utils/AIChatExport/MarkdownSafety.ts +215 -0
- package/UI/Utils/DownloadFile.ts +54 -0
- package/UI/Utils/User.ts +41 -2
- package/Utils/Analytics.ts +8 -6
- package/Utils/EnterpriseLicense/EnterpriseLicenseUsage.ts +74 -0
- package/Utils/Metrics/MetricExplorerUrl.ts +771 -0
- package/Utils/Metrics/MetricFormulaEvaluator.ts +410 -46
- package/Utils/Monitor/NetworkTopologyUtil.ts +261 -49
- package/Utils/ValueFormatter.ts +22 -1
- package/build/dist/Models/AnalyticsModels/Index.js +13 -0
- package/build/dist/Models/AnalyticsModels/Index.js.map +1 -1
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByContainer.js +159 -0
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByContainer.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByK8sCluster.js +158 -0
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByK8sCluster.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByService.js +160 -0
- package/build/dist/Models/AnalyticsModels/MetricItemAggMV1mByService.js.map +1 -0
- package/build/dist/Models/AnalyticsModels/NetworkFlow.js +351 -0
- package/build/dist/Models/AnalyticsModels/NetworkFlow.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AIAgentTaskPullRequest.js +15 -7
- package/build/dist/Models/DatabaseModels/AIAgentTaskPullRequest.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AIRun.js +38 -0
- package/build/dist/Models/DatabaseModels/AIRun.js.map +1 -1
- package/build/dist/Models/DatabaseModels/AIRunEvent.js +31 -0
- package/build/dist/Models/DatabaseModels/AIRunEvent.js.map +1 -1
- package/build/dist/Models/DatabaseModels/EnterpriseLicenseInstance.js +19 -0
- package/build/dist/Models/DatabaseModels/EnterpriseLicenseInstance.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalConfig.js +38 -0
- package/build/dist/Models/DatabaseModels/GlobalConfig.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MarketingConversion.js +219 -0
- package/build/dist/Models/DatabaseModels/MarketingConversion.js.map +1 -0
- package/build/dist/Models/DatabaseModels/MetricSavedView.js +35 -0
- package/build/dist/Models/DatabaseModels/MetricSavedView.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MetricType.js +76 -0
- package/build/dist/Models/DatabaseModels/MetricType.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDevice.js +341 -0
- package/build/dist/Models/DatabaseModels/NetworkDevice.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js +341 -0
- package/build/dist/Models/DatabaseModels/NetworkDeviceDiscoveryScan.js.map +1 -1
- package/build/dist/Models/DatabaseModels/NetworkInterface.js +60 -0
- package/build/dist/Models/DatabaseModels/NetworkInterface.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Project.js +65 -0
- package/build/dist/Models/DatabaseModels/Project.js.map +1 -1
- package/build/dist/Models/DatabaseModels/StatusPage.js +43 -0
- package/build/dist/Models/DatabaseModels/StatusPage.js.map +1 -1
- package/build/dist/Models/DatabaseModels/User.js +38 -0
- package/build/dist/Models/DatabaseModels/User.js.map +1 -1
- package/build/dist/Server/API/AIAgentTaskAPI.js +37 -11
- package/build/dist/Server/API/AIAgentTaskAPI.js.map +1 -1
- package/build/dist/Server/API/AIAgentTaskLogAPI.js +32 -7
- package/build/dist/Server/API/AIAgentTaskLogAPI.js.map +1 -1
- package/build/dist/Server/API/AIChatAPI.js +9 -0
- package/build/dist/Server/API/AIChatAPI.js.map +1 -1
- package/build/dist/Server/API/AIReadinessAPI.js +57 -0
- package/build/dist/Server/API/AIReadinessAPI.js.map +1 -0
- package/build/dist/Server/API/BaseAnalyticsAPI.js +19 -0
- package/build/dist/Server/API/BaseAnalyticsAPI.js.map +1 -1
- package/build/dist/Server/API/CodeFixRunAPI.js +142 -0
- package/build/dist/Server/API/CodeFixRunAPI.js.map +1 -1
- package/build/dist/Server/API/EnterpriseLicenseAPI.js +8 -0
- package/build/dist/Server/API/EnterpriseLicenseAPI.js.map +1 -1
- package/build/dist/Server/API/TelemetryExceptionAPI.js +4 -0
- package/build/dist/Server/API/TelemetryExceptionAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +51 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784124919694-AddAITaskNumberAndRunTranscript.js +80 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784124919694-AddAITaskNumberAndRunTranscript.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784135099754-AllowNullAiAgentOnPullRequest.js +37 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784135099754-AllowNullAiAgentOnPullRequest.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784137457184-AddEnableMcpServerToStatusPage.js +23 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784137457184-AddEnableMcpServerToStatusPage.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414522-AddCounterSemanticsToMetricType.js +27 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414522-AddCounterSemanticsToMetricType.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414600-AddViewTypeToMetricSavedView.js +21 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784191414600-AddViewTypeToMetricSavedView.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784200000000-AddSnmpV3ColumnsToNetworkDeviceDiscoveryScan.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784200000000-AddSnmpV3ColumnsToNetworkDeviceDiscoveryScan.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784211212164-AddNetworkDeviceInventoryAndDiscoverySchedule.js +47 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784211212164-AddNetworkDeviceInventoryAndDiscoverySchedule.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784218257664-AddEnterpriseLicenseNotificationColumns.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784218257664-AddEnterpriseLicenseNotificationColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784293516000-AddAttributionColumnsToUserAndProject.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784293516000-AddAttributionColumnsToUserAndProject.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784298000000-AddMarketingConversionTable.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1784298000000-AddMarketingConversionTable.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AIRunEventService.js +8 -0
- package/build/dist/Server/Services/AIRunEventService.js.map +1 -1
- package/build/dist/Server/Services/AIRunService.js +29 -0
- package/build/dist/Server/Services/AIRunService.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +58 -4
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +12 -0
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +10 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/LlmProviderService.js +2 -0
- package/build/dist/Server/Services/LlmProviderService.js.map +1 -1
- package/build/dist/Server/Services/MarketingConversionService.js +9 -0
- package/build/dist/Server/Services/MarketingConversionService.js.map +1 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByContainerService.js +29 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByContainerService.js.map +1 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByK8sClusterService.js +29 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByK8sClusterService.js.map +1 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByServiceService.js +29 -0
- package/build/dist/Server/Services/MetricItemAggMV1mByServiceService.js.map +1 -0
- package/build/dist/Server/Services/MetricService.js +761 -125
- package/build/dist/Server/Services/MetricService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +18 -5
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js +44 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js +88 -0
- package/build/dist/Server/Services/NetworkDeviceOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/NetworkFlowService.js +9 -0
- package/build/dist/Server/Services/NetworkFlowService.js.map +1 -0
- package/build/dist/Server/Services/OnCallDutyPolicyService.js +15 -6
- package/build/dist/Server/Services/OnCallDutyPolicyService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +146 -6
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/SpanService.js +8 -6
- package/build/dist/Server/Services/SpanService.js.map +1 -1
- package/build/dist/Server/Services/StatusPageService.js +91 -0
- package/build/dist/Server/Services/StatusPageService.js.map +1 -1
- package/build/dist/Server/Services/TeamMemberService.js +11 -0
- package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryExceptionService.js +14 -61
- package/build/dist/Server/Services/TelemetryExceptionService.js.map +1 -1
- package/build/dist/Server/Services/UserService.js +52 -0
- package/build/dist/Server/Services/UserService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js +33 -7
- package/build/dist/Server/Types/AnalyticsDatabase/AggregateBy.js.map +1 -1
- package/build/dist/Server/Types/Markdown.js +8 -8
- package/build/dist/Server/Types/Markdown.js.map +1 -1
- package/build/dist/Server/Types/MarkdownSlugify.js +47 -0
- package/build/dist/Server/Types/MarkdownSlugify.js.map +1 -0
- package/build/dist/Server/Utils/AI/AIRunTranscript.js +180 -0
- package/build/dist/Server/Utils/AI/AIRunTranscript.js.map +1 -0
- package/build/dist/Server/Utils/AI/Chat/ChatAgentRunner.js +1 -0
- package/build/dist/Server/Utils/AI/Chat/ChatAgentRunner.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +103 -5
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js.map +1 -1
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js +55 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixAgentCompletion.js.map +1 -1
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixReadiness.js +211 -0
- package/build/dist/Server/Utils/AI/CodeFix/CodeFixReadiness.js.map +1 -0
- package/build/dist/Server/Utils/AI/SRE/Insights/FixRouting.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/CodeTools.js +654 -0
- package/build/dist/Server/Utils/AI/Toolbox/CodeTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/CodeWriteTools.js +389 -0
- package/build/dist/Server/Utils/AI/Toolbox/CodeWriteTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +19 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/ScheduledMaintenanceTools.js +239 -0
- package/build/dist/Server/Utils/AI/Toolbox/ScheduledMaintenanceTools.js.map +1 -0
- package/build/dist/Server/Utils/AnalyticsDatabase/ClickhouseCapacity.js +19 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/ClickhouseCapacity.js.map +1 -1
- package/build/dist/Server/Utils/Attribution.js +74 -0
- package/build/dist/Server/Utils/Attribution.js.map +1 -0
- package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js +439 -0
- package/build/dist/Server/Utils/CodeRepository/GitHub/GitHub.js.map +1 -1
- package/build/dist/Server/Utils/CodeRepository/StackTraceRepoResolver.js +1 -1
- package/build/dist/Server/Utils/CodeRepository/StackTraceRepoResolver.js.map +1 -1
- package/build/dist/Server/Utils/LLM/LLMService.js +275 -19
- package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js +40 -0
- package/build/dist/Server/Utils/Marketing/ConversionUploadProvider.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/ConversionUploadProviders.js +20 -0
- package/build/dist/Server/Utils/Marketing/ConversionUploadProviders.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js +177 -0
- package/build/dist/Server/Utils/Marketing/Providers/GoogleAds.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js +113 -0
- package/build/dist/Server/Utils/Marketing/Providers/LinkedIn.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js +109 -0
- package/build/dist/Server/Utils/Marketing/Providers/Meta.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js +130 -0
- package/build/dist/Server/Utils/Marketing/Providers/MicrosoftAds.js.map +1 -0
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js +126 -0
- package/build/dist/Server/Utils/Marketing/Providers/Reddit.js.map +1 -0
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js +53 -9
- package/build/dist/Server/Utils/Monitor/MonitorAlert.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js +21 -10
- package/build/dist/Server/Utils/Monitor/MonitorCriteriaEvaluator.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js +54 -11
- package/build/dist/Server/Utils/Monitor/MonitorIncident.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js +43 -3
- package/build/dist/Server/Utils/Monitor/MonitorMetricUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js +68 -0
- package/build/dist/Server/Utils/Monitor/MonitorTemplateUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js +17 -11
- package/build/dist/Server/Utils/Monitor/NetworkDeviceHydrationUtil.js.map +1 -1
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js +100 -15
- package/build/dist/Server/Utils/Monitor/NetworkInventoryUtil.js.map +1 -1
- package/build/dist/Server/Utils/ProductAnalytics.js +111 -0
- package/build/dist/Server/Utils/ProductAnalytics.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/Telemetry.js +32 -5
- package/build/dist/Server/Utils/Telemetry/Telemetry.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js +17 -0
- package/build/dist/Server/Utils/Telemetry/TelemetryEntity.js.map +1 -1
- package/build/dist/Types/AI/AIAgentTaskStatus.js +12 -0
- package/build/dist/Types/AI/AIAgentTaskStatus.js.map +1 -1
- package/build/dist/Types/AI/AIChatPageContext.js +101 -0
- package/build/dist/Types/AI/AIChatPageContext.js.map +1 -0
- package/build/dist/Types/AI/AIChatTypes.js +2 -0
- package/build/dist/Types/AI/AIChatTypes.js.map +1 -1
- package/build/dist/Types/AI/AIFixReadiness.js +9 -0
- package/build/dist/Types/AI/AIFixReadiness.js.map +1 -0
- package/build/dist/Types/AI/AIRunStatus.js +11 -0
- package/build/dist/Types/AI/AIRunStatus.js.map +1 -1
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js +11 -0
- package/build/dist/Types/AnalyticsDatabase/AnalyticsTableName.js.map +1 -1
- package/build/dist/Types/BaseDatabase/AggregationInterval.js +11 -0
- package/build/dist/Types/BaseDatabase/AggregationInterval.js.map +1 -1
- package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js +33 -5
- package/build/dist/Types/BaseDatabase/AggregationIntervalUtil.js.map +1 -1
- package/build/dist/Types/Email/EmailTemplateType.js +2 -0
- package/build/dist/Types/Email/EmailTemplateType.js.map +1 -1
- package/build/dist/Types/Log/LogSeverity.js +56 -0
- package/build/dist/Types/Log/LogSeverity.js.map +1 -1
- package/build/dist/Types/Marketing/MarketingConversion.js +13 -0
- package/build/dist/Types/Marketing/MarketingConversion.js.map +1 -0
- package/build/dist/Types/Monitor/MonitorMetricType.js +7 -0
- package/build/dist/Types/Monitor/MonitorMetricType.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStep.js +6 -0
- package/build/dist/Types/Monitor/MonitorStep.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorStepSqlMonitor.js +3 -0
- package/build/dist/Types/Monitor/MonitorStepSqlMonitor.js.map +1 -1
- package/build/dist/Types/Monitor/MonitorType.js +2 -1
- package/build/dist/Types/Monitor/MonitorType.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/CdpNeighbor.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/CdpNeighbor.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpAuthProtocol.js +41 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpAuthProtocol.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpEntityInfo.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpEntityInfo.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpPrivProtocol.js +48 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpPrivProtocol.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpSecurityLevel.js +38 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpSecurityLevel.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpSystemInfo.js +2 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpSystemInfo.js.map +1 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js +96 -3
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpVendorTemplate.js.map +1 -1
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpVersion.js +38 -0
- package/build/dist/Types/Monitor/SnmpMonitor/SnmpVersion.js.map +1 -1
- package/build/dist/Types/NetFlow/NetworkFlowRecord.js +2 -0
- package/build/dist/Types/NetFlow/NetworkFlowRecord.js.map +1 -0
- package/build/dist/Types/Syslog/SyslogMessage.js +2 -0
- package/build/dist/Types/Syslog/SyslogMessage.js.map +1 -0
- package/build/dist/Types/Telemetry/TelemetrySavedViewState.js +0 -7
- package/build/dist/Types/Telemetry/TelemetrySavedViewState.js.map +1 -1
- package/build/dist/Types/Telemetry/TelemetrySavedViewType.js +13 -0
- package/build/dist/Types/Telemetry/TelemetrySavedViewType.js.map +1 -0
- package/build/dist/UI/Components/Charts/Area/AreaChart.js +25 -1
- package/build/dist/UI/Components/Charts/Area/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Bar/BarChart.js +26 -2
- package/build/dist/UI/Components/Charts/Bar/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js +36 -12
- package/build/dist/UI/Components/Charts/ChartGroup/ChartGroup.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js +217 -8
- package/build/dist/UI/Components/Charts/ChartLibrary/AreaChart/AreaChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js +55 -4
- package/build/dist/UI/Components/Charts/ChartLibrary/BarChart/BarChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js +217 -8
- package/build/dist/UI/Components/Charts/ChartLibrary/LineChart/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.js +6 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/ChartDataPoint.js.map +1 -1
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.js +2 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedReferenceRegion.js.map +1 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.js +2 -0
- package/build/dist/UI/Components/Charts/ChartLibrary/Types/FormattedTimeReferenceLine.js.map +1 -0
- package/build/dist/UI/Components/Charts/Line/LineChart.js +25 -1
- package/build/dist/UI/Components/Charts/Line/LineChart.js.map +1 -1
- package/build/dist/UI/Components/Charts/Types/ReferenceRegionProps.js +2 -0
- package/build/dist/UI/Components/Charts/Types/ReferenceRegionProps.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/TimeReferenceLineProps.js +2 -0
- package/build/dist/UI/Components/Charts/Types/TimeReferenceLineProps.js.map +1 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxisPrecision.js +1 -0
- package/build/dist/UI/Components/Charts/Types/XAxis/XAxisPrecision.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js +0 -0
- package/build/dist/UI/Components/Charts/Utils/DataPoint.js.map +1 -1
- package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js +121 -0
- package/build/dist/UI/Components/Charts/Utils/TimeAnnotation.js.map +1 -0
- package/build/dist/UI/Components/Charts/Utils/XAxis.js +27 -4
- package/build/dist/UI/Components/Charts/Utils/XAxis.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js +24 -6
- package/build/dist/UI/Components/Forms/BasicForm.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +15 -8
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js +58 -0
- package/build/dist/UI/Components/MonitorTemplateVariables/TemplateVariablesCatalog.js.map +1 -1
- package/build/dist/UI/Components/Page/ModelPage.js +7 -1
- package/build/dist/UI/Components/Page/ModelPage.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js +10 -4
- package/build/dist/UI/Components/TelemetryViewer/components/SavedViewsDropdown.js.map +1 -1
- package/build/dist/UI/Utils/AIChatExport/ChatWidgetData.js +217 -0
- package/build/dist/UI/Utils/AIChatExport/ChatWidgetData.js.map +1 -0
- package/build/dist/UI/Utils/AIChatExport/ChatWidgetMarkdown.js +234 -0
- package/build/dist/UI/Utils/AIChatExport/ChatWidgetMarkdown.js.map +1 -0
- package/build/dist/UI/Utils/AIChatExport/ConversationMarkdown.js +111 -0
- package/build/dist/UI/Utils/AIChatExport/ConversationMarkdown.js.map +1 -0
- package/build/dist/UI/Utils/AIChatExport/MarkdownBlocks.js +233 -0
- package/build/dist/UI/Utils/AIChatExport/MarkdownBlocks.js.map +1 -0
- package/build/dist/UI/Utils/AIChatExport/MarkdownSafety.js +134 -0
- package/build/dist/UI/Utils/AIChatExport/MarkdownSafety.js.map +1 -0
- package/build/dist/UI/Utils/DownloadFile.js +41 -0
- package/build/dist/UI/Utils/DownloadFile.js.map +1 -0
- package/build/dist/UI/Utils/User.js +35 -2
- package/build/dist/UI/Utils/User.js.map +1 -1
- package/build/dist/Utils/Analytics.js +8 -5
- package/build/dist/Utils/Analytics.js.map +1 -1
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseUsage.js +57 -0
- package/build/dist/Utils/EnterpriseLicense/EnterpriseLicenseUsage.js.map +1 -1
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js +418 -0
- package/build/dist/Utils/Metrics/MetricExplorerUrl.js.map +1 -0
- package/build/dist/Utils/Metrics/MetricFormulaEvaluator.js +296 -37
- package/build/dist/Utils/Metrics/MetricFormulaEvaluator.js.map +1 -1
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js +176 -40
- package/build/dist/Utils/Monitor/NetworkTopologyUtil.js.map +1 -1
- package/build/dist/Utils/ValueFormatter.js +20 -1
- package/build/dist/Utils/ValueFormatter.js.map +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Index MUST be imported before CodeWriteTools. The toolbox sits in an import
|
|
3
|
+
* cycle (tool -> service -> ... -> ObservabilityAssistant -> AIToolbox), so
|
|
4
|
+
* loading a tool module first re-enters Index before its tools array is
|
|
5
|
+
* assigned and leaves undefined holes in it. Production always enters through
|
|
6
|
+
* Index (ChatAgentRunner -> AIToolbox), which is the order reproduced here;
|
|
7
|
+
* the integrity test below fails loudly if that ever stops holding.
|
|
8
|
+
*/
|
|
9
|
+
import AIToolbox from "../../../../Server/Utils/AI/Toolbox/Index";
|
|
10
|
+
import {
|
|
11
|
+
CommitCodeToBranchTool,
|
|
12
|
+
OpenCodePullRequestTool,
|
|
13
|
+
} from "../../../../Server/Utils/AI/Toolbox/CodeWriteTools";
|
|
14
|
+
import {
|
|
15
|
+
ToolContext,
|
|
16
|
+
ToolExecutionResult,
|
|
17
|
+
} from "../../../../Server/Utils/AI/Toolbox/ToolTypes";
|
|
18
|
+
import CodeRepositoryService from "../../../../Server/Services/CodeRepositoryService";
|
|
19
|
+
import AIAgentTaskPullRequestService from "../../../../Server/Services/AIAgentTaskPullRequestService";
|
|
20
|
+
import GitHubUtil from "../../../../Server/Utils/CodeRepository/GitHub/GitHub";
|
|
21
|
+
import CodeRepositoryModel from "../../../../Models/DatabaseModels/CodeRepository";
|
|
22
|
+
import AIAgentTaskPullRequest from "../../../../Models/DatabaseModels/AIAgentTaskPullRequest";
|
|
23
|
+
import CodeRepositoryType from "../../../../Types/CodeRepository/CodeRepositoryType";
|
|
24
|
+
import PullRequestState from "../../../../Types/CodeRepository/PullRequestState";
|
|
25
|
+
import ObjectID from "../../../../Types/ObjectID";
|
|
26
|
+
import { describe, expect, test, afterEach, beforeEach } from "@jest/globals";
|
|
27
|
+
|
|
28
|
+
/*
|
|
29
|
+
* The chat agent reads telemetry an attacker can influence (a log line or an
|
|
30
|
+
* exception message is whatever the monitored app threw) and can now turn it
|
|
31
|
+
* into code. AISentinelVision.md's defense is structural: a human reviews
|
|
32
|
+
* before anything merges.
|
|
33
|
+
*
|
|
34
|
+
* That defense reduces to ONE invariant, and these tests exist to make it
|
|
35
|
+
* impossible to regress silently:
|
|
36
|
+
*
|
|
37
|
+
* A chat-authored commit NEVER lands on the default branch, and never on a
|
|
38
|
+
* protected branch.
|
|
39
|
+
*
|
|
40
|
+
* Everything else here (caps, validation) is secondary to that.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
const ctx: ToolContext = {
|
|
44
|
+
projectId: ObjectID.generate(),
|
|
45
|
+
props: { isRoot: true, userId: ObjectID.generate() },
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const REPO_ID: ObjectID = ObjectID.generate();
|
|
49
|
+
|
|
50
|
+
function buildRepository(): CodeRepositoryModel {
|
|
51
|
+
const repository: CodeRepositoryModel = new CodeRepositoryModel();
|
|
52
|
+
repository._id = REPO_ID.toString();
|
|
53
|
+
repository.name = "checkout";
|
|
54
|
+
repository.organizationName = "acme";
|
|
55
|
+
repository.repositoryName = "checkout";
|
|
56
|
+
repository.mainBranchName = "main";
|
|
57
|
+
repository.repositoryHostedAt = CodeRepositoryType.GitHub;
|
|
58
|
+
repository.gitHubAppInstallationId = "12345";
|
|
59
|
+
return repository;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const CHANGES: Array<{ filePath: string; content: string }> = [
|
|
63
|
+
{ filePath: "src/billing/charge.ts", content: "export const a = 1;\n" },
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
beforeEach(() => {
|
|
67
|
+
jest
|
|
68
|
+
.spyOn(CodeRepositoryService, "findBy")
|
|
69
|
+
.mockResolvedValue([buildRepository()] as never);
|
|
70
|
+
jest.spyOn(GitHubUtil, "getDefaultBranchName").mockResolvedValue("main");
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
afterEach(() => {
|
|
74
|
+
jest.restoreAllMocks();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
describe("the default-branch invariant", () => {
|
|
78
|
+
test("commit_code_to_branch REFUSES the repository's default branch", async () => {
|
|
79
|
+
const commitSpy: jest.SpiedFunction<typeof GitHubUtil.commitFilesToBranch> =
|
|
80
|
+
jest.spyOn(GitHubUtil, "commitFilesToBranch");
|
|
81
|
+
|
|
82
|
+
await expect(
|
|
83
|
+
CommitCodeToBranchTool.execute(
|
|
84
|
+
{
|
|
85
|
+
branchName: "main",
|
|
86
|
+
commitMessage: "fix",
|
|
87
|
+
changes: CHANGES,
|
|
88
|
+
},
|
|
89
|
+
ctx,
|
|
90
|
+
),
|
|
91
|
+
).rejects.toThrow(/default branch .* may never commit to it/);
|
|
92
|
+
|
|
93
|
+
// The refusal must happen BEFORE any write is attempted.
|
|
94
|
+
expect(commitSpy).not.toHaveBeenCalled();
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
* mainBranchName is a copy made at import time and drifts. GitHub's answer
|
|
99
|
+
* is the authority — otherwise a repo that renamed main -> trunk would let
|
|
100
|
+
* chat write straight to trunk.
|
|
101
|
+
*/
|
|
102
|
+
test("refuses GitHub's real default branch even when our stored column disagrees", async () => {
|
|
103
|
+
jest.spyOn(GitHubUtil, "getDefaultBranchName").mockResolvedValue("trunk");
|
|
104
|
+
const commitSpy: jest.SpiedFunction<typeof GitHubUtil.commitFilesToBranch> =
|
|
105
|
+
jest.spyOn(GitHubUtil, "commitFilesToBranch");
|
|
106
|
+
|
|
107
|
+
await expect(
|
|
108
|
+
CommitCodeToBranchTool.execute(
|
|
109
|
+
{ branchName: "trunk", commitMessage: "fix", changes: CHANGES },
|
|
110
|
+
ctx,
|
|
111
|
+
),
|
|
112
|
+
).rejects.toThrow(/default branch/);
|
|
113
|
+
|
|
114
|
+
expect(commitSpy).not.toHaveBeenCalled();
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
test("the default-branch refusal is case-insensitive", async () => {
|
|
118
|
+
await expect(
|
|
119
|
+
CommitCodeToBranchTool.execute(
|
|
120
|
+
{ branchName: "MAIN", commitMessage: "fix", changes: CHANGES },
|
|
121
|
+
ctx,
|
|
122
|
+
),
|
|
123
|
+
).rejects.toThrow(/default branch/);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
test("commit_code_to_branch REFUSES a protected branch", async () => {
|
|
127
|
+
jest.spyOn(GitHubUtil, "getBranch").mockResolvedValue({
|
|
128
|
+
name: "release",
|
|
129
|
+
headSha: "abc123",
|
|
130
|
+
isProtected: true,
|
|
131
|
+
});
|
|
132
|
+
const commitSpy: jest.SpiedFunction<typeof GitHubUtil.commitFilesToBranch> =
|
|
133
|
+
jest.spyOn(GitHubUtil, "commitFilesToBranch");
|
|
134
|
+
|
|
135
|
+
await expect(
|
|
136
|
+
CommitCodeToBranchTool.execute(
|
|
137
|
+
{ branchName: "release", commitMessage: "fix", changes: CHANGES },
|
|
138
|
+
ctx,
|
|
139
|
+
),
|
|
140
|
+
).rejects.toThrow(/is protected/);
|
|
141
|
+
|
|
142
|
+
expect(commitSpy).not.toHaveBeenCalled();
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
test("open_code_pull_request never targets the default branch as its head", async () => {
|
|
146
|
+
jest.spyOn(GitHubUtil, "createBranch").mockResolvedValue(true);
|
|
147
|
+
jest.spyOn(GitHubUtil, "commitFilesToBranch").mockResolvedValue({
|
|
148
|
+
commitSha: "c1",
|
|
149
|
+
branchName: "x",
|
|
150
|
+
htmlUrl: "u",
|
|
151
|
+
});
|
|
152
|
+
jest.spyOn(AIAgentTaskPullRequestService, "countBy").mockResolvedValue({
|
|
153
|
+
toNumber: () => {
|
|
154
|
+
return 0;
|
|
155
|
+
},
|
|
156
|
+
} as never);
|
|
157
|
+
jest
|
|
158
|
+
.spyOn(AIAgentTaskPullRequestService, "create")
|
|
159
|
+
.mockResolvedValue({} as never);
|
|
160
|
+
|
|
161
|
+
const prSpy: jest.SpiedFunction<
|
|
162
|
+
typeof GitHubUtil.createPullRequestWithToken
|
|
163
|
+
> = jest.spyOn(GitHubUtil, "createPullRequestWithToken").mockResolvedValue({
|
|
164
|
+
pullRequestId: 1,
|
|
165
|
+
pullRequestNumber: 7,
|
|
166
|
+
state: PullRequestState.Open,
|
|
167
|
+
} as never);
|
|
168
|
+
|
|
169
|
+
await OpenCodePullRequestTool.execute(
|
|
170
|
+
{ title: "Fix charge", description: "why", changes: CHANGES },
|
|
171
|
+
ctx,
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
const call: { baseBranchName: string; headBranchName: string } = prSpy.mock
|
|
175
|
+
.calls[0]![0] as { baseBranchName: string; headBranchName: string };
|
|
176
|
+
|
|
177
|
+
// Base is the default branch (we merge INTO it); head must never be.
|
|
178
|
+
expect(call.baseBranchName).toBe("main");
|
|
179
|
+
expect(call.headBranchName).not.toBe("main");
|
|
180
|
+
expect(call.headBranchName).toContain("oneuptime-ai/");
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
describe("open_code_pull_request", () => {
|
|
185
|
+
function mockHappyPath(): void {
|
|
186
|
+
jest.spyOn(GitHubUtil, "createBranch").mockResolvedValue(true);
|
|
187
|
+
jest.spyOn(GitHubUtil, "commitFilesToBranch").mockResolvedValue({
|
|
188
|
+
commitSha: "c1",
|
|
189
|
+
branchName: "x",
|
|
190
|
+
htmlUrl: "u",
|
|
191
|
+
});
|
|
192
|
+
jest.spyOn(AIAgentTaskPullRequestService, "countBy").mockResolvedValue({
|
|
193
|
+
toNumber: () => {
|
|
194
|
+
return 0;
|
|
195
|
+
},
|
|
196
|
+
} as never);
|
|
197
|
+
jest
|
|
198
|
+
.spyOn(AIAgentTaskPullRequestService, "create")
|
|
199
|
+
.mockResolvedValue({} as never);
|
|
200
|
+
jest.spyOn(GitHubUtil, "createPullRequestWithToken").mockResolvedValue({
|
|
201
|
+
pullRequestId: 1,
|
|
202
|
+
pullRequestNumber: 7,
|
|
203
|
+
state: PullRequestState.Open,
|
|
204
|
+
} as never);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
test("opens a DRAFT pull request and says it is not merged", async () => {
|
|
208
|
+
mockHappyPath();
|
|
209
|
+
|
|
210
|
+
const result: ToolExecutionResult = await OpenCodePullRequestTool.execute(
|
|
211
|
+
{ title: "Fix charge", description: "why", changes: CHANGES },
|
|
212
|
+
ctx,
|
|
213
|
+
);
|
|
214
|
+
|
|
215
|
+
const prCall: { isDraft: boolean } = (
|
|
216
|
+
GitHubUtil.createPullRequestWithToken as unknown as jest.Mock
|
|
217
|
+
).mock.calls[0][0];
|
|
218
|
+
expect(prCall.isDraft).toBe(true);
|
|
219
|
+
|
|
220
|
+
expect(result.dataForLlm).toContain("DRAFT");
|
|
221
|
+
expect(result.dataForLlm).toContain("NOT merged");
|
|
222
|
+
expect(result.dataForLlm).toContain("/pull/7");
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
/*
|
|
226
|
+
* Chat PRs are recorded as AIAgentTaskPullRequest rows so the same per-repo
|
|
227
|
+
* cap the autonomous agent obeys can see them. If they were not recorded,
|
|
228
|
+
* chat would be an uncapped way to flood the review queue the cap protects.
|
|
229
|
+
*/
|
|
230
|
+
test("records the PR so it counts against the open-PR cap", async () => {
|
|
231
|
+
mockHappyPath();
|
|
232
|
+
|
|
233
|
+
await OpenCodePullRequestTool.execute(
|
|
234
|
+
{ title: "Fix charge", description: "why", changes: CHANGES },
|
|
235
|
+
ctx,
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
const created: {
|
|
239
|
+
data: { codeRepositoryId: ObjectID; headRefName: string };
|
|
240
|
+
} = (AIAgentTaskPullRequestService.create as unknown as jest.Mock).mock
|
|
241
|
+
.calls[0][0];
|
|
242
|
+
|
|
243
|
+
expect(created.data.codeRepositoryId.toString()).toBe(REPO_ID.toString());
|
|
244
|
+
expect(created.data.headRefName).toContain("oneuptime-ai/");
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
/*
|
|
248
|
+
* The record MUST satisfy the model's real required-column validation.
|
|
249
|
+
*
|
|
250
|
+
* This test exists because mocking AIAgentTaskPullRequestService.create — as
|
|
251
|
+
* every other test here does, to stay off a database — bypasses
|
|
252
|
+
* checkRequiredFields entirely. That hid a bug where aiAgentId was NOT NULL
|
|
253
|
+
* and never set, so create() threw on every call *after* the pull request was
|
|
254
|
+
* already open on GitHub: the user got an error, the row was never written,
|
|
255
|
+
* the open-PR cap counted 0 chat PRs forever, and the model retried and
|
|
256
|
+
* opened duplicate PRs. Nineteen green tests said otherwise.
|
|
257
|
+
*
|
|
258
|
+
* So: capture what the tool really builds, and run the REAL validator on it.
|
|
259
|
+
*/
|
|
260
|
+
test("the recorded PR row passes the model's real required-field validation", async () => {
|
|
261
|
+
mockHappyPath();
|
|
262
|
+
|
|
263
|
+
await OpenCodePullRequestTool.execute(
|
|
264
|
+
{ title: "Fix charge", description: "why", changes: CHANGES },
|
|
265
|
+
ctx,
|
|
266
|
+
);
|
|
267
|
+
|
|
268
|
+
const record: AIAgentTaskPullRequest = (
|
|
269
|
+
AIAgentTaskPullRequestService.create as unknown as jest.Mock
|
|
270
|
+
).mock.calls[0][0].data;
|
|
271
|
+
|
|
272
|
+
// Not a re-implementation of the rule — the actual production validator.
|
|
273
|
+
const validate: (model: AIAgentTaskPullRequest) => AIAgentTaskPullRequest =
|
|
274
|
+
(
|
|
275
|
+
AIAgentTaskPullRequestService as unknown as {
|
|
276
|
+
checkRequiredFields: (
|
|
277
|
+
model: AIAgentTaskPullRequest,
|
|
278
|
+
) => AIAgentTaskPullRequest;
|
|
279
|
+
}
|
|
280
|
+
).checkRequiredFields.bind(AIAgentTaskPullRequestService);
|
|
281
|
+
|
|
282
|
+
expect(() => {
|
|
283
|
+
return validate(record);
|
|
284
|
+
}).not.toThrow();
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
test("refuses when the repository is at its open-PR cap", async () => {
|
|
288
|
+
mockHappyPath();
|
|
289
|
+
jest.spyOn(AIAgentTaskPullRequestService, "countBy").mockResolvedValue({
|
|
290
|
+
toNumber: () => {
|
|
291
|
+
return 5;
|
|
292
|
+
},
|
|
293
|
+
} as never);
|
|
294
|
+
|
|
295
|
+
const branchSpy: jest.SpiedFunction<typeof GitHubUtil.createBranch> =
|
|
296
|
+
jest.spyOn(GitHubUtil, "createBranch");
|
|
297
|
+
|
|
298
|
+
await expect(
|
|
299
|
+
OpenCodePullRequestTool.execute(
|
|
300
|
+
{ title: "Fix charge", description: "why", changes: CHANGES },
|
|
301
|
+
ctx,
|
|
302
|
+
),
|
|
303
|
+
).rejects.toThrow(/open AI fix pull request cap/);
|
|
304
|
+
|
|
305
|
+
// Rejected before creating a branch — no orphan branches from a capped repo.
|
|
306
|
+
expect(branchSpy).not.toHaveBeenCalled();
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
describe("change validation (all of this is untrusted LLM output)", () => {
|
|
311
|
+
test("rejects a path traversal", async () => {
|
|
312
|
+
await expect(
|
|
313
|
+
OpenCodePullRequestTool.execute(
|
|
314
|
+
{
|
|
315
|
+
title: "t",
|
|
316
|
+
description: "d",
|
|
317
|
+
changes: [{ filePath: "../../etc/passwd", content: "x" }],
|
|
318
|
+
},
|
|
319
|
+
ctx,
|
|
320
|
+
),
|
|
321
|
+
).rejects.toThrow(/not a valid repository-relative path/);
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
test("rejects the same file written twice in one commit", async () => {
|
|
325
|
+
await expect(
|
|
326
|
+
OpenCodePullRequestTool.execute(
|
|
327
|
+
{
|
|
328
|
+
title: "t",
|
|
329
|
+
description: "d",
|
|
330
|
+
changes: [
|
|
331
|
+
{ filePath: "a.ts", content: "1" },
|
|
332
|
+
{ filePath: "a.ts", content: "2" },
|
|
333
|
+
],
|
|
334
|
+
},
|
|
335
|
+
ctx,
|
|
336
|
+
),
|
|
337
|
+
).rejects.toThrow(/appears twice/);
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
test("rejects more than the per-commit file cap", async () => {
|
|
341
|
+
const many: Array<{ filePath: string; content: string }> = Array.from(
|
|
342
|
+
{ length: 11 },
|
|
343
|
+
(_v: unknown, i: number) => {
|
|
344
|
+
return { filePath: `f${i}.ts`, content: "x" };
|
|
345
|
+
},
|
|
346
|
+
);
|
|
347
|
+
|
|
348
|
+
await expect(
|
|
349
|
+
OpenCodePullRequestTool.execute(
|
|
350
|
+
{ title: "t", description: "d", changes: many },
|
|
351
|
+
ctx,
|
|
352
|
+
),
|
|
353
|
+
).rejects.toThrow(/at most 10 files/);
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
test("rejects an empty changes array", async () => {
|
|
357
|
+
await expect(
|
|
358
|
+
OpenCodePullRequestTool.execute(
|
|
359
|
+
{ title: "t", description: "d", changes: [] },
|
|
360
|
+
ctx,
|
|
361
|
+
),
|
|
362
|
+
).rejects.toThrow(/changes is required/);
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
test("rejects a change whose content is not a string", async () => {
|
|
366
|
+
await expect(
|
|
367
|
+
OpenCodePullRequestTool.execute(
|
|
368
|
+
{
|
|
369
|
+
title: "t",
|
|
370
|
+
description: "d",
|
|
371
|
+
changes: [{ filePath: "a.ts", content: 42 }],
|
|
372
|
+
},
|
|
373
|
+
ctx,
|
|
374
|
+
),
|
|
375
|
+
).rejects.toThrow(/needs a content string/);
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
// An empty file body is legitimate; getString would wrongly reject it.
|
|
379
|
+
test("allows an empty string as a new file's contents", async () => {
|
|
380
|
+
jest.spyOn(GitHubUtil, "getBranch").mockResolvedValue({
|
|
381
|
+
name: "feature",
|
|
382
|
+
headSha: "abc",
|
|
383
|
+
isProtected: false,
|
|
384
|
+
});
|
|
385
|
+
const commitSpy: jest.SpiedFunction<typeof GitHubUtil.commitFilesToBranch> =
|
|
386
|
+
jest.spyOn(GitHubUtil, "commitFilesToBranch").mockResolvedValue({
|
|
387
|
+
commitSha: "c1",
|
|
388
|
+
branchName: "feature",
|
|
389
|
+
htmlUrl: "u",
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
await CommitCodeToBranchTool.execute(
|
|
393
|
+
{
|
|
394
|
+
branchName: "feature",
|
|
395
|
+
commitMessage: "add placeholder",
|
|
396
|
+
changes: [{ filePath: "a.ts", content: "" }],
|
|
397
|
+
},
|
|
398
|
+
ctx,
|
|
399
|
+
);
|
|
400
|
+
|
|
401
|
+
expect(commitSpy).toHaveBeenCalled();
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
test("strips a leading slash rather than failing", async () => {
|
|
405
|
+
jest.spyOn(GitHubUtil, "getBranch").mockResolvedValue({
|
|
406
|
+
name: "feature",
|
|
407
|
+
headSha: "abc",
|
|
408
|
+
isProtected: false,
|
|
409
|
+
});
|
|
410
|
+
const commitSpy: jest.SpiedFunction<typeof GitHubUtil.commitFilesToBranch> =
|
|
411
|
+
jest.spyOn(GitHubUtil, "commitFilesToBranch").mockResolvedValue({
|
|
412
|
+
commitSha: "c1",
|
|
413
|
+
branchName: "feature",
|
|
414
|
+
htmlUrl: "u",
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
await CommitCodeToBranchTool.execute(
|
|
418
|
+
{
|
|
419
|
+
branchName: "feature",
|
|
420
|
+
commitMessage: "m",
|
|
421
|
+
changes: [{ filePath: "/src/a.ts", content: "x" }],
|
|
422
|
+
},
|
|
423
|
+
ctx,
|
|
424
|
+
);
|
|
425
|
+
|
|
426
|
+
const call: { changes: Array<{ filePath: string }> } = commitSpy.mock
|
|
427
|
+
.calls[0]![0] as { changes: Array<{ filePath: string }> };
|
|
428
|
+
expect(call.changes[0]!.filePath).toBe("src/a.ts");
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
describe("permission-mode gating", () => {
|
|
433
|
+
/*
|
|
434
|
+
* Both tools must be classified as mutations, or ReadOnly conversations
|
|
435
|
+
* would be offered code-writing tools and AskForApproval would run them
|
|
436
|
+
* with no approval card.
|
|
437
|
+
*/
|
|
438
|
+
test("both code-write tools are registered as mutations", () => {
|
|
439
|
+
expect(AIToolbox.isMutationTool("open_code_pull_request")).toBe(true);
|
|
440
|
+
expect(AIToolbox.isMutationTool("commit_code_to_branch")).toBe(true);
|
|
441
|
+
});
|
|
442
|
+
|
|
443
|
+
test("the tool registry has no undefined entries", () => {
|
|
444
|
+
/*
|
|
445
|
+
* A cycle that loads a tool module before Index leaves undefined holes in
|
|
446
|
+
* the tools array, which breaks getToolByName for EVERY tool, not just the
|
|
447
|
+
* new ones. Cheap guard against a whole-toolbox outage.
|
|
448
|
+
*/
|
|
449
|
+
const tools: Array<unknown> = AIToolbox.getTools();
|
|
450
|
+
expect(tools.length).toBeGreaterThan(0);
|
|
451
|
+
expect(
|
|
452
|
+
tools.filter((tool: unknown) => {
|
|
453
|
+
return !tool;
|
|
454
|
+
}),
|
|
455
|
+
).toEqual([]);
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
test("read-only code tools are NOT mutations", () => {
|
|
459
|
+
expect(AIToolbox.isMutationTool("read_code_file")).toBe(false);
|
|
460
|
+
expect(AIToolbox.isMutationTool("find_code_for_exception")).toBe(false);
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
test("the approval card names the action concretely", () => {
|
|
464
|
+
expect(
|
|
465
|
+
OpenCodePullRequestTool.buildActionTitle!({ title: "Fix charge bug" }),
|
|
466
|
+
).toBe("Open draft pull request: Fix charge bug");
|
|
467
|
+
|
|
468
|
+
expect(
|
|
469
|
+
CommitCodeToBranchTool.buildActionTitle!({
|
|
470
|
+
branchName: "feature/x",
|
|
471
|
+
changes: [{ filePath: "a.ts", content: "" }],
|
|
472
|
+
}),
|
|
473
|
+
).toBe("Commit 1 file to feature/x");
|
|
474
|
+
});
|
|
475
|
+
});
|