@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
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import AIRun from "./AIRun";
|
|
2
|
+
import Project from "./Project";
|
|
3
|
+
import User from "./User";
|
|
4
|
+
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
|
|
5
|
+
import Route from "../../Types/API/Route";
|
|
6
|
+
import { PlanType } from "../../Types/Billing/SubscriptionPlan";
|
|
7
|
+
import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
|
|
8
|
+
import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
|
|
9
|
+
import TableBillingAccessControl from "../../Types/Database/AccessControl/TableBillingAccessControl";
|
|
10
|
+
import ColumnLength from "../../Types/Database/ColumnLength";
|
|
11
|
+
import ColumnType from "../../Types/Database/ColumnType";
|
|
12
|
+
import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
|
|
13
|
+
import TableColumn from "../../Types/Database/TableColumn";
|
|
14
|
+
import TableColumnType from "../../Types/Database/TableColumnType";
|
|
15
|
+
import TableMetadata from "../../Types/Database/TableMetadata";
|
|
16
|
+
import TenantColumn from "../../Types/Database/TenantColumn";
|
|
17
|
+
import IconProp from "../../Types/Icon/IconProp";
|
|
18
|
+
import ObjectID from "../../Types/ObjectID";
|
|
19
|
+
import Permission from "../../Types/Permission";
|
|
20
|
+
import { JSONObject } from "../../Types/JSON";
|
|
21
|
+
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
22
|
+
import EnableDocumentation from "../../Types/Database/EnableDocumentation";
|
|
23
|
+
import AIRunEventType from "../../Types/AI/AIRunEventType";
|
|
24
|
+
import { AIRunEventResultSummary } from "../../Types/AI/AIChatTypes";
|
|
25
|
+
|
|
26
|
+
/*
|
|
27
|
+
* One event in an AI run: an LLM call, a tool call with its validated
|
|
28
|
+
* arguments, or a lifecycle transition. This is both the live progress feed
|
|
29
|
+
* and the tool-invocation audit trail. Server-only writes.
|
|
30
|
+
*/
|
|
31
|
+
@EnableDocumentation()
|
|
32
|
+
@TableBillingAccessControl({
|
|
33
|
+
create: PlanType.Growth,
|
|
34
|
+
read: PlanType.Free,
|
|
35
|
+
update: PlanType.Growth,
|
|
36
|
+
delete: PlanType.Free,
|
|
37
|
+
})
|
|
38
|
+
@TenantColumn("projectId")
|
|
39
|
+
@CrudApiEndpoint(new Route("/ai-run-event"))
|
|
40
|
+
@Entity({
|
|
41
|
+
name: "AIRunEvent",
|
|
42
|
+
})
|
|
43
|
+
@TableMetadata({
|
|
44
|
+
tableName: "AIRunEvent",
|
|
45
|
+
singularName: "AI Run Event",
|
|
46
|
+
pluralName: "AI Run Events",
|
|
47
|
+
icon: IconProp.List,
|
|
48
|
+
tableDescription:
|
|
49
|
+
"An event in an AI run: LLM calls, tool calls with validated arguments, and lifecycle transitions.",
|
|
50
|
+
enableRealtimeEventsOn: {
|
|
51
|
+
create: true,
|
|
52
|
+
},
|
|
53
|
+
})
|
|
54
|
+
@TableAccessControl({
|
|
55
|
+
create: [],
|
|
56
|
+
read: [
|
|
57
|
+
Permission.ProjectOwner,
|
|
58
|
+
Permission.ProjectAdmin,
|
|
59
|
+
Permission.ProjectMember,
|
|
60
|
+
],
|
|
61
|
+
delete: [],
|
|
62
|
+
update: [],
|
|
63
|
+
})
|
|
64
|
+
export default class AIRunEvent extends BaseModel {
|
|
65
|
+
@ColumnAccessControl({
|
|
66
|
+
create: [],
|
|
67
|
+
read: [
|
|
68
|
+
Permission.ProjectOwner,
|
|
69
|
+
Permission.ProjectAdmin,
|
|
70
|
+
Permission.ProjectMember,
|
|
71
|
+
],
|
|
72
|
+
update: [],
|
|
73
|
+
})
|
|
74
|
+
@TableColumn({
|
|
75
|
+
type: TableColumnType.Entity,
|
|
76
|
+
required: true,
|
|
77
|
+
modelType: Project,
|
|
78
|
+
manyToOneRelationColumn: "projectId",
|
|
79
|
+
title: "Project",
|
|
80
|
+
description: "Project this event belongs to.",
|
|
81
|
+
})
|
|
82
|
+
@ManyToOne(
|
|
83
|
+
() => {
|
|
84
|
+
return Project;
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
cascade: false,
|
|
88
|
+
eager: false,
|
|
89
|
+
nullable: false,
|
|
90
|
+
onDelete: "CASCADE",
|
|
91
|
+
orphanedRowAction: "nullify",
|
|
92
|
+
},
|
|
93
|
+
)
|
|
94
|
+
@JoinColumn({ name: "projectId" })
|
|
95
|
+
public project?: Project = undefined;
|
|
96
|
+
|
|
97
|
+
@ColumnAccessControl({
|
|
98
|
+
create: [],
|
|
99
|
+
read: [
|
|
100
|
+
Permission.ProjectOwner,
|
|
101
|
+
Permission.ProjectAdmin,
|
|
102
|
+
Permission.ProjectMember,
|
|
103
|
+
],
|
|
104
|
+
update: [],
|
|
105
|
+
})
|
|
106
|
+
@Index()
|
|
107
|
+
@TableColumn({
|
|
108
|
+
type: TableColumnType.ObjectID,
|
|
109
|
+
required: true,
|
|
110
|
+
canReadOnRelationQuery: true,
|
|
111
|
+
title: "Project ID",
|
|
112
|
+
description: "ID of the project this event belongs to.",
|
|
113
|
+
})
|
|
114
|
+
@Column({
|
|
115
|
+
type: ColumnType.ObjectID,
|
|
116
|
+
nullable: false,
|
|
117
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
118
|
+
})
|
|
119
|
+
public projectId?: ObjectID = undefined;
|
|
120
|
+
|
|
121
|
+
@ColumnAccessControl({
|
|
122
|
+
create: [],
|
|
123
|
+
read: [
|
|
124
|
+
Permission.ProjectOwner,
|
|
125
|
+
Permission.ProjectAdmin,
|
|
126
|
+
Permission.ProjectMember,
|
|
127
|
+
],
|
|
128
|
+
update: [],
|
|
129
|
+
})
|
|
130
|
+
@TableColumn({
|
|
131
|
+
type: TableColumnType.Entity,
|
|
132
|
+
required: true,
|
|
133
|
+
modelType: AIRun,
|
|
134
|
+
manyToOneRelationColumn: "aiRunId",
|
|
135
|
+
title: "AI Run",
|
|
136
|
+
description: "Run this event belongs to.",
|
|
137
|
+
})
|
|
138
|
+
@ManyToOne(
|
|
139
|
+
() => {
|
|
140
|
+
return AIRun;
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
cascade: false,
|
|
144
|
+
eager: false,
|
|
145
|
+
nullable: false,
|
|
146
|
+
onDelete: "CASCADE",
|
|
147
|
+
orphanedRowAction: "nullify",
|
|
148
|
+
},
|
|
149
|
+
)
|
|
150
|
+
@JoinColumn({ name: "aiRunId" })
|
|
151
|
+
public aiRun?: AIRun = undefined;
|
|
152
|
+
|
|
153
|
+
@ColumnAccessControl({
|
|
154
|
+
create: [],
|
|
155
|
+
read: [
|
|
156
|
+
Permission.ProjectOwner,
|
|
157
|
+
Permission.ProjectAdmin,
|
|
158
|
+
Permission.ProjectMember,
|
|
159
|
+
],
|
|
160
|
+
update: [],
|
|
161
|
+
})
|
|
162
|
+
@Index()
|
|
163
|
+
@TableColumn({
|
|
164
|
+
type: TableColumnType.ObjectID,
|
|
165
|
+
required: true,
|
|
166
|
+
canReadOnRelationQuery: true,
|
|
167
|
+
title: "AI Run ID",
|
|
168
|
+
description: "ID of the run this event belongs to.",
|
|
169
|
+
})
|
|
170
|
+
@Column({
|
|
171
|
+
type: ColumnType.ObjectID,
|
|
172
|
+
nullable: false,
|
|
173
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
174
|
+
})
|
|
175
|
+
public aiRunId?: ObjectID = undefined;
|
|
176
|
+
|
|
177
|
+
@ColumnAccessControl({
|
|
178
|
+
create: [],
|
|
179
|
+
read: [
|
|
180
|
+
Permission.ProjectOwner,
|
|
181
|
+
Permission.ProjectAdmin,
|
|
182
|
+
Permission.ProjectMember,
|
|
183
|
+
],
|
|
184
|
+
update: [],
|
|
185
|
+
})
|
|
186
|
+
@TableColumn({
|
|
187
|
+
type: TableColumnType.Entity,
|
|
188
|
+
required: false,
|
|
189
|
+
modelType: User,
|
|
190
|
+
manyToOneRelationColumn: "userId",
|
|
191
|
+
title: "User",
|
|
192
|
+
description: "User whose run this event belongs to.",
|
|
193
|
+
})
|
|
194
|
+
@ManyToOne(
|
|
195
|
+
() => {
|
|
196
|
+
return User;
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
cascade: false,
|
|
200
|
+
eager: false,
|
|
201
|
+
nullable: true,
|
|
202
|
+
onDelete: "SET NULL",
|
|
203
|
+
orphanedRowAction: "nullify",
|
|
204
|
+
},
|
|
205
|
+
)
|
|
206
|
+
@JoinColumn({ name: "userId" })
|
|
207
|
+
public user?: User = undefined;
|
|
208
|
+
|
|
209
|
+
@ColumnAccessControl({
|
|
210
|
+
create: [],
|
|
211
|
+
read: [
|
|
212
|
+
Permission.ProjectOwner,
|
|
213
|
+
Permission.ProjectAdmin,
|
|
214
|
+
Permission.ProjectMember,
|
|
215
|
+
],
|
|
216
|
+
update: [],
|
|
217
|
+
})
|
|
218
|
+
@Index()
|
|
219
|
+
@TableColumn({
|
|
220
|
+
type: TableColumnType.ObjectID,
|
|
221
|
+
required: false,
|
|
222
|
+
canReadOnRelationQuery: true,
|
|
223
|
+
title: "User ID",
|
|
224
|
+
description: "ID of the user whose run this event belongs to.",
|
|
225
|
+
})
|
|
226
|
+
@Column({
|
|
227
|
+
type: ColumnType.ObjectID,
|
|
228
|
+
nullable: true,
|
|
229
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
230
|
+
})
|
|
231
|
+
public userId?: ObjectID = undefined;
|
|
232
|
+
|
|
233
|
+
@ColumnAccessControl({
|
|
234
|
+
create: [],
|
|
235
|
+
read: [
|
|
236
|
+
Permission.ProjectOwner,
|
|
237
|
+
Permission.ProjectAdmin,
|
|
238
|
+
Permission.ProjectMember,
|
|
239
|
+
],
|
|
240
|
+
update: [],
|
|
241
|
+
})
|
|
242
|
+
@TableColumn({
|
|
243
|
+
required: true,
|
|
244
|
+
type: TableColumnType.Number,
|
|
245
|
+
title: "Sequence",
|
|
246
|
+
description: "Order of this event within the run.",
|
|
247
|
+
})
|
|
248
|
+
@Column({
|
|
249
|
+
type: ColumnType.Number,
|
|
250
|
+
nullable: false,
|
|
251
|
+
default: 0,
|
|
252
|
+
})
|
|
253
|
+
public sequence?: number = undefined;
|
|
254
|
+
|
|
255
|
+
@ColumnAccessControl({
|
|
256
|
+
create: [],
|
|
257
|
+
read: [
|
|
258
|
+
Permission.ProjectOwner,
|
|
259
|
+
Permission.ProjectAdmin,
|
|
260
|
+
Permission.ProjectMember,
|
|
261
|
+
],
|
|
262
|
+
update: [],
|
|
263
|
+
})
|
|
264
|
+
@Index()
|
|
265
|
+
@TableColumn({
|
|
266
|
+
required: true,
|
|
267
|
+
type: TableColumnType.ShortText,
|
|
268
|
+
title: "Event Type",
|
|
269
|
+
description: "Type of event.",
|
|
270
|
+
canReadOnRelationQuery: true,
|
|
271
|
+
})
|
|
272
|
+
@Column({
|
|
273
|
+
nullable: false,
|
|
274
|
+
type: ColumnType.ShortText,
|
|
275
|
+
length: ColumnLength.ShortText,
|
|
276
|
+
})
|
|
277
|
+
public eventType?: AIRunEventType = undefined;
|
|
278
|
+
|
|
279
|
+
@ColumnAccessControl({
|
|
280
|
+
create: [],
|
|
281
|
+
read: [
|
|
282
|
+
Permission.ProjectOwner,
|
|
283
|
+
Permission.ProjectAdmin,
|
|
284
|
+
Permission.ProjectMember,
|
|
285
|
+
],
|
|
286
|
+
update: [],
|
|
287
|
+
})
|
|
288
|
+
@TableColumn({
|
|
289
|
+
required: false,
|
|
290
|
+
type: TableColumnType.ShortText,
|
|
291
|
+
title: "Tool Name",
|
|
292
|
+
description: "Name of the tool for tool-call events.",
|
|
293
|
+
})
|
|
294
|
+
@Column({
|
|
295
|
+
nullable: true,
|
|
296
|
+
type: ColumnType.ShortText,
|
|
297
|
+
length: ColumnLength.ShortText,
|
|
298
|
+
})
|
|
299
|
+
public toolName?: string = undefined;
|
|
300
|
+
|
|
301
|
+
@ColumnAccessControl({
|
|
302
|
+
create: [],
|
|
303
|
+
read: [
|
|
304
|
+
Permission.ProjectOwner,
|
|
305
|
+
Permission.ProjectAdmin,
|
|
306
|
+
Permission.ProjectMember,
|
|
307
|
+
],
|
|
308
|
+
update: [],
|
|
309
|
+
})
|
|
310
|
+
@TableColumn({
|
|
311
|
+
required: false,
|
|
312
|
+
type: TableColumnType.JSON,
|
|
313
|
+
title: "Tool Arguments",
|
|
314
|
+
description: "Validated tool arguments as executed.",
|
|
315
|
+
})
|
|
316
|
+
@Column({
|
|
317
|
+
nullable: true,
|
|
318
|
+
type: ColumnType.JSON,
|
|
319
|
+
})
|
|
320
|
+
public toolArguments?: JSONObject = undefined;
|
|
321
|
+
|
|
322
|
+
@ColumnAccessControl({
|
|
323
|
+
create: [],
|
|
324
|
+
read: [
|
|
325
|
+
Permission.ProjectOwner,
|
|
326
|
+
Permission.ProjectAdmin,
|
|
327
|
+
Permission.ProjectMember,
|
|
328
|
+
],
|
|
329
|
+
update: [],
|
|
330
|
+
})
|
|
331
|
+
@TableColumn({
|
|
332
|
+
required: false,
|
|
333
|
+
type: TableColumnType.JSON,
|
|
334
|
+
title: "Result Summary",
|
|
335
|
+
description:
|
|
336
|
+
"Summary of the result: row count, duration, truncation and bytes sent to the LLM.",
|
|
337
|
+
})
|
|
338
|
+
@Column({
|
|
339
|
+
nullable: true,
|
|
340
|
+
type: ColumnType.JSON,
|
|
341
|
+
})
|
|
342
|
+
public resultSummary?: AIRunEventResultSummary = undefined;
|
|
343
|
+
|
|
344
|
+
@ColumnAccessControl({
|
|
345
|
+
create: [],
|
|
346
|
+
read: [
|
|
347
|
+
Permission.ProjectOwner,
|
|
348
|
+
Permission.ProjectAdmin,
|
|
349
|
+
Permission.ProjectMember,
|
|
350
|
+
],
|
|
351
|
+
update: [],
|
|
352
|
+
})
|
|
353
|
+
@TableColumn({
|
|
354
|
+
required: false,
|
|
355
|
+
type: TableColumnType.ShortText,
|
|
356
|
+
title: "Citation ID",
|
|
357
|
+
description:
|
|
358
|
+
"ID of the citation this event minted (e.g. C1), if it produced one.",
|
|
359
|
+
})
|
|
360
|
+
@Column({
|
|
361
|
+
nullable: true,
|
|
362
|
+
type: ColumnType.ShortText,
|
|
363
|
+
length: ColumnLength.ShortText,
|
|
364
|
+
})
|
|
365
|
+
public citationId?: string = undefined;
|
|
366
|
+
|
|
367
|
+
@ColumnAccessControl({
|
|
368
|
+
create: [],
|
|
369
|
+
read: [],
|
|
370
|
+
update: [],
|
|
371
|
+
})
|
|
372
|
+
@TableColumn({ type: TableColumnType.Entity, modelType: User })
|
|
373
|
+
@ManyToOne(
|
|
374
|
+
() => {
|
|
375
|
+
return User;
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
cascade: false,
|
|
379
|
+
eager: false,
|
|
380
|
+
nullable: true,
|
|
381
|
+
onDelete: "SET NULL",
|
|
382
|
+
orphanedRowAction: "nullify",
|
|
383
|
+
},
|
|
384
|
+
)
|
|
385
|
+
@JoinColumn({ name: "deletedByUserId" })
|
|
386
|
+
public deletedByUser?: User = undefined;
|
|
387
|
+
|
|
388
|
+
@ColumnAccessControl({
|
|
389
|
+
create: [],
|
|
390
|
+
read: [],
|
|
391
|
+
update: [],
|
|
392
|
+
})
|
|
393
|
+
@TableColumn({
|
|
394
|
+
type: TableColumnType.ObjectID,
|
|
395
|
+
title: "Deleted by User ID",
|
|
396
|
+
description:
|
|
397
|
+
"User ID who deleted this object (if this object was deleted by a User)",
|
|
398
|
+
})
|
|
399
|
+
@Column({
|
|
400
|
+
type: ColumnType.ObjectID,
|
|
401
|
+
nullable: true,
|
|
402
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
403
|
+
})
|
|
404
|
+
public deletedByUserId?: ObjectID = undefined;
|
|
405
|
+
|
|
406
|
+
@ColumnAccessControl({
|
|
407
|
+
create: [],
|
|
408
|
+
read: [],
|
|
409
|
+
update: [],
|
|
410
|
+
})
|
|
411
|
+
@TableColumn({ type: TableColumnType.Entity, modelType: User })
|
|
412
|
+
@ManyToOne(
|
|
413
|
+
() => {
|
|
414
|
+
return User;
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
eager: false,
|
|
418
|
+
nullable: true,
|
|
419
|
+
onDelete: "SET NULL",
|
|
420
|
+
orphanedRowAction: "nullify",
|
|
421
|
+
},
|
|
422
|
+
)
|
|
423
|
+
@JoinColumn({ name: "createdByUserId" })
|
|
424
|
+
public createdByUser?: User = undefined;
|
|
425
|
+
|
|
426
|
+
@ColumnAccessControl({
|
|
427
|
+
create: [],
|
|
428
|
+
read: [],
|
|
429
|
+
update: [],
|
|
430
|
+
})
|
|
431
|
+
@TableColumn({
|
|
432
|
+
type: TableColumnType.ObjectID,
|
|
433
|
+
title: "Created by User ID",
|
|
434
|
+
description:
|
|
435
|
+
"User ID who created this object (if this object was created by a User)",
|
|
436
|
+
})
|
|
437
|
+
@Column({
|
|
438
|
+
type: ColumnType.ObjectID,
|
|
439
|
+
nullable: true,
|
|
440
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
441
|
+
})
|
|
442
|
+
public createdByUserId?: ObjectID = undefined;
|
|
443
|
+
}
|
|
@@ -89,6 +89,19 @@ import EnableWorkflow from "../../Types/Database/EnableWorkflow";
|
|
|
89
89
|
tableDescription:
|
|
90
90
|
"Manage incoming call routing policies with escalation rules for on-call teams",
|
|
91
91
|
})
|
|
92
|
+
/*
|
|
93
|
+
* A routing phone number may belong to at most one active policy. The inbound
|
|
94
|
+
* /voice webhook looks up the policy by routingPhoneNumber and assumes a single
|
|
95
|
+
* match, so this uniqueness is enforced at the DB level (partial index in the
|
|
96
|
+
* migration; NULLs are allowed for policies without a number yet).
|
|
97
|
+
*/
|
|
98
|
+
@Index(
|
|
99
|
+
"IDX_INCOMING_CALL_POLICY_ROUTING_PHONE_UNIQUE",
|
|
100
|
+
["routingPhoneNumber"],
|
|
101
|
+
{
|
|
102
|
+
unique: true,
|
|
103
|
+
},
|
|
104
|
+
)
|
|
92
105
|
export default class IncomingCallPolicy extends BaseModel {
|
|
93
106
|
@ColumnAccessControl({
|
|
94
107
|
create: [
|
|
@@ -58,6 +58,7 @@ import BillingPaymentMethods from "./BillingPaymentMethod";
|
|
|
58
58
|
import CallLog from "./CallLog";
|
|
59
59
|
// Date migration
|
|
60
60
|
import DataMigration from "./DataMigration";
|
|
61
|
+
import MigrationFailure from "./MigrationFailure";
|
|
61
62
|
import Domain from "./Domain";
|
|
62
63
|
import EmailLog from "./EmailLog";
|
|
63
64
|
import EmailVerificationToken from "./EmailVerificationToken";
|
|
@@ -166,6 +167,10 @@ import AIAgentTask from "./AIAgentTask";
|
|
|
166
167
|
import AIAgentTaskLog from "./AIAgentTaskLog";
|
|
167
168
|
import AIAgentTaskPullRequest from "./AIAgentTaskPullRequest";
|
|
168
169
|
import AIAgentTaskTelemetryException from "./AIAgentTaskTelemetryException";
|
|
170
|
+
import AIConversation from "./AIConversation";
|
|
171
|
+
import AIConversationMessage from "./AIConversationMessage";
|
|
172
|
+
import AIRun from "./AIRun";
|
|
173
|
+
import AIRunEvent from "./AIRunEvent";
|
|
169
174
|
import LlmProvider from "./LlmProvider";
|
|
170
175
|
import LlmLog from "./LlmLog";
|
|
171
176
|
import Project from "./Project";
|
|
@@ -646,6 +651,8 @@ const AllModelTypes: Array<{
|
|
|
646
651
|
|
|
647
652
|
DataMigration,
|
|
648
653
|
|
|
654
|
+
MigrationFailure,
|
|
655
|
+
|
|
649
656
|
ShortLink,
|
|
650
657
|
|
|
651
658
|
ScheduledMaintenanceTemplate,
|
|
@@ -713,6 +720,10 @@ const AllModelTypes: Array<{
|
|
|
713
720
|
AIAgentTaskLog,
|
|
714
721
|
AIAgentTaskPullRequest,
|
|
715
722
|
AIAgentTaskTelemetryException,
|
|
723
|
+
AIConversation,
|
|
724
|
+
AIConversationMessage,
|
|
725
|
+
AIRun,
|
|
726
|
+
AIRunEvent,
|
|
716
727
|
|
|
717
728
|
LlmProvider,
|
|
718
729
|
LlmLog,
|
|
@@ -604,6 +604,32 @@ export default class LlmLog extends BaseModel {
|
|
|
604
604
|
})
|
|
605
605
|
public alertId?: ObjectID = undefined;
|
|
606
606
|
|
|
607
|
+
@ColumnAccessControl({
|
|
608
|
+
create: [],
|
|
609
|
+
read: [
|
|
610
|
+
Permission.ProjectOwner,
|
|
611
|
+
Permission.ProjectAdmin,
|
|
612
|
+
Permission.ProjectMember,
|
|
613
|
+
Permission.Viewer,
|
|
614
|
+
Permission.ReadLlmLog,
|
|
615
|
+
],
|
|
616
|
+
update: [],
|
|
617
|
+
})
|
|
618
|
+
@Index()
|
|
619
|
+
@TableColumn({
|
|
620
|
+
type: TableColumnType.ObjectID,
|
|
621
|
+
required: false,
|
|
622
|
+
canReadOnRelationQuery: true,
|
|
623
|
+
title: "AI Run ID",
|
|
624
|
+
description: "ID of the AI run this LLM call was part of (if any)",
|
|
625
|
+
})
|
|
626
|
+
@Column({
|
|
627
|
+
type: ColumnType.ObjectID,
|
|
628
|
+
nullable: true,
|
|
629
|
+
transformer: ObjectID.getDatabaseTransformer(),
|
|
630
|
+
})
|
|
631
|
+
public aiRunId?: ObjectID = undefined;
|
|
632
|
+
|
|
607
633
|
@ColumnAccessControl({
|
|
608
634
|
create: [],
|
|
609
635
|
read: [
|
|
@@ -42,7 +42,7 @@ import LlmType from "../../Types/LLM/LlmType";
|
|
|
42
42
|
pluralName: "LLM Providers",
|
|
43
43
|
icon: IconProp.Bolt,
|
|
44
44
|
tableDescription:
|
|
45
|
-
"Manage LLM Provider configurations. Connect to OpenAI, Azure OpenAI, Anthropic, Groq, Mistral, Ollama, or other LLM providers to enable AI features.",
|
|
45
|
+
"Manage LLM Provider configurations. Connect to OpenAI, Azure OpenAI, Anthropic, Groq, Mistral, Ollama, OpenAI-compatible servers (e.g. vLLM, LocalAI), or other LLM providers to enable AI features.",
|
|
46
46
|
})
|
|
47
47
|
@TableAccessControl({
|
|
48
48
|
create: [
|
|
@@ -190,7 +190,7 @@ export default class LlmProvider extends BaseModel {
|
|
|
190
190
|
type: TableColumnType.ShortText,
|
|
191
191
|
title: "LLM Type",
|
|
192
192
|
description:
|
|
193
|
-
"The type of LLM provider (OpenAI, Azure OpenAI, Anthropic, Groq, Mistral, Ollama, etc.)",
|
|
193
|
+
"The type of LLM provider (OpenAI, Azure OpenAI, Anthropic, Groq, Mistral, Ollama, OpenAICompatible, etc.)",
|
|
194
194
|
})
|
|
195
195
|
@Column({
|
|
196
196
|
nullable: false,
|