@oneuptime/common 11.3.25 → 11.3.28
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/AIConversation.ts +322 -0
- package/Models/DatabaseModels/AIConversationMessage.ts +495 -0
- package/Models/DatabaseModels/AIRun.ts +584 -0
- package/Models/DatabaseModels/AIRunEvent.ts +443 -0
- package/Models/DatabaseModels/IncidentEpisodeRoleMember.ts +1 -1
- package/Models/DatabaseModels/IncidentMember.ts +1 -1
- package/Models/DatabaseModels/IncomingCallPolicy.ts +13 -0
- package/Models/DatabaseModels/Index.ts +11 -0
- package/Models/DatabaseModels/LlmLog.ts +26 -0
- package/Models/DatabaseModels/LlmProvider.ts +2 -2
- package/Models/DatabaseModels/MigrationFailure.ts +170 -0
- package/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.ts +51 -2
- package/Models/DatabaseModels/OnCallDutyPolicySchedule.ts +44 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.ts +6 -0
- package/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.ts +6 -0
- package/Models/DatabaseModels/OnCallDutyPolicyTimeLog.ts +1 -1
- package/Models/DatabaseModels/OnCallDutyPolicyUserOverride.ts +2 -2
- package/Server/API/AIChatAPI.ts +693 -0
- package/Server/API/AlertAPI.ts +1 -1
- package/Server/API/IncidentAPI.ts +2 -2
- package/Server/API/IncidentEpisodeAPI.ts +1 -1
- package/Server/API/LlmProviderAPI.ts +170 -0
- package/Server/API/MicrosoftTeamsAPI.ts +5 -0
- package/Server/API/ScheduledMaintenanceAPI.ts +1 -1
- package/Server/API/SlackAPI.ts +663 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783363279075-AddAIChatModels.ts +245 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783443471795-AddLlmProviderToAIConversation.ts +36 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783453297388-AddAIChatWriteActionsAndWidgets.ts +46 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783461767405-MigrationName.ts +119 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783470000000-AddIncomingCallPolicyRoutingPhoneNumberUnique.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783510935686-FixNotNullForeignKeysOnDelete.ts +81 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783515836148-MigrationName.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1783523076215-AddMigrationFailureTable.ts +35 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +16 -0
- package/Server/Infrastructure/PostgresDatabase.ts +11 -0
- package/Server/Services/AIConversationMessageService.ts +39 -0
- package/Server/Services/AIConversationService.ts +63 -0
- package/Server/Services/AIRunEventService.ts +39 -0
- package/Server/Services/AIRunService.ts +39 -0
- package/Server/Services/AIService.ts +127 -33
- package/Server/Services/AnalyticsDatabaseService.ts +10 -1
- package/Server/Services/DatabaseService.ts +29 -1
- package/Server/Services/IncidentService.ts +1 -1
- package/Server/Services/IncomingCallPolicyEscalationRuleService.ts +75 -2
- package/Server/Services/IncomingCallPolicyService.ts +42 -1
- package/Server/Services/Index.ts +2 -0
- package/Server/Services/LlmProviderService.ts +110 -0
- package/Server/Services/MigrationFailureService.ts +9 -0
- package/Server/Services/MonitorProbeService.ts +33 -7
- package/Server/Services/MonitorService.ts +19 -7
- package/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.ts +65 -0
- package/Server/Services/OnCallDutyPolicyEscalationRuleService.ts +185 -41
- package/Server/Services/OnCallDutyPolicyEscalationRuleUserService.ts +23 -15
- package/Server/Services/OnCallDutyPolicyExecutionLogService.ts +39 -0
- package/Server/Services/OnCallDutyPolicyScheduleLayerService.ts +148 -0
- package/Server/Services/OnCallDutyPolicyScheduleLayerUserService.ts +11 -2
- package/Server/Services/OnCallDutyPolicyScheduleService.ts +502 -26
- package/Server/Services/OnCallDutyPolicyTimeLogService.ts +49 -7
- package/Server/Services/OnCallDutyPolicyUserOverrideService.ts +218 -4
- package/Server/Services/ProjectCallSMSConfigService.ts +82 -1
- package/Server/Services/ProjectService.ts +24 -0
- package/Server/Services/TeamMemberService.ts +6 -0
- package/Server/Services/UserNotificationRuleService.ts +13 -42
- package/Server/Services/UserOnCallLogService.ts +90 -0
- package/Server/Services/UserOnCallLogTimelineService.ts +43 -1
- package/Server/Types/AnalyticsDatabase/ModelPermission.ts +74 -9
- package/Server/Types/Database/QueryUtil.ts +57 -0
- package/Server/Utils/AI/AIChatPrivacyFilter.ts +28 -0
- package/Server/Utils/AI/AlertAIContextBuilder.ts +6 -1
- package/Server/Utils/AI/Chat/ChatAgentRunner.ts +1066 -0
- package/Server/Utils/AI/Chat/ObservabilityAssistant.ts +239 -0
- package/Server/Utils/AI/Chat/ObservabilityChatPrompt.ts +51 -0
- package/Server/Utils/AI/IncidentAIContextBuilder.ts +18 -3
- package/Server/Utils/AI/IncidentEpisodeAIContextBuilder.ts +6 -1
- package/Server/Utils/AI/ScheduledMaintenanceAIContextBuilder.ts +12 -2
- package/Server/Utils/AI/Toolbox/AlertTools.ts +201 -0
- package/Server/Utils/AI/Toolbox/AlertWriteTools.ts +174 -0
- package/Server/Utils/AI/Toolbox/ContextTools.ts +189 -0
- package/Server/Utils/AI/Toolbox/ExceptionTools.ts +149 -0
- package/Server/Utils/AI/Toolbox/IncidentTools.ts +386 -0
- package/Server/Utils/AI/Toolbox/IncidentWriteTools.ts +350 -0
- package/Server/Utils/AI/Toolbox/Index.ts +231 -0
- package/Server/Utils/AI/Toolbox/LogTools.ts +339 -0
- package/Server/Utils/AI/Toolbox/MetricTools.ts +179 -0
- package/Server/Utils/AI/Toolbox/MonitorTools.ts +193 -0
- package/Server/Utils/AI/Toolbox/RecentChangesTools.ts +208 -0
- package/Server/Utils/AI/Toolbox/Serializer.ts +299 -0
- package/Server/Utils/AI/Toolbox/ToolTypes.ts +249 -0
- package/Server/Utils/AI/Toolbox/TraceTools.ts +402 -0
- package/Server/Utils/AI/Toolbox/WidgetBuilder.ts +189 -0
- package/Server/Utils/Database/MigrationFailureLog.ts +240 -0
- package/Server/Utils/IncomingCallPhoneNumber.ts +41 -0
- package/Server/Utils/LLM/LLMService.ts +605 -96
- package/Server/Utils/Telemetry/IoTSnapshotScan.ts +12 -9
- package/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.ts +12 -9
- package/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.ts +512 -19
- package/Server/Utils/Workspace/Slack/Slack.ts +80 -0
- package/Server/Utils/Workspace/Slack/app-manifest.json +16 -1
- package/Tests/Server/Services/AnalyticsDatabaseService.test.ts +0 -8
- package/Tests/Server/Services/OnCallDutyPolicyScheduleLayerUserReorder.test.ts +233 -0
- package/Tests/Server/Services/OnCallDutyPolicyTimeLogServiceScoping.test.ts +242 -0
- package/Tests/Server/Services/OnCallDutyPolicyUserOverrideEdit.test.ts +198 -0
- package/Tests/Server/Services/UserOnCallLogClaimNotificationRule.test.ts +495 -0
- package/Tests/Server/Types/Database/QueryUtil.test.ts +74 -0
- package/Tests/Server/Utils/AI/AIChatModelACL.test.ts +42 -0
- package/Tests/Server/Utils/AI/ChatAgentHelpers.test.ts +89 -0
- package/Tests/Server/Utils/AI/LLMServiceBaseUrl.test.ts +139 -0
- package/Tests/Server/Utils/AI/LLMServiceToolCalling.test.ts +386 -0
- package/Tests/Server/Utils/AI/ToolArgsGetTimeRange.test.ts +62 -0
- package/Tests/Server/Utils/AI/ToolArgsScopeServiceIds.test.ts +79 -0
- package/Tests/Server/Utils/AI/ToolResultSerializer.test.ts +223 -0
- package/Tests/Types/Billing/SubscriptionStatus.test.ts +127 -0
- package/Tests/Types/DateExhaustiveTimezone.test.ts +700 -0
- package/Tests/Types/DateTimezoneWallClock.test.ts +99 -0
- package/Tests/Types/Events/Recurring.test.ts +22 -9
- package/Tests/Types/Metrics/RecordingRuleDefinition.test.ts +213 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilAuditFixes.test.ts +291 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilAuditFixesRound2.test.ts +398 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilDSTWeekendGap.test.ts +114 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilDSTWeeklyDayShift.test.ts +76 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilDailyMutation.test.ts +128 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilDailyProbe.test.ts +203 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilDiffFuzz.test.ts +322 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilEdgeCases.test.ts +280 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilExhaustiveCurrentUser.test.ts +863 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilExhaustiveDaily.test.ts +900 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilExhaustiveMultiLayer.test.ts +1104 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilExhaustiveRotation.test.ts +957 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilExhaustiveWeekly.test.ts +1095 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilInvariants.test.ts +232 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilMergeAudit.test.ts +227 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilMonthYearAudit.test.ts +255 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilMultiLayerAudit.test.ts +388 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilMultiLayerEdge.test.ts +300 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilOvernightDSTAudit.test.ts +158 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilRestrictedGapFix.test.ts +253 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilRestrictedGapRepro.test.ts +157 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilRotationFixes.test.ts +414 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilTimezone.test.ts +243 -0
- package/Tests/Types/OnCallDutyPolicy/LayerUtilWeekendGapRepro.test.ts +112 -0
- package/Tests/Types/OnCallDutyPolicy/OverrideLensAudit.test.ts +117 -0
- package/Tests/Types/OnCallDutyPolicy/RestrictionTimes.test.ts +8 -6
- package/Tests/Types/OnCallDutyPolicy/RestrictionTimesDefaultDayAudit.test.ts +112 -0
- package/Tests/Types/OnCallDutyPolicy/RestrictionTimesExhaustive.test.ts +821 -0
- package/Tests/Types/OnCallDutyPolicy/RestrictionTimesMutationInvariant.test.ts +886 -0
- package/Tests/Types/OnCallDutyPolicy/UserOverrideUtil.test.ts +255 -0
- package/Tests/Types/OnCallDutyPolicy/UserOverrideUtilExhaustive.test.ts +1126 -0
- package/Types/AI/AIChatMessageRole.ts +6 -0
- package/Types/AI/AIChatMessageStatus.ts +32 -0
- package/Types/AI/AIChatPermissionMode.ts +69 -0
- package/Types/AI/AIChatTypes.ts +231 -0
- package/Types/AI/AIRunEventType.ts +17 -0
- package/Types/AI/AIRunStatus.ts +28 -0
- package/Types/AI/AIRunType.ts +6 -0
- package/Types/Date.ts +200 -15
- package/Types/LLM/LlmType.ts +6 -0
- package/Types/OnCallDutyPolicy/Layer.ts +790 -260
- package/Types/OnCallDutyPolicy/RestrictionTimes.ts +39 -13
- package/Types/OnCallDutyPolicy/UserOverrideUtil.ts +21 -5
- package/UI/Components/Events/RecurringFieldElement.tsx +16 -0
- package/UI/Components/Header/HeaderIconDropdownButton.tsx +22 -12
- package/UI/Components/Markdown.tsx/MarkdownViewer.tsx +35 -3
- package/UI/Components/ModelFormModal/ModelFormModal.tsx +8 -0
- package/UI/Components/Page/Page.tsx +14 -0
- package/UI/Components/RadioButtons/BasicRadioButtons.tsx +1 -1
- package/UI/Utils/LlmTypeDropdownOptions.ts +40 -0
- package/UI/Utils/TestLLMProvider.ts +59 -0
- package/build/dist/Models/DatabaseModels/AIConversation.js +345 -0
- package/build/dist/Models/DatabaseModels/AIConversation.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AIConversationMessage.js +521 -0
- package/build/dist/Models/DatabaseModels/AIConversationMessage.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AIRun.js +619 -0
- package/build/dist/Models/DatabaseModels/AIRun.js.map +1 -0
- package/build/dist/Models/DatabaseModels/AIRunEvent.js +469 -0
- package/build/dist/Models/DatabaseModels/AIRunEvent.js.map +1 -0
- package/build/dist/Models/DatabaseModels/IncidentEpisodeRoleMember.js +1 -1
- package/build/dist/Models/DatabaseModels/IncidentEpisodeRoleMember.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncidentMember.js +1 -1
- package/build/dist/Models/DatabaseModels/IncidentMember.js.map +1 -1
- package/build/dist/Models/DatabaseModels/IncomingCallPolicy.js +10 -0
- package/build/dist/Models/DatabaseModels/IncomingCallPolicy.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +10 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LlmLog.js +28 -0
- package/build/dist/Models/DatabaseModels/LlmLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/LlmProvider.js +2 -2
- package/build/dist/Models/DatabaseModels/LlmProvider.js.map +1 -1
- package/build/dist/Models/DatabaseModels/MigrationFailure.js +196 -0
- package/build/dist/Models/DatabaseModels/MigrationFailure.js.map +1 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js +52 -2
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyExecutionLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicySchedule.js +45 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicySchedule.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.js +6 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.js +6 -0
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyTimeLog.js.map +1 -1
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js +2 -2
- package/build/dist/Models/DatabaseModels/OnCallDutyPolicyUserOverride.js.map +1 -1
- package/build/dist/Server/API/AIChatAPI.js +498 -0
- package/build/dist/Server/API/AIChatAPI.js.map +1 -0
- package/build/dist/Server/API/AlertAPI.js +1 -1
- package/build/dist/Server/API/IncidentAPI.js +2 -2
- package/build/dist/Server/API/IncidentEpisodeAPI.js +1 -1
- package/build/dist/Server/API/LlmProviderAPI.js +108 -1
- package/build/dist/Server/API/LlmProviderAPI.js.map +1 -1
- package/build/dist/Server/API/MicrosoftTeamsAPI.js +4 -0
- package/build/dist/Server/API/MicrosoftTeamsAPI.js.map +1 -1
- package/build/dist/Server/API/ScheduledMaintenanceAPI.js +1 -1
- package/build/dist/Server/API/SlackAPI.js +442 -0
- package/build/dist/Server/API/SlackAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783363279075-AddAIChatModels.js +96 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783363279075-AddAIChatModels.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783443471795-AddLlmProviderToAIConversation.js +25 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783443471795-AddLlmProviderToAIConversation.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783453297388-AddAIChatWriteActionsAndWidgets.js +31 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783453297388-AddAIChatWriteActionsAndWidgets.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783461767405-MigrationName.js +46 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783461767405-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783470000000-AddIncomingCallPolicyRoutingPhoneNumberUnique.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783470000000-AddIncomingCallPolicyRoutingPhoneNumberUnique.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783510935686-FixNotNullForeignKeysOnDelete.js +38 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783510935686-FixNotNullForeignKeysOnDelete.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783515836148-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783515836148-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783523076215-AddMigrationFailureTable.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1783523076215-AddMigrationFailureTable.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/PostgresDatabase.js +9 -0
- package/build/dist/Server/Infrastructure/PostgresDatabase.js.map +1 -1
- package/build/dist/Server/Services/AIConversationMessageService.js +34 -0
- package/build/dist/Server/Services/AIConversationMessageService.js.map +1 -0
- package/build/dist/Server/Services/AIConversationService.js +42 -0
- package/build/dist/Server/Services/AIConversationService.js.map +1 -0
- package/build/dist/Server/Services/AIRunEventService.js +34 -0
- package/build/dist/Server/Services/AIRunEventService.js.map +1 -0
- package/build/dist/Server/Services/AIRunService.js +34 -0
- package/build/dist/Server/Services/AIRunService.js.map +1 -0
- package/build/dist/Server/Services/AIService.js +84 -25
- package/build/dist/Server/Services/AIService.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +10 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/DatabaseService.js +20 -1
- package/build/dist/Server/Services/DatabaseService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +1 -1
- package/build/dist/Server/Services/IncomingCallPolicyEscalationRuleService.js +55 -2
- package/build/dist/Server/Services/IncomingCallPolicyEscalationRuleService.js.map +1 -1
- package/build/dist/Server/Services/IncomingCallPolicyService.js +40 -0
- package/build/dist/Server/Services/IncomingCallPolicyService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +2 -0
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/LlmProviderService.js +108 -0
- package/build/dist/Server/Services/LlmProviderService.js.map +1 -1
- package/build/dist/Server/Services/MigrationFailureService.js +9 -0
- package/build/dist/Server/Services/MigrationFailureService.js.map +1 -0
- package/build/dist/Server/Services/MonitorProbeService.js +33 -7
- package/build/dist/Server/Services/MonitorProbeService.js.map +1 -1
- package/build/dist/Server/Services/MonitorService.js +12 -5
- package/build/dist/Server/Services/MonitorService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js +81 -22
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js +134 -31
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js +21 -13
- package/build/dist/Server/Services/OnCallDutyPolicyEscalationRuleUserService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js +36 -0
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerService.js +121 -0
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerUserService.js +11 -2
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleLayerUserService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js +409 -36
- package/build/dist/Server/Services/OnCallDutyPolicyScheduleService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyTimeLogService.js +52 -8
- package/build/dist/Server/Services/OnCallDutyPolicyTimeLogService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyUserOverrideService.js +170 -3
- package/build/dist/Server/Services/OnCallDutyPolicyUserOverrideService.js.map +1 -1
- package/build/dist/Server/Services/ProjectCallSMSConfigService.js +72 -0
- package/build/dist/Server/Services/ProjectCallSMSConfigService.js.map +1 -1
- package/build/dist/Server/Services/ProjectService.js +25 -0
- package/build/dist/Server/Services/ProjectService.js.map +1 -1
- package/build/dist/Server/Services/TeamMemberService.js +6 -0
- package/build/dist/Server/Services/TeamMemberService.js.map +1 -1
- package/build/dist/Server/Services/UserNotificationRuleService.js +12 -30
- package/build/dist/Server/Services/UserNotificationRuleService.js.map +1 -1
- package/build/dist/Server/Services/UserOnCallLogService.js +75 -0
- package/build/dist/Server/Services/UserOnCallLogService.js.map +1 -1
- package/build/dist/Server/Services/UserOnCallLogTimelineService.js +31 -1
- package/build/dist/Server/Services/UserOnCallLogTimelineService.js.map +1 -1
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js +50 -7
- package/build/dist/Server/Types/AnalyticsDatabase/ModelPermission.js.map +1 -1
- package/build/dist/Server/Types/Database/QueryUtil.js +45 -0
- package/build/dist/Server/Types/Database/QueryUtil.js.map +1 -1
- package/build/dist/Server/Utils/AI/AIChatPrivacyFilter.js +18 -0
- package/build/dist/Server/Utils/AI/AIChatPrivacyFilter.js.map +1 -0
- package/build/dist/Server/Utils/AI/AlertAIContextBuilder.js +6 -1
- package/build/dist/Server/Utils/AI/AlertAIContextBuilder.js.map +1 -1
- package/build/dist/Server/Utils/AI/Chat/ChatAgentRunner.js +756 -0
- package/build/dist/Server/Utils/AI/Chat/ChatAgentRunner.js.map +1 -0
- package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js +165 -0
- package/build/dist/Server/Utils/AI/Chat/ObservabilityAssistant.js.map +1 -0
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js +44 -0
- package/build/dist/Server/Utils/AI/Chat/ObservabilityChatPrompt.js.map +1 -0
- package/build/dist/Server/Utils/AI/IncidentAIContextBuilder.js +18 -3
- package/build/dist/Server/Utils/AI/IncidentAIContextBuilder.js.map +1 -1
- package/build/dist/Server/Utils/AI/IncidentEpisodeAIContextBuilder.js +6 -1
- package/build/dist/Server/Utils/AI/IncidentEpisodeAIContextBuilder.js.map +1 -1
- package/build/dist/Server/Utils/AI/ScheduledMaintenanceAIContextBuilder.js +12 -2
- package/build/dist/Server/Utils/AI/ScheduledMaintenanceAIContextBuilder.js.map +1 -1
- package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js +167 -0
- package/build/dist/Server/Utils/AI/Toolbox/AlertTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/AlertWriteTools.js +136 -0
- package/build/dist/Server/Utils/AI/Toolbox/AlertWriteTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/ContextTools.js +141 -0
- package/build/dist/Server/Utils/AI/Toolbox/ContextTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/ExceptionTools.js +117 -0
- package/build/dist/Server/Utils/AI/Toolbox/ExceptionTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/IncidentTools.js +318 -0
- package/build/dist/Server/Utils/AI/Toolbox/IncidentTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/IncidentWriteTools.js +280 -0
- package/build/dist/Server/Utils/AI/Toolbox/IncidentWriteTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js +153 -0
- package/build/dist/Server/Utils/AI/Toolbox/Index.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/LogTools.js +246 -0
- package/build/dist/Server/Utils/AI/Toolbox/LogTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/MetricTools.js +120 -0
- package/build/dist/Server/Utils/AI/Toolbox/MetricTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/MonitorTools.js +158 -0
- package/build/dist/Server/Utils/AI/Toolbox/MonitorTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/RecentChangesTools.js +165 -0
- package/build/dist/Server/Utils/AI/Toolbox/RecentChangesTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/Serializer.js +228 -0
- package/build/dist/Server/Utils/AI/Toolbox/Serializer.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/ToolTypes.js +142 -0
- package/build/dist/Server/Utils/AI/Toolbox/ToolTypes.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/TraceTools.js +309 -0
- package/build/dist/Server/Utils/AI/Toolbox/TraceTools.js.map +1 -0
- package/build/dist/Server/Utils/AI/Toolbox/WidgetBuilder.js +120 -0
- package/build/dist/Server/Utils/AI/Toolbox/WidgetBuilder.js.map +1 -0
- package/build/dist/Server/Utils/Database/MigrationFailureLog.js +174 -0
- package/build/dist/Server/Utils/Database/MigrationFailureLog.js.map +1 -0
- package/build/dist/Server/Utils/IncomingCallPhoneNumber.js +30 -0
- package/build/dist/Server/Utils/IncomingCallPhoneNumber.js.map +1 -0
- package/build/dist/Server/Utils/LLM/LLMService.js +452 -92
- package/build/dist/Server/Utils/LLM/LLMService.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/IoTSnapshotScan.js +11 -8
- package/build/dist/Server/Utils/Telemetry/IoTSnapshotScan.js.map +1 -1
- package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js +11 -8
- package/build/dist/Server/Utils/Telemetry/ProxmoxCephSnapshotScan.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js +378 -15
- package/build/dist/Server/Utils/Workspace/MicrosoftTeams/MicrosoftTeams.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js +59 -0
- package/build/dist/Server/Utils/Workspace/Slack/Slack.js.map +1 -1
- package/build/dist/Server/Utils/Workspace/Slack/app-manifest.json +16 -1
- package/build/dist/Types/AI/AIChatMessageRole.js +7 -0
- package/build/dist/Types/AI/AIChatMessageRole.js.map +1 -0
- package/build/dist/Types/AI/AIChatMessageStatus.js +27 -0
- package/build/dist/Types/AI/AIChatMessageStatus.js.map +1 -0
- package/build/dist/Types/AI/AIChatPermissionMode.js +53 -0
- package/build/dist/Types/AI/AIChatPermissionMode.js.map +1 -0
- package/build/dist/Types/AI/AIChatTypes.js +74 -0
- package/build/dist/Types/AI/AIChatTypes.js.map +1 -0
- package/build/dist/Types/AI/AIRunEventType.js +18 -0
- package/build/dist/Types/AI/AIRunEventType.js.map +1 -0
- package/build/dist/Types/AI/AIRunStatus.js +26 -0
- package/build/dist/Types/AI/AIRunStatus.js.map +1 -0
- package/build/dist/Types/AI/AIRunType.js +7 -0
- package/build/dist/Types/AI/AIRunType.js.map +1 -0
- package/build/dist/Types/Date.js +153 -15
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/LLM/LlmType.js +6 -0
- package/build/dist/Types/LLM/LlmType.js.map +1 -1
- package/build/dist/Types/OnCallDutyPolicy/Layer.js +602 -171
- package/build/dist/Types/OnCallDutyPolicy/Layer.js.map +1 -1
- package/build/dist/Types/OnCallDutyPolicy/RestrictionTimes.js +27 -13
- package/build/dist/Types/OnCallDutyPolicy/RestrictionTimes.js.map +1 -1
- package/build/dist/Types/OnCallDutyPolicy/UserOverrideUtil.js +20 -5
- package/build/dist/Types/OnCallDutyPolicy/UserOverrideUtil.js.map +1 -1
- package/build/dist/UI/Components/Events/RecurringFieldElement.js +13 -0
- package/build/dist/UI/Components/Events/RecurringFieldElement.js.map +1 -1
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js +10 -5
- package/build/dist/UI/Components/Header/HeaderIconDropdownButton.js.map +1 -1
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js +18 -4
- package/build/dist/UI/Components/Markdown.tsx/MarkdownViewer.js.map +1 -1
- package/build/dist/UI/Components/ModelFormModal/ModelFormModal.js.map +1 -1
- package/build/dist/UI/Components/Page/Page.js +3 -1
- package/build/dist/UI/Components/Page/Page.js.map +1 -1
- package/build/dist/UI/Components/RadioButtons/BasicRadioButtons.js +1 -1
- package/build/dist/UI/Components/RadioButtons/BasicRadioButtons.js.map +1 -1
- package/build/dist/UI/Utils/LlmTypeDropdownOptions.js +38 -0
- package/build/dist/UI/Utils/LlmTypeDropdownOptions.js.map +1 -0
- package/build/dist/UI/Utils/TestLLMProvider.js +37 -0
- package/build/dist/UI/Utils/TestLLMProvider.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnCallDutyPolicyUserOverride.js","sourceRoot":"","sources":["../../../../Models/DatabaseModels/OnCallDutyPolicyUserOverride.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAAS,MAAM,uCAAuC,CAAC;AAC9D,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,mBAAmB,MAAM,wDAAwD,CAAC;AACzF,OAAO,YAAY,MAAM,iDAAiD,CAAC;AAC3E,OAAO,kBAAkB,MAAM,uDAAuD,CAAC;AACvF,OAAO,oBAAoB,MAAM,2CAA2C,CAAC;AAC7E,OAAO,UAAU,MAAM,iCAAiC,CAAC;AACzD,OAAO,eAAe,MAAM,sCAAsC,CAAC;AACnE,OAAO,mBAAmB,MAAM,0CAA0C,CAAC;AAC3E,OAAO,WAAW,MAAM,kCAAkC,CAAC;AAC3D,OAAO,eAAe,MAAM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AAa;YACxB,UAAU,CAAC,WAAW;YACtB,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,kCAAkC;SAC9C;QACD,MAAM,EAAE;YACN,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,aAAa;YACxB,UAAU,CAAC,WAAW;YACtB,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,gCAAgC;SAC5C;KACF,CAAC;IACD,eAAe,CAAC,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAChE,YAAY,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;IACpD,MAAM,CAAC;QACN,IAAI,EAAE,8BAA8B;KACrC,CAAC;IACD,aAAa,CAAC;QACb,SAAS,EAAE,8BAA8B;QACzC,YAAY,EAAE,eAAe;QAC7B,UAAU,EAAE,gBAAgB;QAC5B,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,gBAAgB,EACd,oLAAoL;KACvL,CAAC;GACmB,4BAA4B,CA6fhD;eA7foB,4BAA4B"}
|
|
1
|
+
{"version":3,"file":"OnCallDutyPolicyUserOverride.js","sourceRoot":"","sources":["../../../../Models/DatabaseModels/OnCallDutyPolicyUserOverride.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAAS,MAAM,uCAAuC,CAAC;AAC9D,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,mBAAmB,MAAM,wDAAwD,CAAC;AACzF,OAAO,YAAY,MAAM,iDAAiD,CAAC;AAC3E,OAAO,kBAAkB,MAAM,uDAAuD,CAAC;AACvF,OAAO,oBAAoB,MAAM,2CAA2C,CAAC;AAC7E,OAAO,UAAU,MAAM,iCAAiC,CAAC;AACzD,OAAO,eAAe,MAAM,sCAAsC,CAAC;AACnE,OAAO,mBAAmB,MAAM,0CA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M,EAAE;YACN,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,aAAa;YACxB,UAAU,CAAC,WAAW;YACtB,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,kCAAkC;SAC9C;QACD,MAAM,EAAE;YACN,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,aAAa;YACxB,UAAU,CAAC,WAAW;YACtB,UAAU,CAAC,YAAY;YACvB,UAAU,CAAC,gCAAgC;SAC5C;KACF,CAAC;IACD,eAAe,CAAC,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAChE,YAAY,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;IACpD,MAAM,CAAC;QACN,IAAI,EAAE,8BAA8B;KACrC,CAAC;IACD,aAAa,CAAC;QACb,SAAS,EAAE,8BAA8B;QACzC,YAAY,EAAE,eAAe;QAC7B,UAAU,EAAE,gBAAgB;QAC5B,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,gBAAgB,EACd,oLAAoL;KACvL,CAAC;GACmB,4BAA4B,CA6fhD;eA7foB,4BAA4B"}
|
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
import UserMiddleware from "../Middleware/UserAuthorization";
|
|
2
|
+
import CommonAPI from "./CommonAPI";
|
|
3
|
+
import Express from "../Utils/Express";
|
|
4
|
+
import Response from "../Utils/Response";
|
|
5
|
+
import BadDataException from "../../Types/Exception/BadDataException";
|
|
6
|
+
import PaymentRequiredException from "../../Types/Exception/PaymentRequiredException";
|
|
7
|
+
import NotAuthorizedException from "../../Types/Exception/NotAuthorizedException";
|
|
8
|
+
import ObjectID from "../../Types/ObjectID";
|
|
9
|
+
import OneUptimeDate from "../../Types/Date";
|
|
10
|
+
import SortOrder from "../../Types/BaseDatabase/SortOrder";
|
|
11
|
+
import SubscriptionPlan, { PlanType, } from "../../Types/Billing/SubscriptionPlan";
|
|
12
|
+
import { IsBillingEnabled, getAllEnvVars } from "../EnvironmentConfig";
|
|
13
|
+
import AIChatMessageRole from "../../Types/AI/AIChatMessageRole";
|
|
14
|
+
import AIChatMessageStatus from "../../Types/AI/AIChatMessageStatus";
|
|
15
|
+
import { AIChatPermissionModeHelper, } from "../../Types/AI/AIChatPermissionMode";
|
|
16
|
+
import { AIChatToolActionStatus, } from "../../Types/AI/AIChatTypes";
|
|
17
|
+
import AIRunStatus from "../../Types/AI/AIRunStatus";
|
|
18
|
+
import AIRunType from "../../Types/AI/AIRunType";
|
|
19
|
+
import AIConversation from "../../Models/DatabaseModels/AIConversation";
|
|
20
|
+
import AIConversationMessage from "../../Models/DatabaseModels/AIConversationMessage";
|
|
21
|
+
import AIRun from "../../Models/DatabaseModels/AIRun";
|
|
22
|
+
import AIConversationService from "../Services/AIConversationService";
|
|
23
|
+
import AIConversationMessageService from "../Services/AIConversationMessageService";
|
|
24
|
+
import AIRunService from "../Services/AIRunService";
|
|
25
|
+
import ProjectService from "../Services/ProjectService";
|
|
26
|
+
import LlmProviderService from "../Services/LlmProviderService";
|
|
27
|
+
import ChatAgentRunner from "../Utils/AI/Chat/ChatAgentRunner";
|
|
28
|
+
import QueryHelper from "../Types/Database/QueryHelper";
|
|
29
|
+
import logger from "../Utils/Logger";
|
|
30
|
+
const MAX_USER_MESSAGE_LENGTH = 8000;
|
|
31
|
+
const MAX_CONCURRENT_RUNS_PER_PROJECT = 3;
|
|
32
|
+
const router = Express.getRouter();
|
|
33
|
+
/*
|
|
34
|
+
* Starts a chat turn: validates and gates the request, creates the user and
|
|
35
|
+
* assistant message rows and the run, then kicks the agent loop off detached
|
|
36
|
+
* and returns immediately. The client follows progress by polling/receiving
|
|
37
|
+
* realtime events on the assistant message and the run events.
|
|
38
|
+
*/
|
|
39
|
+
router.post("/ai-chat/send-message", UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
40
|
+
var _a, _b, _c, _d, _e;
|
|
41
|
+
try {
|
|
42
|
+
const props = await CommonAPI.getDatabaseCommonInteractionProps(req);
|
|
43
|
+
if (!props.userId) {
|
|
44
|
+
throw new NotAuthorizedException("AI chat requires a logged-in user session.");
|
|
45
|
+
}
|
|
46
|
+
if (!props.tenantId) {
|
|
47
|
+
throw new BadDataException("Project ID is required (tenantid header).");
|
|
48
|
+
}
|
|
49
|
+
const projectId = props.tenantId;
|
|
50
|
+
const userId = props.userId;
|
|
51
|
+
const content = req.body["content"] || "";
|
|
52
|
+
if (!content.trim()) {
|
|
53
|
+
throw new BadDataException("Message content is required.");
|
|
54
|
+
}
|
|
55
|
+
if (content.length > MAX_USER_MESSAGE_LENGTH) {
|
|
56
|
+
throw new BadDataException(`Message is too long. Maximum length is ${MAX_USER_MESSAGE_LENGTH} characters.`);
|
|
57
|
+
}
|
|
58
|
+
/*
|
|
59
|
+
* Optional provider override chosen in the chat provider switcher. It is
|
|
60
|
+
* validated against the project below (must be a global provider or one
|
|
61
|
+
* owned by this project) so a member can't point a conversation at
|
|
62
|
+
* another project's provider.
|
|
63
|
+
*/
|
|
64
|
+
let requestedLlmProviderId = undefined;
|
|
65
|
+
if (req.body["llmProviderId"]) {
|
|
66
|
+
requestedLlmProviderId = new ObjectID(req.body["llmProviderId"]);
|
|
67
|
+
const chosenProvider = await LlmProviderService.findOneById({
|
|
68
|
+
id: requestedLlmProviderId,
|
|
69
|
+
select: {
|
|
70
|
+
_id: true,
|
|
71
|
+
projectId: true,
|
|
72
|
+
isGlobalLlm: true,
|
|
73
|
+
},
|
|
74
|
+
props: { isRoot: true },
|
|
75
|
+
});
|
|
76
|
+
const isAccessible = Boolean(chosenProvider &&
|
|
77
|
+
(chosenProvider.isGlobalLlm === true ||
|
|
78
|
+
((_a = chosenProvider.projectId) === null || _a === void 0 ? void 0 : _a.toString()) === projectId.toString()));
|
|
79
|
+
if (!isAccessible) {
|
|
80
|
+
throw new BadDataException("The selected AI provider is not available for this project.");
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/*
|
|
84
|
+
* Optional per-conversation permission mode chosen in the composer
|
|
85
|
+
* (AskForApproval | AutoRun | ReadOnly). Like the provider, it is sticky:
|
|
86
|
+
* persisted on the conversation and reused across turns. Invalid values
|
|
87
|
+
* are ignored (fall through to the conversation's current mode / default).
|
|
88
|
+
*/
|
|
89
|
+
const requestedPermissionMode = AIChatPermissionModeHelper.isValid(req.body["permissionMode"])
|
|
90
|
+
? req.body["permissionMode"]
|
|
91
|
+
: undefined;
|
|
92
|
+
// Plan gate: custom endpoints get no automatic billing check.
|
|
93
|
+
if (IsBillingEnabled &&
|
|
94
|
+
props.currentPlan &&
|
|
95
|
+
!SubscriptionPlan.isFeatureAccessibleOnCurrentPlan(PlanType.Growth, props.currentPlan, getAllEnvVars())) {
|
|
96
|
+
throw new PaymentRequiredException("Please upgrade your plan to Growth to use AI chat.");
|
|
97
|
+
}
|
|
98
|
+
if (IsBillingEnabled && props.isSubscriptionUnpaid) {
|
|
99
|
+
throw new PaymentRequiredException("Your subscription is unpaid. Please update your payment method to use AI chat.");
|
|
100
|
+
}
|
|
101
|
+
/*
|
|
102
|
+
* Project AI toggle and the project-wide volume governor (parallel —
|
|
103
|
+
* independent reads).
|
|
104
|
+
*/
|
|
105
|
+
const [project, runningRunsInProject] = await Promise.all([
|
|
106
|
+
ProjectService.findOneById({
|
|
107
|
+
id: projectId,
|
|
108
|
+
select: {
|
|
109
|
+
enableAi: true,
|
|
110
|
+
},
|
|
111
|
+
props: { isRoot: true },
|
|
112
|
+
}),
|
|
113
|
+
AIRunService.countBy({
|
|
114
|
+
query: {
|
|
115
|
+
projectId: projectId,
|
|
116
|
+
runType: AIRunType.Chat,
|
|
117
|
+
status: AIRunStatus.Running,
|
|
118
|
+
},
|
|
119
|
+
props: { isRoot: true },
|
|
120
|
+
}).then((count) => {
|
|
121
|
+
return count.toNumber();
|
|
122
|
+
}),
|
|
123
|
+
]);
|
|
124
|
+
if (project && project.enableAi === false) {
|
|
125
|
+
throw new BadDataException("AI features are disabled for this project. Enable them in Project Settings > AI Credits.");
|
|
126
|
+
}
|
|
127
|
+
if (runningRunsInProject >= MAX_CONCURRENT_RUNS_PER_PROJECT) {
|
|
128
|
+
throw new BadDataException("Too many AI chat responses are being generated in this project right now. Please try again in a moment.");
|
|
129
|
+
}
|
|
130
|
+
/*
|
|
131
|
+
* Find or create the conversation (created with the USER's props so
|
|
132
|
+
* RBAC and the Growth billing gate are enforced by the normal chain).
|
|
133
|
+
*/
|
|
134
|
+
let conversationId = undefined;
|
|
135
|
+
/*
|
|
136
|
+
* The provider actually used for this turn: the explicit choice if made,
|
|
137
|
+
* otherwise whatever the conversation was last set to (so the picker is
|
|
138
|
+
* "sticky" across turns), otherwise undefined (project default).
|
|
139
|
+
*/
|
|
140
|
+
let effectiveLlmProviderId = requestedLlmProviderId;
|
|
141
|
+
// Same stickiness for the permission mode; default is AskForApproval.
|
|
142
|
+
let effectivePermissionMode = requestedPermissionMode || AIChatPermissionModeHelper.getDefault();
|
|
143
|
+
if (req.body["conversationId"]) {
|
|
144
|
+
conversationId = new ObjectID(req.body["conversationId"]);
|
|
145
|
+
// The privacy pin makes this return null for other users' rows.
|
|
146
|
+
const conversation = await AIConversationService.findOneById({
|
|
147
|
+
id: conversationId,
|
|
148
|
+
select: { _id: true, llmProviderId: true, permissionMode: true },
|
|
149
|
+
props: props,
|
|
150
|
+
});
|
|
151
|
+
if (!conversation) {
|
|
152
|
+
throw new BadDataException("Conversation not found.");
|
|
153
|
+
}
|
|
154
|
+
if (requestedLlmProviderId &&
|
|
155
|
+
requestedLlmProviderId.toString() !==
|
|
156
|
+
((_b = conversation.llmProviderId) === null || _b === void 0 ? void 0 : _b.toString())) {
|
|
157
|
+
// The user switched providers mid-conversation — persist the change.
|
|
158
|
+
await AIConversationService.updateOneById({
|
|
159
|
+
id: conversationId,
|
|
160
|
+
data: {
|
|
161
|
+
llmProviderId: requestedLlmProviderId,
|
|
162
|
+
},
|
|
163
|
+
props: { isRoot: true },
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
effectiveLlmProviderId =
|
|
167
|
+
requestedLlmProviderId || conversation.llmProviderId;
|
|
168
|
+
effectivePermissionMode = AIChatPermissionModeHelper.parse(requestedPermissionMode || conversation.permissionMode);
|
|
169
|
+
if (requestedPermissionMode &&
|
|
170
|
+
requestedPermissionMode !== conversation.permissionMode) {
|
|
171
|
+
// The user switched the permission mode mid-conversation — persist it.
|
|
172
|
+
await AIConversationService.updateOneById({
|
|
173
|
+
id: conversationId,
|
|
174
|
+
data: {
|
|
175
|
+
permissionMode: requestedPermissionMode,
|
|
176
|
+
},
|
|
177
|
+
props: { isRoot: true },
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/*
|
|
181
|
+
* Block a new send while the conversation is busy: a run is either
|
|
182
|
+
* actively generating (Running) or paused waiting for the user to
|
|
183
|
+
* approve pending actions (WaitingForApproval).
|
|
184
|
+
*/
|
|
185
|
+
const busyRunsInConversation = (await AIRunService.countBy({
|
|
186
|
+
query: {
|
|
187
|
+
conversationId: conversationId,
|
|
188
|
+
status: QueryHelper.any([
|
|
189
|
+
AIRunStatus.Running,
|
|
190
|
+
AIRunStatus.WaitingForApproval,
|
|
191
|
+
]),
|
|
192
|
+
},
|
|
193
|
+
props: { isRoot: true },
|
|
194
|
+
})).toNumber();
|
|
195
|
+
if (busyRunsInConversation > 0) {
|
|
196
|
+
throw new BadDataException("A response is already being generated (or is waiting for your approval) in this conversation.");
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
const conversation = new AIConversation();
|
|
201
|
+
conversation.projectId = projectId;
|
|
202
|
+
const createdConversation = await AIConversationService.create({
|
|
203
|
+
data: conversation,
|
|
204
|
+
props: props,
|
|
205
|
+
});
|
|
206
|
+
conversationId = createdConversation.id;
|
|
207
|
+
/*
|
|
208
|
+
* Title is server-generated; the column is deliberately not
|
|
209
|
+
* user-writable. The provider choice (if any) is stored here too so it
|
|
210
|
+
* sticks for the rest of the conversation.
|
|
211
|
+
*/
|
|
212
|
+
await AIConversationService.updateOneById({
|
|
213
|
+
id: conversationId,
|
|
214
|
+
data: Object.assign({ title: content.substring(0, 90), permissionMode: effectivePermissionMode }, (requestedLlmProviderId
|
|
215
|
+
? { llmProviderId: requestedLlmProviderId }
|
|
216
|
+
: {})),
|
|
217
|
+
props: { isRoot: true },
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/*
|
|
221
|
+
* The run is created BEFORE the message rows so the concurrency check
|
|
222
|
+
* below can be verified against it.
|
|
223
|
+
*/
|
|
224
|
+
const run = new AIRun();
|
|
225
|
+
run.projectId = projectId;
|
|
226
|
+
run.runType = AIRunType.Chat;
|
|
227
|
+
run.status = AIRunStatus.Running;
|
|
228
|
+
run.userId = userId;
|
|
229
|
+
run.conversationId = conversationId;
|
|
230
|
+
run.startedAt = OneUptimeDate.getCurrentDate();
|
|
231
|
+
run.lastHeartbeatAt = OneUptimeDate.getCurrentDate();
|
|
232
|
+
const createdRun = await AIRunService.create({
|
|
233
|
+
data: run,
|
|
234
|
+
props: { isRoot: true },
|
|
235
|
+
});
|
|
236
|
+
/*
|
|
237
|
+
* Close the check-then-act race on the per-conversation governor: after
|
|
238
|
+
* creating our run, verify it is the OLDEST running run for this
|
|
239
|
+
* conversation. If two sends raced, the newer one cancels itself.
|
|
240
|
+
*/
|
|
241
|
+
const runningRuns = await AIRunService.findBy({
|
|
242
|
+
query: {
|
|
243
|
+
conversationId: conversationId,
|
|
244
|
+
status: AIRunStatus.Running,
|
|
245
|
+
},
|
|
246
|
+
select: {
|
|
247
|
+
_id: true,
|
|
248
|
+
},
|
|
249
|
+
sort: {
|
|
250
|
+
createdAt: SortOrder.Ascending,
|
|
251
|
+
},
|
|
252
|
+
limit: 2,
|
|
253
|
+
skip: 0,
|
|
254
|
+
props: { isRoot: true },
|
|
255
|
+
});
|
|
256
|
+
if (runningRuns.length > 1 &&
|
|
257
|
+
((_d = (_c = runningRuns[0]) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.toString()) !== ((_e = createdRun.id) === null || _e === void 0 ? void 0 : _e.toString())) {
|
|
258
|
+
await AIRunService.updateOneById({
|
|
259
|
+
id: createdRun.id,
|
|
260
|
+
data: {
|
|
261
|
+
status: AIRunStatus.Cancelled,
|
|
262
|
+
completedAt: OneUptimeDate.getCurrentDate(),
|
|
263
|
+
errorMessage: "Cancelled: another response was already being generated in this conversation.",
|
|
264
|
+
},
|
|
265
|
+
props: { isRoot: true },
|
|
266
|
+
});
|
|
267
|
+
throw new BadDataException("A response is already being generated in this conversation.");
|
|
268
|
+
}
|
|
269
|
+
/*
|
|
270
|
+
* User message row (server-written; message create ACLs are empty by
|
|
271
|
+
* design so members can't forge rows through the CRUD API).
|
|
272
|
+
*/
|
|
273
|
+
const userMessage = new AIConversationMessage();
|
|
274
|
+
userMessage.projectId = projectId;
|
|
275
|
+
userMessage.conversationId = conversationId;
|
|
276
|
+
userMessage.userId = userId;
|
|
277
|
+
userMessage.role = AIChatMessageRole.User;
|
|
278
|
+
userMessage.contentInMarkdown = content;
|
|
279
|
+
userMessage.status = AIChatMessageStatus.Completed;
|
|
280
|
+
const createdUserMessage = await AIConversationMessageService.create({
|
|
281
|
+
data: userMessage,
|
|
282
|
+
props: { isRoot: true },
|
|
283
|
+
});
|
|
284
|
+
// The assistant message the turn will fill in.
|
|
285
|
+
const assistantMessage = new AIConversationMessage();
|
|
286
|
+
assistantMessage.projectId = projectId;
|
|
287
|
+
assistantMessage.conversationId = conversationId;
|
|
288
|
+
assistantMessage.userId = userId;
|
|
289
|
+
assistantMessage.role = AIChatMessageRole.Assistant;
|
|
290
|
+
assistantMessage.status = AIChatMessageStatus.InProgress;
|
|
291
|
+
assistantMessage.aiRunId = createdRun.id;
|
|
292
|
+
const createdAssistantMessage = await AIConversationMessageService.create({
|
|
293
|
+
data: assistantMessage,
|
|
294
|
+
props: { isRoot: true },
|
|
295
|
+
});
|
|
296
|
+
await AIConversationService.updateOneById({
|
|
297
|
+
id: conversationId,
|
|
298
|
+
data: {
|
|
299
|
+
lastMessageAt: OneUptimeDate.getCurrentDate(),
|
|
300
|
+
},
|
|
301
|
+
props: { isRoot: true },
|
|
302
|
+
});
|
|
303
|
+
/*
|
|
304
|
+
* Detach the turn. The endpoint responds immediately; progress flows
|
|
305
|
+
* through the message row, the run row and run events.
|
|
306
|
+
*/
|
|
307
|
+
ChatAgentRunner.runTurn({
|
|
308
|
+
projectId: projectId,
|
|
309
|
+
userId: userId,
|
|
310
|
+
conversationId: conversationId,
|
|
311
|
+
assistantMessageId: createdAssistantMessage.id,
|
|
312
|
+
aiRunId: createdRun.id,
|
|
313
|
+
llmProviderId: effectiveLlmProviderId,
|
|
314
|
+
permissionMode: effectivePermissionMode,
|
|
315
|
+
props: props,
|
|
316
|
+
}).catch((error) => {
|
|
317
|
+
logger.error(`AI chat turn crashed: ${error.message}`);
|
|
318
|
+
});
|
|
319
|
+
Response.sendJsonObjectResponse(req, res, {
|
|
320
|
+
conversationId: conversationId.toString(),
|
|
321
|
+
userMessageId: createdUserMessage.id.toString(),
|
|
322
|
+
assistantMessageId: createdAssistantMessage.id.toString(),
|
|
323
|
+
aiRunId: createdRun.id.toString(),
|
|
324
|
+
});
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
catch (err) {
|
|
328
|
+
next(err);
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
});
|
|
332
|
+
/*
|
|
333
|
+
* Lists the LLM providers a member can choose from in the chat provider
|
|
334
|
+
* switcher: every provider configured for the project plus the shared global
|
|
335
|
+
* providers. Secrets are never returned. `defaultProviderId` is the provider
|
|
336
|
+
* the project resolves to today, so the UI can pre-select it.
|
|
337
|
+
*/
|
|
338
|
+
router.post("/ai-chat/providers", UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
339
|
+
var _a;
|
|
340
|
+
try {
|
|
341
|
+
const props = await CommonAPI.getDatabaseCommonInteractionProps(req);
|
|
342
|
+
if (!props.userId) {
|
|
343
|
+
throw new NotAuthorizedException("AI chat requires a logged-in user session.");
|
|
344
|
+
}
|
|
345
|
+
if (!props.tenantId) {
|
|
346
|
+
throw new BadDataException("Project ID is required (tenantid header).");
|
|
347
|
+
}
|
|
348
|
+
const projectId = props.tenantId;
|
|
349
|
+
const [providers, defaultProvider] = await Promise.all([
|
|
350
|
+
LlmProviderService.getSelectableProvidersForProject(projectId),
|
|
351
|
+
LlmProviderService.getLLMProviderForProject(projectId),
|
|
352
|
+
]);
|
|
353
|
+
Response.sendJsonObjectResponse(req, res, {
|
|
354
|
+
defaultProviderId: ((_a = defaultProvider === null || defaultProvider === void 0 ? void 0 : defaultProvider.id) === null || _a === void 0 ? void 0 : _a.toString()) || null,
|
|
355
|
+
providers: providers.map((provider) => {
|
|
356
|
+
var _a, _b;
|
|
357
|
+
return {
|
|
358
|
+
id: (_a = provider.id) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
359
|
+
name: provider.name,
|
|
360
|
+
llmType: ((_b = provider.llmType) === null || _b === void 0 ? void 0 : _b.toString()) || null,
|
|
361
|
+
modelName: provider.modelName || null,
|
|
362
|
+
isDefault: provider.isDefault || false,
|
|
363
|
+
isGlobal: provider.isGlobalLlm || false,
|
|
364
|
+
};
|
|
365
|
+
}),
|
|
366
|
+
});
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
catch (err) {
|
|
370
|
+
next(err);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
/*
|
|
375
|
+
* Responds to a paused turn's approval request: the user approves or denies the
|
|
376
|
+
* pending mutating actions, and the agent turn resumes detached. Progress then
|
|
377
|
+
* flows back through the same message/run/event polling as a normal turn.
|
|
378
|
+
*/
|
|
379
|
+
router.post("/ai-chat/respond-to-approval", UserMiddleware.getUserMiddleware, async (req, res, next) => {
|
|
380
|
+
var _a;
|
|
381
|
+
try {
|
|
382
|
+
const props = await CommonAPI.getDatabaseCommonInteractionProps(req);
|
|
383
|
+
if (!props.userId) {
|
|
384
|
+
throw new NotAuthorizedException("AI chat requires a logged-in user session.");
|
|
385
|
+
}
|
|
386
|
+
if (!props.tenantId) {
|
|
387
|
+
throw new BadDataException("Project ID is required (tenantid header).");
|
|
388
|
+
}
|
|
389
|
+
const projectId = props.tenantId;
|
|
390
|
+
const userId = props.userId;
|
|
391
|
+
const conversationIdString = req.body["conversationId"];
|
|
392
|
+
const assistantMessageIdString = req.body["assistantMessageId"];
|
|
393
|
+
if (!conversationIdString || !assistantMessageIdString) {
|
|
394
|
+
throw new BadDataException("conversationId and assistantMessageId are required.");
|
|
395
|
+
}
|
|
396
|
+
const conversationId = new ObjectID(conversationIdString);
|
|
397
|
+
const assistantMessageId = new ObjectID(assistantMessageIdString);
|
|
398
|
+
// The privacy pin makes these return null for other users' rows.
|
|
399
|
+
const conversation = await AIConversationService.findOneById({
|
|
400
|
+
id: conversationId,
|
|
401
|
+
select: { _id: true, llmProviderId: true, permissionMode: true },
|
|
402
|
+
props: props,
|
|
403
|
+
});
|
|
404
|
+
if (!conversation) {
|
|
405
|
+
throw new BadDataException("Conversation not found.");
|
|
406
|
+
}
|
|
407
|
+
const message = await AIConversationMessageService.findOneById({
|
|
408
|
+
id: assistantMessageId,
|
|
409
|
+
select: {
|
|
410
|
+
_id: true,
|
|
411
|
+
conversationId: true,
|
|
412
|
+
status: true,
|
|
413
|
+
aiRunId: true,
|
|
414
|
+
toolActions: true,
|
|
415
|
+
},
|
|
416
|
+
props: props,
|
|
417
|
+
});
|
|
418
|
+
if (!message ||
|
|
419
|
+
((_a = message.conversationId) === null || _a === void 0 ? void 0 : _a.toString()) !== conversationId.toString()) {
|
|
420
|
+
throw new BadDataException("Message not found.");
|
|
421
|
+
}
|
|
422
|
+
if (message.status !== AIChatMessageStatus.WaitingForApproval ||
|
|
423
|
+
!message.aiRunId) {
|
|
424
|
+
throw new BadDataException("This message is not waiting for approval.");
|
|
425
|
+
}
|
|
426
|
+
const pendingActions = (message.toolActions || []).filter((action) => {
|
|
427
|
+
return (action.status === AIChatToolActionStatus.Pending &&
|
|
428
|
+
action.requiresApproval);
|
|
429
|
+
});
|
|
430
|
+
if (pendingActions.length === 0) {
|
|
431
|
+
throw new BadDataException("There are no actions waiting for approval on this message.");
|
|
432
|
+
}
|
|
433
|
+
/*
|
|
434
|
+
* Decisions can be provided explicitly (per tool-call) or as a single
|
|
435
|
+
* `approved` boolean applied to every pending action (the Approve-all /
|
|
436
|
+
* Deny-all buttons). Any pending action left without a decision defaults
|
|
437
|
+
* to denied inside the runner — approvals are always explicit.
|
|
438
|
+
*/
|
|
439
|
+
const decisions = [];
|
|
440
|
+
const bodyDecisions = req.body["decisions"];
|
|
441
|
+
if (Array.isArray(bodyDecisions)) {
|
|
442
|
+
for (const decision of bodyDecisions) {
|
|
443
|
+
const decisionObject = decision;
|
|
444
|
+
const toolCallId = decisionObject["toolCallId"];
|
|
445
|
+
if (toolCallId) {
|
|
446
|
+
decisions.push({
|
|
447
|
+
toolCallId: toolCallId,
|
|
448
|
+
approved: decisionObject["approved"] === true,
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
else if (typeof req.body["approved"] === "boolean") {
|
|
454
|
+
const approveAll = req.body["approved"] === true;
|
|
455
|
+
for (const action of pendingActions) {
|
|
456
|
+
decisions.push({ toolCallId: action.id, approved: approveAll });
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
else {
|
|
460
|
+
throw new BadDataException("Provide either a `decisions` array or an `approved` boolean.");
|
|
461
|
+
}
|
|
462
|
+
// Confirm the run is still awaiting approval before kicking the resume.
|
|
463
|
+
const run = await AIRunService.findOneById({
|
|
464
|
+
id: message.aiRunId,
|
|
465
|
+
select: { _id: true, status: true },
|
|
466
|
+
props: { isRoot: true },
|
|
467
|
+
});
|
|
468
|
+
if (!run || run.status !== AIRunStatus.WaitingForApproval) {
|
|
469
|
+
throw new BadDataException("This turn is no longer awaiting approval.");
|
|
470
|
+
}
|
|
471
|
+
const permissionMode = AIChatPermissionModeHelper.parse(conversation.permissionMode);
|
|
472
|
+
// Detach the resume; the client follows progress via the usual polling.
|
|
473
|
+
ChatAgentRunner.resumeTurn({
|
|
474
|
+
projectId: projectId,
|
|
475
|
+
userId: userId,
|
|
476
|
+
conversationId: conversationId,
|
|
477
|
+
assistantMessageId: assistantMessageId,
|
|
478
|
+
aiRunId: message.aiRunId,
|
|
479
|
+
llmProviderId: conversation.llmProviderId,
|
|
480
|
+
permissionMode: permissionMode,
|
|
481
|
+
props: props,
|
|
482
|
+
}, decisions).catch((error) => {
|
|
483
|
+
logger.error(`AI chat turn resume crashed: ${error.message}`);
|
|
484
|
+
});
|
|
485
|
+
Response.sendJsonObjectResponse(req, res, {
|
|
486
|
+
conversationId: conversationId.toString(),
|
|
487
|
+
assistantMessageId: assistantMessageId.toString(),
|
|
488
|
+
aiRunId: message.aiRunId.toString(),
|
|
489
|
+
});
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
catch (err) {
|
|
493
|
+
next(err);
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
});
|
|
497
|
+
export default router;
|
|
498
|
+
//# sourceMappingURL=AIChatAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIChatAPI.js","sourceRoot":"","sources":["../../../../Server/API/AIChatAPI.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,OAKN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,gBAAgB,MAAM,wCAAwC,CAAC;AACtE,OAAO,wBAAwB,MAAM,gDAAgD,CAAC;AACtF,OAAO,sBAAsB,MAAM,8CAA8C,CAAC;AAElF,OAAO,QAAQ,MAAM,sBAAsB,CAAC;AAC5C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,SAAS,MAAM,oCAAoC,CAAC;AAC3D,OA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C,GAAG,CAAC,CAAC;QACV,OAAO;IACT,CAAC;AACH,CAAC,CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -155,7 +155,7 @@ export default class IncidentAPI extends BaseAPI {
|
|
|
155
155
|
incidentId: incidentId,
|
|
156
156
|
messages: aiContext.messages,
|
|
157
157
|
maxTokens: 8192,
|
|
158
|
-
temperature: 0.
|
|
158
|
+
temperature: 0.2,
|
|
159
159
|
};
|
|
160
160
|
if (props.userId) {
|
|
161
161
|
aiLogRequest.userId = props.userId;
|
|
@@ -232,7 +232,7 @@ export default class IncidentAPI extends BaseAPI {
|
|
|
232
232
|
incidentId: incidentId,
|
|
233
233
|
messages: aiContext.messages,
|
|
234
234
|
maxTokens: 4096,
|
|
235
|
-
temperature: 0.
|
|
235
|
+
temperature: 0.2,
|
|
236
236
|
};
|
|
237
237
|
if (props.userId) {
|
|
238
238
|
aiLogRequest.userId = props.userId;
|
|
@@ -83,7 +83,7 @@ export default class IncidentEpisodeAPI extends BaseAPI {
|
|
|
83
83
|
feature: "Incident Episode Postmortem",
|
|
84
84
|
messages: aiContext.messages,
|
|
85
85
|
maxTokens: 8192,
|
|
86
|
-
temperature: 0.
|
|
86
|
+
temperature: 0.2,
|
|
87
87
|
};
|
|
88
88
|
if (props.userId) {
|
|
89
89
|
aiLogRequest.userId = props.userId;
|