@iblai/iblai-js 2.22.0 → 2.23.1

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.
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { useState, useEffect, forwardRef, createElement as createElement$3, useLayoutEffect, createContext, useContext, useMemo, useReducer, useRef, useImperativeHandle, useCallback, isValidElement, Children, PureComponent, cloneElement, Component as Component$1, Fragment as Fragment$2, useId as useId$2, useDebugValue, lazy, Suspense } from 'react';
4
4
  import * as dataLayer from '@iblai/data-layer';
5
- import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerCourseOutlineQuery, getSections, findResumeBlock, flattenOutline, normalizeLearnerCompletionError, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useStarMentorMutation, useUnstarMentorMutation, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useGetLlmsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, VERCEL_SPA, useGetCustomDomainsQuery, useGetHostingProjectsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useCreateHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetSpendCapStatusQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useDeleteLtiMentorMutation, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useGetDisclaimerAgreementsQuery, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
5
+ import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerCourseOutlineQuery, getSections, findResumeBlock, flattenOutline, normalizeLearnerCompletionError, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useGetAiSearchMentorsQuery, useStarMentorMutation, useUnstarMentorMutation, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmCostByService, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useGetLlmsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, VERCEL_SPA, useGetCustomDomainsQuery, useGetHostingProjectsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useCreateHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, splitHostPortInput, validateHostPort, useCreateVirtualMachineNetworkPolicyMutation, useUpdateVirtualMachineNetworkPolicyMutation, VIRTUAL_MACHINE_MAX_POLICY_HOSTS, getVirtualMachineApiError, useDeleteVirtualMachineNetworkPolicyMutation, extractBoundMentorIds, useCreateVirtualMachineSecretMutation, useUpdateVirtualMachineSecretMutation, VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH, VIRTUAL_MACHINE_ENV_VAR_PATTERN, useDeleteVirtualMachineSecretMutation, useGetIntegrationCredentialsQuery, useListVirtualMachineNetworkPoliciesQuery, useListVirtualMachineSecretsQuery, getVirtualMachineErrorStatus, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetTenantChatPrivacyConfigQuery as useGetTenantChatPrivacyConfigQuery$1, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, chatPrivacyApiSlice, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetSpendCapStatusQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useDeleteLtiMentorMutation, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useGetDisclaimerAgreementsQuery, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
6
6
  import { removeAuthItem, setAuthItem, isTauriEmbeddedLLMHost, selectRbacPermissions, useCurrentTenant, canViewOtherUsersChatHistory, isPureWatcher, getInitials, useTenantMetadata, useUsername, selectStreaming, isLoggedIn, TOOL_NAME_MAP, WRITE_TODOS_TOOL, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, useTenantContext, TimeTracker, advancedTabsProperties, defaultSessionIds, pickWritableFields, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$3, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, use401TokenRefresh, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
7
7
  import { useDispatch, useSelector } from 'react-redux';
8
8
  import { toast } from 'sonner';
@@ -98407,7 +98407,9 @@ var datasetsTabAddResourceModal$3 = {
98407
98407
  title: "Add Resources",
98408
98408
  description: "Add knowledge to help your agent provide more relevant insights. Others with edit access can reuse these sources for more topics.",
98409
98409
  googleDrivePickerError: "Google Drive Picker Error",
98410
- forceClosePicker: "Force Close Picker"
98410
+ forceClosePicker: "Force Close Picker",
98411
+ notConfigured: "Not configured for this tenant",
98412
+ scrollRegionAriaLabel: "Resource types"
98411
98413
  };
98412
98414
  var datasetsTabDatasetItem$3 = {
98413
98415
  scheduleRetrain: "Schedule retrain",
@@ -99784,7 +99786,9 @@ var profileAccount$3 = {
99784
99786
  groupSystem: "System",
99785
99787
  ariaSettingsNav: "Organization settings",
99786
99788
  ariaSettingsNavMobile: "Organization settings (mobile)",
99787
- groupFinance: "Finance"
99789
+ groupFinance: "Finance",
99790
+ tabVirtualMachine: "Virtual Machine",
99791
+ descVirtualMachine: "Manage the network policies and secrets available to agents' virtual machines."
99788
99792
  };
99789
99793
  var profileAddCreditsModal$3 = {
99790
99794
  title: "Add Credits",
@@ -100325,7 +100329,11 @@ var resourceModalGithubFileUploadModal$3 = {
100325
100329
  errorAddingDocument: "Error adding training document",
100326
100330
  githubRepoUrlPlaceholder: "Github Repo URL",
100327
100331
  selectBranchPlaceholder: "Select Branch",
100328
- submit: "Submit"
100332
+ submit: "Submit",
100333
+ description: "Add a GitHub repository and pick a branch to train your agent on.",
100334
+ scrollRegionAriaLabel: "Repository details",
100335
+ repoUrlLabel: "Repository URL",
100336
+ branchLabel: "Branch"
100329
100337
  };
100330
100338
  var resourceModalLocalFileUploadModal$3 = {
100331
100339
  fileNotFound: "File not found",
@@ -100339,7 +100347,9 @@ var resourceModalLocalFileUploadModal$3 = {
100339
100347
  descriptionOptional: "Description (optional)",
100340
100348
  descriptionPlaceholder: "Add a description for this image...",
100341
100349
  submitting: "Submitting",
100342
- submit: "Submit"
100350
+ submit: "Submit",
100351
+ description: "Upload a file to train your agent on its contents.",
100352
+ scrollRegionAriaLabel: "File upload"
100343
100353
  };
100344
100354
  var resourceModalUrlUploadModal$3 = {
100345
100355
  urlPlaceholder: "URL",
@@ -100348,11 +100358,15 @@ var resourceModalUrlUploadModal$3 = {
100348
100358
  invalidYoutubeUrl: "Invalid YouTube URL",
100349
100359
  invalidBlackboardUrl: "Invalid Blackboard URL",
100350
100360
  invalidUrl: "Invalid URL",
100351
- submit: "Submit"
100361
+ submit: "Submit",
100362
+ description: "Add a link to train your agent on its content.",
100363
+ scrollRegionAriaLabel: "Link details",
100364
+ urlLabel: "URL"
100352
100365
  };
100353
100366
  var resourceModalWebsiteCrawlModal$3 = {
100354
- title: "Web Crawler Configuration",
100355
100367
  description: "Configure your web crawler settings and URL patterns",
100368
+ infoBox: "Crawl a website and train your agent on its pages. Set how deep to follow links, how many pages to fetch, and which URLs to include.",
100369
+ scrollRegionAriaLabel: "Web crawler settings",
100356
100370
  formAriaLabel: "Web crawler configuration form",
100357
100371
  urlRequired: "URL is required",
100358
100372
  invalidUrl: "Invalid URL",
@@ -100367,6 +100381,9 @@ var resourceModalWebsiteCrawlModal$3 = {
100367
100381
  selectPatternTypeAriaLabel: "Select pattern type",
100368
100382
  globPattern: "Glob Pattern",
100369
100383
  regularExpression: "Regular Expression",
100384
+ userAgentLabel: "User-Agent (optional)",
100385
+ userAgentPlaceholder: "Iblai-bot/1.0 (+https://ibl.ai/bot)",
100386
+ userAgentHelpText: "Optional. Overrides the default crawler User-Agent for every request. Leave blank to use the default.",
100370
100387
  crawlerMatchPatternsLabel: "Crawler Match Patterns",
100371
100388
  globPlaceholder: "https://example.com/",
100372
100389
  regexPlaceholder: "(http|https)://www.example.com/(.*)",
@@ -101571,8 +101588,8 @@ var uiSidebar$3 = {
101571
101588
  var userProfileDropdownIndex$3 = {
101572
101589
  profile: "Profile",
101573
101590
  account: "Account",
101574
- learner: "Learner",
101575
- instructor: "Instructor",
101591
+ learner: "User",
101592
+ instructor: "Admin",
101576
101593
  help: "Help",
101577
101594
  logOut: "Log Out",
101578
101595
  moreOptions: "More options"
@@ -103109,6 +103126,177 @@ var profileLlmUsage$3 = {
103109
103126
  tryAgain: "Try again",
103110
103127
  scopeUser: "Usage for {username}"
103111
103128
  };
103129
+ var virtualMachineHostInput$3 = {
103130
+ listLabel: "Allowed Hosts",
103131
+ removeHost: "Remove {host}",
103132
+ placeholder: "api.example.com:443",
103133
+ hint: "Type host:port and press Enter, or paste a list.",
103134
+ errorFormat: "{entry} must be host:port, for example api.example.com:443 — no scheme, path or wildcard.",
103135
+ errorPort: "{entry}: the port must be between 1 and 65535.",
103136
+ errorRejectedHost: "{entry}: this host is reserved and cannot be allowed.",
103137
+ errorIpNotAllowed: "{entry}: use a hostname here, not an IP address.",
103138
+ errorDuplicate: "{entry} is already in the list.",
103139
+ errorMax: "You can add at most {max} hosts."
103140
+ };
103141
+ var virtualMachineAdminTab$3 = {
103142
+ infoBox: "Agents with Virtual Machine Shell run code in an isolated Linux VM that has no network access by default. Network policies are reusable lists of the host:port destinations a VM may reach, and VM secrets are keys the VM can use but never read. Pick them for an agent from its Sandbox settings.",
103143
+ tabsAriaLabel: "Virtual machine sections",
103144
+ tabNetworkPolicies: "Network Policies",
103145
+ tabSecrets: "Secrets",
103146
+ forbidden: "You do not have permission to manage virtual machine network policies or secrets."
103147
+ };
103148
+ var virtualMachineNetworkPolicies$3 = {
103149
+ newPolicy: "New Policy",
103150
+ loadFailed: "Network policies could not be loaded. Try again in a moment.",
103151
+ colName: "Name",
103152
+ colHosts: "Allowed Hosts",
103153
+ colDescription: "Description",
103154
+ colUpdated: "Updated",
103155
+ colActions: "Actions",
103156
+ hostsListAriaLabel: "Hosts allowed by {name}",
103157
+ moreHosts: "+{count} more",
103158
+ editAriaLabel: "Edit policy {name}",
103159
+ deleteAriaLabel: "Delete policy {name}",
103160
+ empty: "No network policies yet. Create one to let an agent's VM reach specific hosts.",
103161
+ createTitle: "New Network Policy",
103162
+ editTitle: "Edit Network Policy",
103163
+ dialogDescription: "The host:port destinations a VM may reach under this policy. HTTPS is port 443.",
103164
+ fieldName: "Name",
103165
+ namePlaceholder: "e.g. Acme APIs",
103166
+ fieldHosts: "Allowed Hosts",
103167
+ hostsHint: "Type host:port and press Enter, or paste a list. Up to {max} entries; IP addresses are allowed.",
103168
+ removedHostsWarning: "You are removing {hosts}. If an agent uses this policy and has a secret that is sent to one of these hosts, that secret will stop working.",
103169
+ fieldDescription: "Description (Optional)",
103170
+ descriptionPlaceholder: "What this policy is for",
103171
+ cancel: "Cancel",
103172
+ saveChanges: "Save Changes",
103173
+ createPolicy: "Create Policy",
103174
+ errorNameRequired: "Give the policy a name.",
103175
+ errorHostsRequired: "Add at least one host.",
103176
+ created: "Network policy created",
103177
+ updated: "Network policy updated",
103178
+ deleted: "Network policy deleted",
103179
+ saveFailed: "The policy could not be saved. Try again.",
103180
+ forbiddenWrite: "You do not have permission to change network policies.",
103181
+ forbiddenDelete: "You do not have permission to delete network policies.",
103182
+ deleteTitle: "Delete Network Policy",
103183
+ deleteConfirm: "Delete {name}? Agents set to the Custom profile can only use policies that still exist.",
103184
+ deleteBlockedInUse: "This policy is still used by the following agents. Move them to another policy or profile first.",
103185
+ deleteFailed: "The policy could not be deleted. Try again.",
103186
+ "delete": "Delete"
103187
+ };
103188
+ var virtualMachineSecrets$3 = {
103189
+ newSecret: "New Secret",
103190
+ loadFailed: "VM secrets could not be loaded. Try again in a moment.",
103191
+ colName: "Name",
103192
+ colEnvVar: "Variable",
103193
+ colHosts: "Allowed Hosts",
103194
+ colSource: "Source",
103195
+ colUpdated: "Updated",
103196
+ colActions: "Actions",
103197
+ hostsListAriaLabel: "Hosts {name} is sent to",
103198
+ moreHosts: "+{count} more",
103199
+ sourceStored: "Stored Value",
103200
+ sourceFromCredential: "Credential {credential} · {field}",
103201
+ editAriaLabel: "Edit secret {name}",
103202
+ deleteAriaLabel: "Delete secret {name}",
103203
+ empty: "No VM secrets yet. Create one to let an agent call an API with your organization's key without ever seeing it.",
103204
+ createTitle: "New VM Secret",
103205
+ editTitle: "Edit VM Secret",
103206
+ dialogDescription: "The value is never shown again after you save it.",
103207
+ fieldName: "Name",
103208
+ namePlaceholder: "e.g. Acme API key",
103209
+ fieldEnvVar: "Environment Variable",
103210
+ envVarPlaceholder: "e.g. ACME_KEY",
103211
+ envVarHelp: "Letters, digits and underscores; cannot start with a digit.",
103212
+ envVarReadOnlyHelp: "Cannot be renamed. Delete this secret and create a new one instead.",
103213
+ fieldHosts: "Allowed Hosts",
103214
+ hostsHint: "Only these hosts receive the real key, so keep it to the narrowest host that needs it. Type host:port and press Enter.",
103215
+ fieldSource: "Value Source",
103216
+ sourceValue: "Enter a Value",
103217
+ sourceValueDescription: "Stored encrypted and never shown again.",
103218
+ sourceCredential: "Use an Integration Credential",
103219
+ sourceCredentialDescription: "Reads one field of a saved credential and follows rotations automatically.",
103220
+ fieldValue: "Value",
103221
+ valuePlaceholder: "Paste the key",
103222
+ valueKeepPlaceholder: "Leave blank to keep the current value",
103223
+ valueHelp: "At least {min} characters.",
103224
+ valueKeepHelp: "Leave blank to keep the current value.",
103225
+ fieldCredential: "Integration Credential",
103226
+ credentialPlaceholder: "Choose a credential",
103227
+ noCredentials: "Your organization has no integration credentials yet. Add one under Integrations, or enter a value instead.",
103228
+ fieldCredentialField: "Credential Field",
103229
+ credentialFieldPlaceholder: "Choose a field",
103230
+ credentialNoFields: "This credential has no fields to read from.",
103231
+ cancel: "Cancel",
103232
+ saveChanges: "Save Changes",
103233
+ createSecret: "Create Secret",
103234
+ errorNameRequired: "Give the secret a name.",
103235
+ errorEnvVarRequired: "Enter the environment variable name.",
103236
+ errorEnvVarFormat: "Use letters, digits and underscores only, and do not start with a digit.",
103237
+ errorHostsRequired: "Add at least one host.",
103238
+ errorValueRequired: "Enter the value.",
103239
+ errorValueTooShort: "The value must be at least {min} characters.",
103240
+ errorValueMasked: "This looks like a masked value. Paste the real key.",
103241
+ errorCredentialRequired: "Choose a credential.",
103242
+ errorFieldRequired: "Choose the credential field.",
103243
+ created: "VM secret created",
103244
+ updated: "VM secret updated",
103245
+ deleted: "VM secret deleted",
103246
+ saveFailed: "The secret could not be saved. Try again.",
103247
+ forbiddenWrite: "You do not have permission to change VM secrets.",
103248
+ forbiddenDelete: "You do not have permission to delete VM secrets.",
103249
+ deleteTitle: "Delete VM Secret",
103250
+ deleteConfirm: "Delete {envVar}? It will also be removed from every agent that uses it.",
103251
+ deleteFailed: "The secret could not be deleted. Try again.",
103252
+ "delete": "Delete"
103253
+ };
103254
+ var virtualMachineNetworkSection$3 = {
103255
+ title: "Network Access",
103256
+ description: "Decide what this agent's virtual machine can reach and which credentials it can use.",
103257
+ billingNotice: "Virtual machine time is billed to the chatting user's credits: ${usd} per {minutes} minutes by default, prorated per second. Your organization's rate may differ.",
103258
+ egressLabel: "Egress Profile",
103259
+ egressHelp: "How much of the network the VM gets.",
103260
+ egressNoneLabel: "No Network",
103261
+ egressNoneDescription: "The VM cannot reach anything.",
103262
+ egressRegistriesLabel: "Package Registries",
103263
+ egressRegistriesDescription: "PyPI, npm, apt and apk only, for installing packages.",
103264
+ egressPublicLabel: "Public Internet",
103265
+ egressPublicDescription: "Any public host. Private networks, localhost and cloud metadata stay blocked.",
103266
+ egressCustomLabel: "Custom Allowlist",
103267
+ egressCustomDescription: "Only the hosts in the network policy you pick below.",
103268
+ policyLabel: "Network Policy",
103269
+ policiesForbidden: "You do not have permission to view network policies, so this profile cannot be configured from here.",
103270
+ noPolicies: "No network policies yet",
103271
+ policyPlaceholder: "Choose a policy",
103272
+ createPolicy: "Create Policy",
103273
+ editPolicy: "Edit Policy",
103274
+ managePolicies: "Manage Policies",
103275
+ manageSecrets: "Manage Secrets",
103276
+ policyRequired: "The Custom profile needs a network policy.",
103277
+ policyHosts: "Hosts this policy allows:",
103278
+ secretsLabel: "Secrets",
103279
+ secretsHelp: "Keys the VM can use but never read. Up to {max} per agent.",
103280
+ noSecrets: "Your organization has no VM secrets yet. Use Manage Secrets to create one.",
103281
+ secretsCapReached: "This agent has the maximum of {max} secrets.",
103282
+ uncoveredTitle: "Some secrets are sent to hosts this policy does not allow:",
103283
+ uncoveredItem: "{envVar} needs {hosts}, which {policy} doesn't allow.",
103284
+ addHostsAndSave: "Add Hosts to {policy} and Save",
103285
+ saved: "Network settings saved",
103286
+ saveFailed: "The network settings could not be saved. Try again.",
103287
+ forbiddenSave: "You do not have permission to change these settings.",
103288
+ policyHostsAdded: "Hosts added to {policy}",
103289
+ policyUpdateFailed: "The policy could not be updated, so the settings were not saved.",
103290
+ policyUpdateForbidden: "You do not have permission to change network policies, so the settings were not saved.",
103291
+ discard: "Discard",
103292
+ save: "Save Changes",
103293
+ narrowTitle: "Unbind Secrets?",
103294
+ narrowDescription: "{profile} gives the VM no access to the hosts these secrets need, so saving will unbind {count, plural, one {# secret} other {# secrets}} from this agent.",
103295
+ cancel: "Cancel",
103296
+ narrowConfirm: "Unbind and Save",
103297
+ manageTitle: "Virtual Machine Settings",
103298
+ manageDescription: "Network policies and VM secrets are shared by every agent in your organization."
103299
+ };
103112
103300
  var en = {
103113
103301
  accessTabAddAccess: accessTabAddAccess$3,
103114
103302
  accessTabLabels: accessTabLabels$3,
@@ -103394,7 +103582,12 @@ var en = {
103394
103582
  analyticsCostTabs: analyticsCostTabs$3,
103395
103583
  analyticsLlmUsage: analyticsLlmUsage$3,
103396
103584
  analyticsTraces: analyticsTraces$3,
103397
- profileLlmUsage: profileLlmUsage$3
103585
+ profileLlmUsage: profileLlmUsage$3,
103586
+ virtualMachineHostInput: virtualMachineHostInput$3,
103587
+ virtualMachineAdminTab: virtualMachineAdminTab$3,
103588
+ virtualMachineNetworkPolicies: virtualMachineNetworkPolicies$3,
103589
+ virtualMachineSecrets: virtualMachineSecrets$3,
103590
+ virtualMachineNetworkSection: virtualMachineNetworkSection$3
103398
103591
  };
103399
103592
 
103400
103593
  var accessTabAddAccess$2 = {
@@ -105896,7 +106089,9 @@ var datasetsTabAddResourceModal$2 = {
105896
106089
  title: "Ajouter des ressources",
105897
106090
  description: "Ajoutez des connaissances pour aider votre agent à fournir des informations plus pertinentes. Les autres utilisateurs avec accès en modification peuvent réutiliser ces sources pour d'autres sujets.",
105898
106091
  googleDrivePickerError: "Erreur du sélecteur Google Drive",
105899
- forceClosePicker: "Forcer la fermeture du sélecteur"
106092
+ forceClosePicker: "Forcer la fermeture du sélecteur",
106093
+ notConfigured: "Non configuré pour ce locataire",
106094
+ scrollRegionAriaLabel: "Types de ressources"
105900
106095
  };
105901
106096
  var datasetsTabDatasetItem$2 = {
105902
106097
  scheduleRetrain: "Planifier le réentraînement",
@@ -107273,7 +107468,9 @@ var profileAccount$2 = {
107273
107468
  groupSystem: "Système",
107274
107469
  ariaSettingsNav: "Paramètres de l'organisation",
107275
107470
  ariaSettingsNavMobile: "Paramètres de l'organisation (mobile)",
107276
- groupFinance: "Finance"
107471
+ groupFinance: "Finance",
107472
+ tabVirtualMachine: "Machine virtuelle",
107473
+ descVirtualMachine: "Gérez les politiques réseau et les secrets disponibles pour les machines virtuelles des agents."
107277
107474
  };
107278
107475
  var profileAddCreditsModal$2 = {
107279
107476
  title: "Ajouter des crédits",
@@ -107814,7 +108011,11 @@ var resourceModalGithubFileUploadModal$2 = {
107814
108011
  errorAddingDocument: "Erreur lors de l'ajout du document d'entraînement",
107815
108012
  githubRepoUrlPlaceholder: "URL du dépôt GitHub",
107816
108013
  selectBranchPlaceholder: "Sélectionner une branche",
107817
- submit: "Soumettre"
108014
+ submit: "Soumettre",
108015
+ description: "Ajoutez un dépôt GitHub et choisissez une branche pour entraîner votre agent.",
108016
+ scrollRegionAriaLabel: "Détails du dépôt",
108017
+ repoUrlLabel: "URL du dépôt",
108018
+ branchLabel: "Branche"
107818
108019
  };
107819
108020
  var resourceModalLocalFileUploadModal$2 = {
107820
108021
  fileNotFound: "Fichier introuvable",
@@ -107828,7 +108029,9 @@ var resourceModalLocalFileUploadModal$2 = {
107828
108029
  descriptionOptional: "Description (facultative)",
107829
108030
  descriptionPlaceholder: "Ajoutez une description pour cette image...",
107830
108031
  submitting: "Envoi en cours",
107831
- submit: "Soumettre"
108032
+ submit: "Soumettre",
108033
+ description: "Importez un fichier pour entraîner votre agent sur son contenu.",
108034
+ scrollRegionAriaLabel: "Import de fichier"
107832
108035
  };
107833
108036
  var resourceModalUrlUploadModal$2 = {
107834
108037
  urlPlaceholder: "URL",
@@ -107837,11 +108040,15 @@ var resourceModalUrlUploadModal$2 = {
107837
108040
  invalidYoutubeUrl: "URL YouTube invalide",
107838
108041
  invalidBlackboardUrl: "URL Blackboard invalide",
107839
108042
  invalidUrl: "URL invalide",
107840
- submit: "Soumettre"
108043
+ submit: "Soumettre",
108044
+ description: "Ajoutez un lien pour entraîner votre agent sur son contenu.",
108045
+ scrollRegionAriaLabel: "Détails du lien",
108046
+ urlLabel: "URL"
107841
108047
  };
107842
108048
  var resourceModalWebsiteCrawlModal$2 = {
107843
- title: "Configuration du robot d'exploration web",
107844
108049
  description: "Configurez les paramètres et les modèles d'URL de votre robot d'exploration web",
108050
+ infoBox: "Explorez un site web et entraînez votre agent sur ses pages. Définissez la profondeur des liens, le nombre de pages à récupérer et les URL à inclure.",
108051
+ scrollRegionAriaLabel: "Paramètres du robot d'exploration",
107845
108052
  formAriaLabel: "Formulaire de configuration du robot d'exploration web",
107846
108053
  urlRequired: "L'URL est requise",
107847
108054
  invalidUrl: "URL invalide",
@@ -107856,6 +108063,9 @@ var resourceModalWebsiteCrawlModal$2 = {
107856
108063
  selectPatternTypeAriaLabel: "Sélectionner le type de modèle",
107857
108064
  globPattern: "Modèle Glob",
107858
108065
  regularExpression: "Expression régulière",
108066
+ userAgentLabel: "User-Agent (facultatif)",
108067
+ userAgentPlaceholder: "Iblai-bot/1.0 (+https://ibl.ai/bot)",
108068
+ userAgentHelpText: "Facultatif. Remplace le User-Agent par défaut du robot d'exploration pour chaque requête. Laissez vide pour utiliser celui par défaut.",
107859
108069
  crawlerMatchPatternsLabel: "Modèles de correspondance du robot",
107860
108070
  globPlaceholder: "https://example.com/",
107861
108071
  regexPlaceholder: "(http|https)://www.example.com/(.*)",
@@ -109060,8 +109270,8 @@ var uiSidebar$2 = {
109060
109270
  var userProfileDropdownIndex$2 = {
109061
109271
  profile: "Profil",
109062
109272
  account: "Compte",
109063
- learner: "Apprenant",
109064
- instructor: "Instructeur",
109273
+ learner: "Utilisateur",
109274
+ instructor: "Administrateur",
109065
109275
  help: "Aide",
109066
109276
  logOut: "Se déconnecter",
109067
109277
  moreOptions: "Plus d'options"
@@ -110432,6 +110642,177 @@ var profileLlmUsage$2 = {
110432
110642
  tryAgain: "Réessayer",
110433
110643
  scopeUser: "Utilisation de {username}"
110434
110644
  };
110645
+ var virtualMachineHostInput$2 = {
110646
+ listLabel: "Hôtes autorisés",
110647
+ removeHost: "Retirer {host}",
110648
+ placeholder: "api.exemple.com:443",
110649
+ hint: "Saisissez hôte:port et appuyez sur Entrée, ou collez une liste.",
110650
+ errorFormat: "{entry} doit être au format hôte:port, par exemple api.exemple.com:443, sans schéma, chemin ni joker.",
110651
+ errorPort: "{entry} : le port doit être compris entre 1 et 65535.",
110652
+ errorRejectedHost: "{entry} : cet hôte est réservé et ne peut pas être autorisé.",
110653
+ errorIpNotAllowed: "{entry} : utilisez ici un nom d'hôte, pas une adresse IP.",
110654
+ errorDuplicate: "{entry} figure déjà dans la liste.",
110655
+ errorMax: "Vous pouvez ajouter au plus {max} hôtes."
110656
+ };
110657
+ var virtualMachineAdminTab$2 = {
110658
+ infoBox: "Les agents dotés du Shell de machine virtuelle exécutent du code dans une VM Linux isolée, sans accès réseau par défaut. Les politiques réseau sont des listes réutilisables de destinations hôte:port qu'une VM peut joindre, et les secrets de VM sont des clés que la VM peut utiliser sans jamais les lire. Sélectionnez-les pour un agent depuis ses paramètres Sandbox.",
110659
+ tabsAriaLabel: "Sections de la machine virtuelle",
110660
+ tabNetworkPolicies: "Politiques réseau",
110661
+ tabSecrets: "Secrets",
110662
+ forbidden: "Vous n'avez pas l'autorisation de gérer les politiques réseau ni les secrets des machines virtuelles."
110663
+ };
110664
+ var virtualMachineNetworkPolicies$2 = {
110665
+ newPolicy: "Nouvelle politique",
110666
+ loadFailed: "Impossible de charger les politiques réseau. Réessayez dans un instant.",
110667
+ colName: "Nom",
110668
+ colHosts: "Hôtes autorisés",
110669
+ colDescription: "Description",
110670
+ colUpdated: "Mise à jour",
110671
+ colActions: "Actions",
110672
+ hostsListAriaLabel: "Hôtes autorisés par {name}",
110673
+ moreHosts: "+{count} de plus",
110674
+ editAriaLabel: "Modifier la politique {name}",
110675
+ deleteAriaLabel: "Supprimer la politique {name}",
110676
+ empty: "Aucune politique réseau pour l'instant. Créez-en une pour que la VM d'un agent puisse joindre des hôtes précis.",
110677
+ createTitle: "Nouvelle politique réseau",
110678
+ editTitle: "Modifier la politique réseau",
110679
+ dialogDescription: "Les destinations hôte:port qu'une VM peut joindre avec cette politique. HTTPS correspond au port 443.",
110680
+ fieldName: "Nom",
110681
+ namePlaceholder: "p. ex. API Acme",
110682
+ fieldHosts: "Hôtes autorisés",
110683
+ hostsHint: "Saisissez hôte:port et appuyez sur Entrée, ou collez une liste. Jusqu'à {max} entrées ; les adresses IP sont acceptées.",
110684
+ removedHostsWarning: "Vous retirez {hosts}. Si un agent utilise cette politique et possède un secret envoyé à l'un de ces hôtes, ce secret cessera de fonctionner.",
110685
+ fieldDescription: "Description (facultatif)",
110686
+ descriptionPlaceholder: "À quoi sert cette politique",
110687
+ cancel: "Annuler",
110688
+ saveChanges: "Enregistrer les modifications",
110689
+ createPolicy: "Créer la politique",
110690
+ errorNameRequired: "Donnez un nom à la politique.",
110691
+ errorHostsRequired: "Ajoutez au moins un hôte.",
110692
+ created: "Politique réseau créée",
110693
+ updated: "Politique réseau mise à jour",
110694
+ deleted: "Politique réseau supprimée",
110695
+ saveFailed: "La politique n'a pas pu être enregistrée. Réessayez.",
110696
+ forbiddenWrite: "Vous n'avez pas l'autorisation de modifier les politiques réseau.",
110697
+ forbiddenDelete: "Vous n'avez pas l'autorisation de supprimer les politiques réseau.",
110698
+ deleteTitle: "Supprimer la politique réseau",
110699
+ deleteConfirm: "Supprimer {name} ? Les agents en profil Personnalisé ne peuvent utiliser que des politiques existantes.",
110700
+ deleteBlockedInUse: "Cette politique est encore utilisée par les agents suivants. Passez-les d'abord sur une autre politique ou un autre profil.",
110701
+ deleteFailed: "La politique n'a pas pu être supprimée. Réessayez.",
110702
+ "delete": "Supprimer"
110703
+ };
110704
+ var virtualMachineSecrets$2 = {
110705
+ newSecret: "Nouveau secret",
110706
+ loadFailed: "Impossible de charger les secrets de VM. Réessayez dans un instant.",
110707
+ colName: "Nom",
110708
+ colEnvVar: "Variable",
110709
+ colHosts: "Hôtes autorisés",
110710
+ colSource: "Source",
110711
+ colUpdated: "Mis à jour",
110712
+ colActions: "Actions",
110713
+ hostsListAriaLabel: "Hôtes auxquels {name} est envoyé",
110714
+ moreHosts: "+{count} de plus",
110715
+ sourceStored: "Valeur enregistrée",
110716
+ sourceFromCredential: "Identifiant {credential} · {field}",
110717
+ editAriaLabel: "Modifier le secret {name}",
110718
+ deleteAriaLabel: "Supprimer le secret {name}",
110719
+ empty: "Aucun secret de VM pour l'instant. Créez-en un pour qu'un agent appelle une API avec la clé de votre organisation sans jamais la voir.",
110720
+ createTitle: "Nouveau secret de VM",
110721
+ editTitle: "Modifier le secret de VM",
110722
+ dialogDescription: "La valeur n'est plus jamais affichée après l'enregistrement.",
110723
+ fieldName: "Nom",
110724
+ namePlaceholder: "p. ex. Clé API Acme",
110725
+ fieldEnvVar: "Variable d'environnement",
110726
+ envVarPlaceholder: "p. ex. ACME_KEY",
110727
+ envVarHelp: "Lettres, chiffres et tirets bas ; ne peut pas commencer par un chiffre.",
110728
+ envVarReadOnlyHelp: "Ne peut pas être renommée. Supprimez ce secret et créez-en un nouveau.",
110729
+ fieldHosts: "Hôtes autorisés",
110730
+ hostsHint: "Seuls ces hôtes reçoivent la vraie clé ; limitez la liste à l'hôte le plus précis qui en a besoin. Saisissez hôte:port et appuyez sur Entrée.",
110731
+ fieldSource: "Source de la valeur",
110732
+ sourceValue: "Saisir une valeur",
110733
+ sourceValueDescription: "Stockée chiffrée et jamais réaffichée.",
110734
+ sourceCredential: "Utiliser un identifiant d'intégration",
110735
+ sourceCredentialDescription: "Lit un champ d'un identifiant enregistré et suit automatiquement les rotations.",
110736
+ fieldValue: "Valeur",
110737
+ valuePlaceholder: "Collez la clé",
110738
+ valueKeepPlaceholder: "Laissez vide pour conserver la valeur actuelle",
110739
+ valueHelp: "Au moins {min} caractères.",
110740
+ valueKeepHelp: "Laissez vide pour conserver la valeur actuelle.",
110741
+ fieldCredential: "Identifiant d'intégration",
110742
+ credentialPlaceholder: "Choisissez un identifiant",
110743
+ noCredentials: "Votre organisation n'a pas encore d'identifiants d'intégration. Ajoutez-en un dans Intégrations, ou saisissez une valeur.",
110744
+ fieldCredentialField: "Champ de l'identifiant",
110745
+ credentialFieldPlaceholder: "Choisissez un champ",
110746
+ credentialNoFields: "Cet identifiant n'a aucun champ à lire.",
110747
+ cancel: "Annuler",
110748
+ saveChanges: "Enregistrer les modifications",
110749
+ createSecret: "Créer le secret",
110750
+ errorNameRequired: "Donnez un nom au secret.",
110751
+ errorEnvVarRequired: "Saisissez le nom de la variable d'environnement.",
110752
+ errorEnvVarFormat: "Utilisez uniquement des lettres, des chiffres et des tirets bas, sans commencer par un chiffre.",
110753
+ errorHostsRequired: "Ajoutez au moins un hôte.",
110754
+ errorValueRequired: "Saisissez la valeur.",
110755
+ errorValueTooShort: "La valeur doit contenir au moins {min} caractères.",
110756
+ errorValueMasked: "Cela ressemble à une valeur masquée. Collez la vraie clé.",
110757
+ errorCredentialRequired: "Choisissez un identifiant.",
110758
+ errorFieldRequired: "Choisissez le champ de l'identifiant.",
110759
+ created: "Secret de VM créé",
110760
+ updated: "Secret de VM mis à jour",
110761
+ deleted: "Secret de VM supprimé",
110762
+ saveFailed: "Le secret n'a pas pu être enregistré. Réessayez.",
110763
+ forbiddenWrite: "Vous n'avez pas l'autorisation de modifier les secrets de VM.",
110764
+ forbiddenDelete: "Vous n'avez pas l'autorisation de supprimer les secrets de VM.",
110765
+ deleteTitle: "Supprimer le secret de VM",
110766
+ deleteConfirm: "Supprimer {envVar} ? Il sera aussi retiré de tous les agents qui l'utilisent.",
110767
+ deleteFailed: "Le secret n'a pas pu être supprimé. Réessayez.",
110768
+ "delete": "Supprimer"
110769
+ };
110770
+ var virtualMachineNetworkSection$2 = {
110771
+ title: "Accès réseau",
110772
+ description: "Décidez ce que la machine virtuelle de cet agent peut joindre et quels identifiants elle peut utiliser.",
110773
+ billingNotice: "Le temps de machine virtuelle est facturé sur les crédits de l'utilisateur qui discute : ${usd} par {minutes} minutes par défaut, au prorata de la seconde. Le tarif de votre organisation peut différer.",
110774
+ egressLabel: "Profil de sortie",
110775
+ egressHelp: "Quelle part du réseau la VM obtient.",
110776
+ egressNoneLabel: "Aucun réseau",
110777
+ egressNoneDescription: "La VM ne peut rien joindre.",
110778
+ egressRegistriesLabel: "Registres de paquets",
110779
+ egressRegistriesDescription: "PyPI, npm, apt et apk uniquement, pour installer des paquets.",
110780
+ egressPublicLabel: "Internet public",
110781
+ egressPublicDescription: "Tout hôte public. Les réseaux privés, localhost et les métadonnées cloud restent bloqués.",
110782
+ egressCustomLabel: "Liste personnalisée",
110783
+ egressCustomDescription: "Uniquement les hôtes de la politique réseau choisie ci-dessous.",
110784
+ policyLabel: "Politique réseau",
110785
+ policiesForbidden: "Vous n'avez pas l'autorisation de voir les politiques réseau, ce profil ne peut donc pas être configuré d'ici.",
110786
+ noPolicies: "Aucune politique réseau pour l'instant",
110787
+ policyPlaceholder: "Choisissez une politique",
110788
+ createPolicy: "Créer une politique",
110789
+ editPolicy: "Modifier la politique",
110790
+ managePolicies: "Gérer les politiques",
110791
+ manageSecrets: "Gérer les secrets",
110792
+ policyRequired: "Le profil Personnalisé nécessite une politique réseau.",
110793
+ policyHosts: "Hôtes autorisés par cette politique :",
110794
+ secretsLabel: "Secrets",
110795
+ secretsHelp: "Clés que la VM peut utiliser sans jamais les lire. Jusqu'à {max} par agent.",
110796
+ noSecrets: "Votre organisation n'a pas encore de secrets de VM. Utilisez Gérer les secrets pour en créer un.",
110797
+ secretsCapReached: "Cet agent a atteint le maximum de {max} secrets.",
110798
+ uncoveredTitle: "Certains secrets sont envoyés à des hôtes que cette politique n'autorise pas :",
110799
+ uncoveredItem: "{envVar} a besoin de {hosts}, que {policy} n'autorise pas.",
110800
+ addHostsAndSave: "Ajouter les hôtes à {policy} et enregistrer",
110801
+ saved: "Paramètres réseau enregistrés",
110802
+ saveFailed: "Les paramètres réseau n'ont pas pu être enregistrés. Réessayez.",
110803
+ forbiddenSave: "Vous n'avez pas l'autorisation de modifier ces paramètres.",
110804
+ policyHostsAdded: "Hôtes ajoutés à {policy}",
110805
+ policyUpdateFailed: "La politique n'a pas pu être mise à jour, les paramètres n'ont donc pas été enregistrés.",
110806
+ policyUpdateForbidden: "Vous n'avez pas l'autorisation de modifier les politiques réseau, les paramètres n'ont donc pas été enregistrés.",
110807
+ discard: "Annuler les modifications",
110808
+ save: "Enregistrer les modifications",
110809
+ narrowTitle: "Détacher les secrets ?",
110810
+ narrowDescription: "{profile} ne donne à la VM aucun accès aux hôtes dont ces secrets ont besoin ; l'enregistrement détachera donc {count, plural, one {# secret} other {# secrets}} de cet agent.",
110811
+ cancel: "Annuler",
110812
+ narrowConfirm: "Détacher et enregistrer",
110813
+ manageTitle: "Paramètres de la machine virtuelle",
110814
+ manageDescription: "Les politiques réseau et les secrets de VM sont partagés par tous les agents de votre organisation."
110815
+ };
110435
110816
  var fr = {
110436
110817
  accessTabAddAccess: accessTabAddAccess$2,
110437
110818
  accessTabLabels: accessTabLabels$2,
@@ -110717,7 +111098,12 @@ var fr = {
110717
111098
  analyticsCostTabs: analyticsCostTabs$2,
110718
111099
  analyticsLlmUsage: analyticsLlmUsage$2,
110719
111100
  analyticsTraces: analyticsTraces$2,
110720
- profileLlmUsage: profileLlmUsage$2
111101
+ profileLlmUsage: profileLlmUsage$2,
111102
+ virtualMachineHostInput: virtualMachineHostInput$2,
111103
+ virtualMachineAdminTab: virtualMachineAdminTab$2,
111104
+ virtualMachineNetworkPolicies: virtualMachineNetworkPolicies$2,
111105
+ virtualMachineSecrets: virtualMachineSecrets$2,
111106
+ virtualMachineNetworkSection: virtualMachineNetworkSection$2
110721
111107
  };
110722
111108
 
110723
111109
  var accessTabAddAccess$1 = {
@@ -113219,7 +113605,9 @@ var datasetsTabAddResourceModal$1 = {
113219
113605
  title: "Agregar recursos",
113220
113606
  description: "Agregue conocimiento para ayudar a su agente a proporcionar información más relevante. Otros usuarios con acceso de edición pueden reutilizar estas fuentes para más temas.",
113221
113607
  googleDrivePickerError: "Error del selector de Google Drive",
113222
- forceClosePicker: "Forzar cierre del selector"
113608
+ forceClosePicker: "Forzar cierre del selector",
113609
+ notConfigured: "No configurado para este inquilino",
113610
+ scrollRegionAriaLabel: "Tipos de recursos"
113223
113611
  };
113224
113612
  var datasetsTabDatasetItem$1 = {
113225
113613
  scheduleRetrain: "Programar reentrenamiento",
@@ -114596,7 +114984,9 @@ var profileAccount$1 = {
114596
114984
  groupSystem: "Sistema",
114597
114985
  ariaSettingsNav: "Configuración de la organización",
114598
114986
  ariaSettingsNavMobile: "Configuración de la organización (móvil)",
114599
- groupFinance: "Finanzas"
114987
+ groupFinance: "Finanzas",
114988
+ tabVirtualMachine: "Máquina virtual",
114989
+ descVirtualMachine: "Gestiona las políticas de red y los secretos disponibles para las máquinas virtuales de los agentes."
114600
114990
  };
114601
114991
  var profileAddCreditsModal$1 = {
114602
114992
  title: "Agregar créditos",
@@ -115137,7 +115527,11 @@ var resourceModalGithubFileUploadModal$1 = {
115137
115527
  errorAddingDocument: "Error al agregar el documento de entrenamiento",
115138
115528
  githubRepoUrlPlaceholder: "URL del repositorio de GitHub",
115139
115529
  selectBranchPlaceholder: "Seleccionar rama",
115140
- submit: "Enviar"
115530
+ submit: "Enviar",
115531
+ description: "Agrega un repositorio de GitHub y elige una rama para entrenar a tu agente.",
115532
+ scrollRegionAriaLabel: "Detalles del repositorio",
115533
+ repoUrlLabel: "URL del repositorio",
115534
+ branchLabel: "Rama"
115141
115535
  };
115142
115536
  var resourceModalLocalFileUploadModal$1 = {
115143
115537
  fileNotFound: "Archivo no encontrado",
@@ -115151,7 +115545,9 @@ var resourceModalLocalFileUploadModal$1 = {
115151
115545
  descriptionOptional: "Descripción (opcional)",
115152
115546
  descriptionPlaceholder: "Añade una descripción para esta imagen...",
115153
115547
  submitting: "Enviando",
115154
- submit: "Enviar"
115548
+ submit: "Enviar",
115549
+ description: "Sube un archivo para entrenar a tu agente con su contenido.",
115550
+ scrollRegionAriaLabel: "Carga de archivo"
115155
115551
  };
115156
115552
  var resourceModalUrlUploadModal$1 = {
115157
115553
  urlPlaceholder: "URL",
@@ -115160,11 +115556,15 @@ var resourceModalUrlUploadModal$1 = {
115160
115556
  invalidYoutubeUrl: "URL de YouTube no válida",
115161
115557
  invalidBlackboardUrl: "URL de Blackboard no válida",
115162
115558
  invalidUrl: "URL no válida",
115163
- submit: "Enviar"
115559
+ submit: "Enviar",
115560
+ description: "Agrega un enlace para entrenar a tu agente con su contenido.",
115561
+ scrollRegionAriaLabel: "Detalles del enlace",
115562
+ urlLabel: "URL"
115164
115563
  };
115165
115564
  var resourceModalWebsiteCrawlModal$1 = {
115166
- title: "Configuración del rastreador web",
115167
115565
  description: "Configure los ajustes de su rastreador web y los patrones de URL",
115566
+ infoBox: "Rastrea un sitio web y entrena a tu agente con sus páginas. Define la profundidad de los enlaces, cuántas páginas obtener y qué URL incluir.",
115567
+ scrollRegionAriaLabel: "Configuración del rastreador web",
115168
115568
  formAriaLabel: "Formulario de configuración del rastreador web",
115169
115569
  urlRequired: "La URL es obligatoria",
115170
115570
  invalidUrl: "URL no válida",
@@ -115179,6 +115579,9 @@ var resourceModalWebsiteCrawlModal$1 = {
115179
115579
  selectPatternTypeAriaLabel: "Seleccionar tipo de patrón",
115180
115580
  globPattern: "Patrón Glob",
115181
115581
  regularExpression: "Expresión regular",
115582
+ userAgentLabel: "User-Agent (opcional)",
115583
+ userAgentPlaceholder: "Iblai-bot/1.0 (+https://ibl.ai/bot)",
115584
+ userAgentHelpText: "Opcional. Sustituye el User-Agent predeterminado del rastreador en cada solicitud. Déjalo en blanco para usar el predeterminado.",
115182
115585
  crawlerMatchPatternsLabel: "Patrones de coincidencia del rastreador",
115183
115586
  globPlaceholder: "https://example.com/",
115184
115587
  regexPlaceholder: "(http|https)://www.example.com/(.*)",
@@ -116383,8 +116786,8 @@ var uiSidebar$1 = {
116383
116786
  var userProfileDropdownIndex$1 = {
116384
116787
  profile: "Perfil",
116385
116788
  account: "Cuenta",
116386
- learner: "Estudiante",
116387
- instructor: "Instructor",
116789
+ learner: "Usuario",
116790
+ instructor: "Administrador",
116388
116791
  help: "Ayuda",
116389
116792
  logOut: "Cerrar sesión",
116390
116793
  moreOptions: "Más opciones"
@@ -117755,6 +118158,177 @@ var profileLlmUsage$1 = {
117755
118158
  tryAgain: "Intentar de nuevo",
117756
118159
  scopeUser: "Uso de {username}"
117757
118160
  };
118161
+ var virtualMachineHostInput$1 = {
118162
+ listLabel: "Hosts permitidos",
118163
+ removeHost: "Quitar {host}",
118164
+ placeholder: "api.ejemplo.com:443",
118165
+ hint: "Escribe host:puerto y pulsa Intro, o pega una lista.",
118166
+ errorFormat: "{entry} debe tener el formato host:puerto, por ejemplo api.ejemplo.com:443, sin esquema, ruta ni comodín.",
118167
+ errorPort: "{entry}: el puerto debe estar entre 1 y 65535.",
118168
+ errorRejectedHost: "{entry}: este host está reservado y no se puede permitir.",
118169
+ errorIpNotAllowed: "{entry}: usa aquí un nombre de host, no una dirección IP.",
118170
+ errorDuplicate: "{entry} ya está en la lista.",
118171
+ errorMax: "Puedes añadir como máximo {max} hosts."
118172
+ };
118173
+ var virtualMachineAdminTab$1 = {
118174
+ infoBox: "Los agentes con Shell de máquina virtual ejecutan código en una VM Linux aislada que, por defecto, no tiene acceso a la red. Las políticas de red son listas reutilizables de destinos host:puerto a los que una VM puede llegar, y los secretos de VM son claves que la VM puede usar pero nunca leer. Elígelos para un agente desde su configuración de Sandbox.",
118175
+ tabsAriaLabel: "Secciones de máquina virtual",
118176
+ tabNetworkPolicies: "Políticas de red",
118177
+ tabSecrets: "Secretos",
118178
+ forbidden: "No tienes permiso para gestionar las políticas de red ni los secretos de las máquinas virtuales."
118179
+ };
118180
+ var virtualMachineNetworkPolicies$1 = {
118181
+ newPolicy: "Nueva política",
118182
+ loadFailed: "No se pudieron cargar las políticas de red. Inténtalo de nuevo en un momento.",
118183
+ colName: "Nombre",
118184
+ colHosts: "Hosts permitidos",
118185
+ colDescription: "Descripción",
118186
+ colUpdated: "Actualizada",
118187
+ colActions: "Acciones",
118188
+ hostsListAriaLabel: "Hosts permitidos por {name}",
118189
+ moreHosts: "+{count} más",
118190
+ editAriaLabel: "Editar la política {name}",
118191
+ deleteAriaLabel: "Eliminar la política {name}",
118192
+ empty: "Todavía no hay políticas de red. Crea una para que la VM de un agente pueda llegar a hosts concretos.",
118193
+ createTitle: "Nueva política de red",
118194
+ editTitle: "Editar política de red",
118195
+ dialogDescription: "Los destinos host:puerto a los que una VM puede llegar con esta política. HTTPS es el puerto 443.",
118196
+ fieldName: "Nombre",
118197
+ namePlaceholder: "p. ej. APIs de Acme",
118198
+ fieldHosts: "Hosts permitidos",
118199
+ hostsHint: "Escribe host:puerto y pulsa Intro, o pega una lista. Hasta {max} entradas; se admiten direcciones IP.",
118200
+ removedHostsWarning: "Vas a quitar {hosts}. Si un agente usa esta política y tiene un secreto que se envía a uno de estos hosts, ese secreto dejará de funcionar.",
118201
+ fieldDescription: "Descripción (opcional)",
118202
+ descriptionPlaceholder: "Para qué sirve esta política",
118203
+ cancel: "Cancelar",
118204
+ saveChanges: "Guardar cambios",
118205
+ createPolicy: "Crear política",
118206
+ errorNameRequired: "Dale un nombre a la política.",
118207
+ errorHostsRequired: "Añade al menos un host.",
118208
+ created: "Política de red creada",
118209
+ updated: "Política de red actualizada",
118210
+ deleted: "Política de red eliminada",
118211
+ saveFailed: "No se pudo guardar la política. Inténtalo de nuevo.",
118212
+ forbiddenWrite: "No tienes permiso para modificar políticas de red.",
118213
+ forbiddenDelete: "No tienes permiso para eliminar políticas de red.",
118214
+ deleteTitle: "Eliminar política de red",
118215
+ deleteConfirm: "¿Eliminar {name}? Los agentes con el perfil Personalizado solo pueden usar políticas que sigan existiendo.",
118216
+ deleteBlockedInUse: "Esta política todavía la usan los siguientes agentes. Cámbialos antes a otra política o perfil.",
118217
+ deleteFailed: "No se pudo eliminar la política. Inténtalo de nuevo.",
118218
+ "delete": "Eliminar"
118219
+ };
118220
+ var virtualMachineSecrets$1 = {
118221
+ newSecret: "Nuevo secreto",
118222
+ loadFailed: "No se pudieron cargar los secretos de VM. Inténtalo de nuevo en un momento.",
118223
+ colName: "Nombre",
118224
+ colEnvVar: "Variable",
118225
+ colHosts: "Hosts permitidos",
118226
+ colSource: "Origen",
118227
+ colUpdated: "Actualizado",
118228
+ colActions: "Acciones",
118229
+ hostsListAriaLabel: "Hosts a los que se envía {name}",
118230
+ moreHosts: "+{count} más",
118231
+ sourceStored: "Valor guardado",
118232
+ sourceFromCredential: "Credencial {credential} · {field}",
118233
+ editAriaLabel: "Editar el secreto {name}",
118234
+ deleteAriaLabel: "Eliminar el secreto {name}",
118235
+ empty: "Todavía no hay secretos de VM. Crea uno para que un agente llame a una API con la clave de tu organización sin verla nunca.",
118236
+ createTitle: "Nuevo secreto de VM",
118237
+ editTitle: "Editar secreto de VM",
118238
+ dialogDescription: "El valor no vuelve a mostrarse después de guardarlo.",
118239
+ fieldName: "Nombre",
118240
+ namePlaceholder: "p. ej. Clave de la API de Acme",
118241
+ fieldEnvVar: "Variable de entorno",
118242
+ envVarPlaceholder: "p. ej. ACME_KEY",
118243
+ envVarHelp: "Letras, dígitos y guiones bajos; no puede empezar por un dígito.",
118244
+ envVarReadOnlyHelp: "No se puede renombrar. Elimina este secreto y crea uno nuevo.",
118245
+ fieldHosts: "Hosts permitidos",
118246
+ hostsHint: "Solo estos hosts reciben la clave real; limita la lista al host más concreto que la necesite. Escribe host:puerto y pulsa Intro.",
118247
+ fieldSource: "Origen del valor",
118248
+ sourceValue: "Introducir un valor",
118249
+ sourceValueDescription: "Se guarda cifrada y no vuelve a mostrarse.",
118250
+ sourceCredential: "Usar una credencial de integración",
118251
+ sourceCredentialDescription: "Lee un campo de una credencial guardada y sigue las rotaciones automáticamente.",
118252
+ fieldValue: "Valor",
118253
+ valuePlaceholder: "Pega la clave",
118254
+ valueKeepPlaceholder: "Déjalo en blanco para conservar el valor actual",
118255
+ valueHelp: "Al menos {min} caracteres.",
118256
+ valueKeepHelp: "Déjalo en blanco para conservar el valor actual.",
118257
+ fieldCredential: "Credencial de integración",
118258
+ credentialPlaceholder: "Elige una credencial",
118259
+ noCredentials: "Tu organización todavía no tiene credenciales de integración. Añade una en Integraciones o introduce un valor.",
118260
+ fieldCredentialField: "Campo de la credencial",
118261
+ credentialFieldPlaceholder: "Elige un campo",
118262
+ credentialNoFields: "Esta credencial no tiene campos de los que leer.",
118263
+ cancel: "Cancelar",
118264
+ saveChanges: "Guardar cambios",
118265
+ createSecret: "Crear secreto",
118266
+ errorNameRequired: "Dale un nombre al secreto.",
118267
+ errorEnvVarRequired: "Introduce el nombre de la variable de entorno.",
118268
+ errorEnvVarFormat: "Usa solo letras, dígitos y guiones bajos, y no empieces por un dígito.",
118269
+ errorHostsRequired: "Añade al menos un host.",
118270
+ errorValueRequired: "Introduce el valor.",
118271
+ errorValueTooShort: "El valor debe tener al menos {min} caracteres.",
118272
+ errorValueMasked: "Parece un valor enmascarado. Pega la clave real.",
118273
+ errorCredentialRequired: "Elige una credencial.",
118274
+ errorFieldRequired: "Elige el campo de la credencial.",
118275
+ created: "Secreto de VM creado",
118276
+ updated: "Secreto de VM actualizado",
118277
+ deleted: "Secreto de VM eliminado",
118278
+ saveFailed: "No se pudo guardar el secreto. Inténtalo de nuevo.",
118279
+ forbiddenWrite: "No tienes permiso para modificar secretos de VM.",
118280
+ forbiddenDelete: "No tienes permiso para eliminar secretos de VM.",
118281
+ deleteTitle: "Eliminar secreto de VM",
118282
+ deleteConfirm: "¿Eliminar {envVar}? También se quitará de todos los agentes que lo usan.",
118283
+ deleteFailed: "No se pudo eliminar el secreto. Inténtalo de nuevo.",
118284
+ "delete": "Eliminar"
118285
+ };
118286
+ var virtualMachineNetworkSection$1 = {
118287
+ title: "Acceso a la red",
118288
+ description: "Decide a qué puede llegar la máquina virtual de este agente y qué credenciales puede usar.",
118289
+ billingNotice: "El tiempo de máquina virtual se cobra de los créditos del usuario que chatea: ${usd} por cada {minutes} minutos por defecto, prorrateado por segundo. La tarifa de tu organización puede ser distinta.",
118290
+ egressLabel: "Perfil de salida",
118291
+ egressHelp: "Cuánta red recibe la VM.",
118292
+ egressNoneLabel: "Sin red",
118293
+ egressNoneDescription: "La VM no puede llegar a nada.",
118294
+ egressRegistriesLabel: "Registros de paquetes",
118295
+ egressRegistriesDescription: "Solo PyPI, npm, apt y apk, para instalar paquetes.",
118296
+ egressPublicLabel: "Internet público",
118297
+ egressPublicDescription: "Cualquier host público. Las redes privadas, localhost y los metadatos de la nube siguen bloqueados.",
118298
+ egressCustomLabel: "Lista personalizada",
118299
+ egressCustomDescription: "Solo los hosts de la política de red que elijas abajo.",
118300
+ policyLabel: "Política de red",
118301
+ policiesForbidden: "No tienes permiso para ver las políticas de red, así que este perfil no se puede configurar desde aquí.",
118302
+ noPolicies: "Todavía no hay políticas de red",
118303
+ policyPlaceholder: "Elige una política",
118304
+ createPolicy: "Crear política",
118305
+ editPolicy: "Editar política",
118306
+ managePolicies: "Gestionar políticas",
118307
+ manageSecrets: "Gestionar secretos",
118308
+ policyRequired: "El perfil Personalizado necesita una política de red.",
118309
+ policyHosts: "Hosts que permite esta política:",
118310
+ secretsLabel: "Secretos",
118311
+ secretsHelp: "Claves que la VM puede usar pero nunca leer. Hasta {max} por agente.",
118312
+ noSecrets: "Tu organización todavía no tiene secretos de VM. Usa Gestionar secretos para crear uno.",
118313
+ secretsCapReached: "Este agente tiene el máximo de {max} secretos.",
118314
+ uncoveredTitle: "Algunos secretos se envían a hosts que esta política no permite:",
118315
+ uncoveredItem: "{envVar} necesita {hosts}, y {policy} no lo permite.",
118316
+ addHostsAndSave: "Añadir hosts a {policy} y guardar",
118317
+ saved: "Configuración de red guardada",
118318
+ saveFailed: "No se pudo guardar la configuración de red. Inténtalo de nuevo.",
118319
+ forbiddenSave: "No tienes permiso para cambiar esta configuración.",
118320
+ policyHostsAdded: "Hosts añadidos a {policy}",
118321
+ policyUpdateFailed: "No se pudo actualizar la política, así que la configuración no se guardó.",
118322
+ policyUpdateForbidden: "No tienes permiso para modificar políticas de red, así que la configuración no se guardó.",
118323
+ discard: "Descartar",
118324
+ save: "Guardar cambios",
118325
+ narrowTitle: "¿Desvincular los secretos?",
118326
+ narrowDescription: "{profile} no da a la VM acceso a los hosts que necesitan estos secretos, así que al guardar se {count, plural, one {desvinculará # secreto} other {desvincularán # secretos}} de este agente.",
118327
+ cancel: "Cancelar",
118328
+ narrowConfirm: "Desvincular y guardar",
118329
+ manageTitle: "Configuración de la máquina virtual",
118330
+ manageDescription: "Las políticas de red y los secretos de VM son compartidos por todos los agentes de tu organización."
118331
+ };
117758
118332
  var es = {
117759
118333
  accessTabAddAccess: accessTabAddAccess$1,
117760
118334
  accessTabLabels: accessTabLabels$1,
@@ -118040,7 +118614,12 @@ var es = {
118040
118614
  analyticsCostTabs: analyticsCostTabs$1,
118041
118615
  analyticsLlmUsage: analyticsLlmUsage$1,
118042
118616
  analyticsTraces: analyticsTraces$1,
118043
- profileLlmUsage: profileLlmUsage$1
118617
+ profileLlmUsage: profileLlmUsage$1,
118618
+ virtualMachineHostInput: virtualMachineHostInput$1,
118619
+ virtualMachineAdminTab: virtualMachineAdminTab$1,
118620
+ virtualMachineNetworkPolicies: virtualMachineNetworkPolicies$1,
118621
+ virtualMachineSecrets: virtualMachineSecrets$1,
118622
+ virtualMachineNetworkSection: virtualMachineNetworkSection$1
118044
118623
  };
118045
118624
 
118046
118625
  var accessTabAddAccess = {
@@ -120542,7 +121121,9 @@ var datasetsTabAddResourceModal = {
120542
121121
  title: "添加资源",
120543
121122
  description: "添加知识以帮助您的代理提供更相关的见解。其他具有编辑权限的用户可以为更多主题重复使用这些来源。",
120544
121123
  googleDrivePickerError: "Google Drive 选择器错误",
120545
- forceClosePicker: "强制关闭选择器"
121124
+ forceClosePicker: "强制关闭选择器",
121125
+ notConfigured: "未为此租户配置",
121126
+ scrollRegionAriaLabel: "资源类型"
120546
121127
  };
120547
121128
  var datasetsTabDatasetItem = {
120548
121129
  scheduleRetrain: "安排重新训练",
@@ -121919,7 +122500,9 @@ var profileAccount = {
121919
122500
  groupSystem: "系统",
121920
122501
  ariaSettingsNav: "组织设置",
121921
122502
  ariaSettingsNavMobile: "组织设置(移动端)",
121922
- groupFinance: "财务"
122503
+ groupFinance: "财务",
122504
+ tabVirtualMachine: "虚拟机",
122505
+ descVirtualMachine: "管理可供智能体虚拟机使用的网络策略和密钥。"
121923
122506
  };
121924
122507
  var profileAddCreditsModal = {
121925
122508
  title: "添加积分",
@@ -122460,7 +123043,11 @@ var resourceModalGithubFileUploadModal = {
122460
123043
  errorAddingDocument: "添加训练文档时出错",
122461
123044
  githubRepoUrlPlaceholder: "GitHub 仓库 URL",
122462
123045
  selectBranchPlaceholder: "选择分支",
122463
- submit: "提交"
123046
+ submit: "提交",
123047
+ description: "添加 GitHub 仓库并选择分支来训练您的智能体。",
123048
+ scrollRegionAriaLabel: "仓库详情",
123049
+ repoUrlLabel: "仓库 URL",
123050
+ branchLabel: "分支"
122464
123051
  };
122465
123052
  var resourceModalLocalFileUploadModal = {
122466
123053
  fileNotFound: "未找到文件",
@@ -122474,7 +123061,9 @@ var resourceModalLocalFileUploadModal = {
122474
123061
  descriptionOptional: "描述(可选)",
122475
123062
  descriptionPlaceholder: "为此图片添加描述...",
122476
123063
  submitting: "提交中",
122477
- submit: "提交"
123064
+ submit: "提交",
123065
+ description: "上传文件,用其内容训练您的智能体。",
123066
+ scrollRegionAriaLabel: "文件上传"
122478
123067
  };
122479
123068
  var resourceModalUrlUploadModal = {
122480
123069
  urlPlaceholder: "URL",
@@ -122483,11 +123072,15 @@ var resourceModalUrlUploadModal = {
122483
123072
  invalidYoutubeUrl: "无效的 YouTube URL",
122484
123073
  invalidBlackboardUrl: "无效的 Blackboard URL",
122485
123074
  invalidUrl: "无效的 URL",
122486
- submit: "提交"
123075
+ submit: "提交",
123076
+ description: "添加链接,用其内容训练您的智能体。",
123077
+ scrollRegionAriaLabel: "链接详情",
123078
+ urlLabel: "URL"
122487
123079
  };
122488
123080
  var resourceModalWebsiteCrawlModal = {
122489
- title: "网络爬虫配置",
122490
123081
  description: "配置您的网络爬虫设置和 URL 模式",
123082
+ infoBox: "抓取网站并用其页面训练您的智能体。设置链接跟踪深度、抓取页面数量以及要包含的网址。",
123083
+ scrollRegionAriaLabel: "网络爬虫设置",
122491
123084
  formAriaLabel: "网络爬虫配置表单",
122492
123085
  urlRequired: "URL 为必填项",
122493
123086
  invalidUrl: "无效的 URL",
@@ -122502,6 +123095,9 @@ var resourceModalWebsiteCrawlModal = {
122502
123095
  selectPatternTypeAriaLabel: "选择模式类型",
122503
123096
  globPattern: "Glob 模式",
122504
123097
  regularExpression: "正则表达式",
123098
+ userAgentLabel: "User-Agent(可选)",
123099
+ userAgentPlaceholder: "Iblai-bot/1.0 (+https://ibl.ai/bot)",
123100
+ userAgentHelpText: "可选。为每个请求覆盖默认的抓取工具 User-Agent。留空则使用默认值。",
122505
123101
  crawlerMatchPatternsLabel: "爬虫匹配模式",
122506
123102
  globPlaceholder: "https://example.com/",
122507
123103
  regexPlaceholder: "(http|https)://www.example.com/(.*)",
@@ -123706,8 +124302,8 @@ var uiSidebar = {
123706
124302
  var userProfileDropdownIndex = {
123707
124303
  profile: "个人资料",
123708
124304
  account: "账户",
123709
- learner: "学习者",
123710
- instructor: "讲师",
124305
+ learner: "用户",
124306
+ instructor: "管理员",
123711
124307
  help: "帮助",
123712
124308
  logOut: "退出登录",
123713
124309
  moreOptions: "更多选项"
@@ -125078,6 +125674,177 @@ var profileLlmUsage = {
125078
125674
  tryAgain: "重试",
125079
125675
  scopeUser: "{username} 的用量"
125080
125676
  };
125677
+ var virtualMachineHostInput = {
125678
+ listLabel: "允许的主机",
125679
+ removeHost: "移除 {host}",
125680
+ placeholder: "api.example.com:443",
125681
+ hint: "输入 host:port 并按 Enter,或粘贴列表。",
125682
+ errorFormat: "{entry} 必须为 host:port 格式,例如 api.example.com:443,不能包含协议、路径或通配符。",
125683
+ errorPort: "{entry}:端口必须在 1 到 65535 之间。",
125684
+ errorRejectedHost: "{entry}:此主机为保留主机,不能加入允许列表。",
125685
+ errorIpNotAllowed: "{entry}:此处请使用主机名,而不是 IP 地址。",
125686
+ errorDuplicate: "{entry} 已在列表中。",
125687
+ errorMax: "最多只能添加 {max} 个主机。"
125688
+ };
125689
+ var virtualMachineAdminTab = {
125690
+ infoBox: "启用了虚拟机 Shell 的智能体会在隔离的 Linux 虚拟机中运行代码,默认没有网络访问权限。网络策略是可复用的 host:port 目标列表,规定虚拟机可以访问的地址;虚拟机密钥是虚拟机可以使用但永远无法读取的密钥。请在智能体的沙箱设置中为其选择。",
125691
+ tabsAriaLabel: "虚拟机设置分区",
125692
+ tabNetworkPolicies: "网络策略",
125693
+ tabSecrets: "密钥",
125694
+ forbidden: "您没有权限管理虚拟机的网络策略或密钥。"
125695
+ };
125696
+ var virtualMachineNetworkPolicies = {
125697
+ newPolicy: "新建策略",
125698
+ loadFailed: "无法加载网络策略,请稍后重试。",
125699
+ colName: "名称",
125700
+ colHosts: "允许的主机",
125701
+ colDescription: "描述",
125702
+ colUpdated: "更新时间",
125703
+ colActions: "操作",
125704
+ hostsListAriaLabel: "{name} 允许的主机",
125705
+ moreHosts: "还有 {count} 个",
125706
+ editAriaLabel: "编辑策略 {name}",
125707
+ deleteAriaLabel: "删除策略 {name}",
125708
+ empty: "还没有网络策略。创建一个策略,让智能体的虚拟机可以访问指定主机。",
125709
+ createTitle: "新建网络策略",
125710
+ editTitle: "编辑网络策略",
125711
+ dialogDescription: "此策略下虚拟机可以访问的 host:port 目标。HTTPS 使用 443 端口。",
125712
+ fieldName: "名称",
125713
+ namePlaceholder: "例如:Acme API",
125714
+ fieldHosts: "允许的主机",
125715
+ hostsHint: "输入 host:port 并按 Enter,或粘贴列表。最多 {max} 条;允许使用 IP 地址。",
125716
+ removedHostsWarning: "您正在移除 {hosts}。如果某个智能体使用此策略,并且有密钥会发送到这些主机之一,该密钥将无法再使用。",
125717
+ fieldDescription: "描述(可选)",
125718
+ descriptionPlaceholder: "此策略的用途",
125719
+ cancel: "取消",
125720
+ saveChanges: "保存更改",
125721
+ createPolicy: "创建策略",
125722
+ errorNameRequired: "请为策略输入名称。",
125723
+ errorHostsRequired: "请至少添加一个主机。",
125724
+ created: "网络策略已创建",
125725
+ updated: "网络策略已更新",
125726
+ deleted: "网络策略已删除",
125727
+ saveFailed: "无法保存策略,请重试。",
125728
+ forbiddenWrite: "您没有权限修改网络策略。",
125729
+ forbiddenDelete: "您没有权限删除网络策略。",
125730
+ deleteTitle: "删除网络策略",
125731
+ deleteConfirm: "确定删除 {name} 吗?设为“自定义”配置的智能体只能使用仍然存在的策略。",
125732
+ deleteBlockedInUse: "以下智能体仍在使用此策略。请先将它们改为其他策略或配置。",
125733
+ deleteFailed: "无法删除策略,请重试。",
125734
+ "delete": "删除"
125735
+ };
125736
+ var virtualMachineSecrets = {
125737
+ newSecret: "新建密钥",
125738
+ loadFailed: "无法加载虚拟机密钥,请稍后重试。",
125739
+ colName: "名称",
125740
+ colEnvVar: "变量",
125741
+ colHosts: "允许的主机",
125742
+ colSource: "来源",
125743
+ colUpdated: "更新时间",
125744
+ colActions: "操作",
125745
+ hostsListAriaLabel: "{name} 发送至的主机",
125746
+ moreHosts: "还有 {count} 个",
125747
+ sourceStored: "已存储的值",
125748
+ sourceFromCredential: "凭据 {credential} · {field}",
125749
+ editAriaLabel: "编辑密钥 {name}",
125750
+ deleteAriaLabel: "删除密钥 {name}",
125751
+ empty: "还没有虚拟机密钥。创建一个密钥,让智能体无需看到组织的密钥即可调用 API。",
125752
+ createTitle: "新建虚拟机密钥",
125753
+ editTitle: "编辑虚拟机密钥",
125754
+ dialogDescription: "保存后,该值不会再显示。",
125755
+ fieldName: "名称",
125756
+ namePlaceholder: "例如:Acme API 密钥",
125757
+ fieldEnvVar: "环境变量",
125758
+ envVarPlaceholder: "例如:ACME_KEY",
125759
+ envVarHelp: "只能包含字母、数字和下划线,且不能以数字开头。",
125760
+ envVarReadOnlyHelp: "无法重命名。请删除此密钥并新建一个。",
125761
+ fieldHosts: "允许的主机",
125762
+ hostsHint: "只有这些主机会收到真实密钥,请仅填写需要它的最小范围主机。输入 host:port 并按 Enter。",
125763
+ fieldSource: "值的来源",
125764
+ sourceValue: "输入一个值",
125765
+ sourceValueDescription: "加密存储,之后不再显示。",
125766
+ sourceCredential: "使用集成凭据",
125767
+ sourceCredentialDescription: "读取已保存凭据中的一个字段,并自动跟随凭据轮换。",
125768
+ fieldValue: "值",
125769
+ valuePlaceholder: "粘贴密钥",
125770
+ valueKeepPlaceholder: "留空以保留当前值",
125771
+ valueHelp: "至少 {min} 个字符。",
125772
+ valueKeepHelp: "留空以保留当前值。",
125773
+ fieldCredential: "集成凭据",
125774
+ credentialPlaceholder: "选择一个凭据",
125775
+ noCredentials: "您的组织还没有集成凭据。请在“集成”中添加,或改为输入一个值。",
125776
+ fieldCredentialField: "凭据字段",
125777
+ credentialFieldPlaceholder: "选择一个字段",
125778
+ credentialNoFields: "此凭据没有可读取的字段。",
125779
+ cancel: "取消",
125780
+ saveChanges: "保存更改",
125781
+ createSecret: "创建密钥",
125782
+ errorNameRequired: "请为密钥输入名称。",
125783
+ errorEnvVarRequired: "请输入环境变量名。",
125784
+ errorEnvVarFormat: "只能使用字母、数字和下划线,且不能以数字开头。",
125785
+ errorHostsRequired: "请至少添加一个主机。",
125786
+ errorValueRequired: "请输入值。",
125787
+ errorValueTooShort: "值至少需要 {min} 个字符。",
125788
+ errorValueMasked: "这看起来是打码后的值,请粘贴真实密钥。",
125789
+ errorCredentialRequired: "请选择一个凭据。",
125790
+ errorFieldRequired: "请选择凭据字段。",
125791
+ created: "虚拟机密钥已创建",
125792
+ updated: "虚拟机密钥已更新",
125793
+ deleted: "虚拟机密钥已删除",
125794
+ saveFailed: "无法保存密钥,请重试。",
125795
+ forbiddenWrite: "您没有权限修改虚拟机密钥。",
125796
+ forbiddenDelete: "您没有权限删除虚拟机密钥。",
125797
+ deleteTitle: "删除虚拟机密钥",
125798
+ deleteConfirm: "确定删除 {envVar} 吗?它也会从所有使用它的智能体中移除。",
125799
+ deleteFailed: "无法删除密钥,请重试。",
125800
+ "delete": "删除"
125801
+ };
125802
+ var virtualMachineNetworkSection = {
125803
+ title: "网络访问",
125804
+ description: "决定此智能体的虚拟机可以访问哪些地址,以及可以使用哪些凭据。",
125805
+ billingNotice: "虚拟机使用时长按聊天用户的积分计费:默认每 {minutes} 分钟 ${usd},按秒计算。您所在组织的费率可能不同。",
125806
+ egressLabel: "出站配置",
125807
+ egressHelp: "虚拟机可获得的网络访问范围。",
125808
+ egressNoneLabel: "无网络",
125809
+ egressNoneDescription: "虚拟机无法访问任何地址。",
125810
+ egressRegistriesLabel: "软件包仓库",
125811
+ egressRegistriesDescription: "仅限 PyPI、npm、apt 和 apk,用于安装软件包。",
125812
+ egressPublicLabel: "公共互联网",
125813
+ egressPublicDescription: "任何公共主机。私有网络、localhost 和云元数据仍被阻止。",
125814
+ egressCustomLabel: "自定义允许列表",
125815
+ egressCustomDescription: "仅限下方所选网络策略中的主机。",
125816
+ policyLabel: "网络策略",
125817
+ policiesForbidden: "您没有权限查看网络策略,因此无法在此处配置该选项。",
125818
+ noPolicies: "还没有网络策略",
125819
+ policyPlaceholder: "选择一个策略",
125820
+ createPolicy: "创建策略",
125821
+ editPolicy: "编辑策略",
125822
+ managePolicies: "管理策略",
125823
+ manageSecrets: "管理密钥",
125824
+ policyRequired: "“自定义”配置需要一个网络策略。",
125825
+ policyHosts: "此策略允许的主机:",
125826
+ secretsLabel: "密钥",
125827
+ secretsHelp: "虚拟机可以使用但永远无法读取的密钥。每个智能体最多 {max} 个。",
125828
+ noSecrets: "您的组织还没有虚拟机密钥。请使用“管理密钥”创建一个。",
125829
+ secretsCapReached: "此智能体已达到 {max} 个密钥的上限。",
125830
+ uncoveredTitle: "部分密钥会发送到此策略不允许的主机:",
125831
+ uncoveredItem: "{envVar} 需要 {hosts},但 {policy} 不允许。",
125832
+ addHostsAndSave: "将主机添加到 {policy} 并保存",
125833
+ saved: "网络设置已保存",
125834
+ saveFailed: "无法保存网络设置,请重试。",
125835
+ forbiddenSave: "您没有权限修改这些设置。",
125836
+ policyHostsAdded: "主机已添加到 {policy}",
125837
+ policyUpdateFailed: "无法更新策略,因此设置未保存。",
125838
+ policyUpdateForbidden: "您没有权限修改网络策略,因此设置未保存。",
125839
+ discard: "放弃更改",
125840
+ save: "保存更改",
125841
+ narrowTitle: "解除密钥绑定?",
125842
+ narrowDescription: "{profile} 不允许虚拟机访问这些密钥所需的主机,因此保存后将从此智能体解除 {count, plural, one {# 个密钥} other {# 个密钥}} 的绑定。",
125843
+ cancel: "取消",
125844
+ narrowConfirm: "解除绑定并保存",
125845
+ manageTitle: "虚拟机设置",
125846
+ manageDescription: "网络策略和虚拟机密钥由您组织中的所有智能体共享。"
125847
+ };
125081
125848
  var zh = {
125082
125849
  accessTabAddAccess: accessTabAddAccess,
125083
125850
  accessTabLabels: accessTabLabels,
@@ -125363,7 +126130,12 @@ var zh = {
125363
126130
  analyticsCostTabs: analyticsCostTabs,
125364
126131
  analyticsLlmUsage: analyticsLlmUsage,
125365
126132
  analyticsTraces: analyticsTraces,
125366
- profileLlmUsage: profileLlmUsage
126133
+ profileLlmUsage: profileLlmUsage,
126134
+ virtualMachineHostInput: virtualMachineHostInput,
126135
+ virtualMachineAdminTab: virtualMachineAdminTab,
126136
+ virtualMachineNetworkPolicies: virtualMachineNetworkPolicies,
126137
+ virtualMachineSecrets: virtualMachineSecrets,
126138
+ virtualMachineNetworkSection: virtualMachineNetworkSection
125367
126139
  };
125368
126140
 
125369
126141
  /**
@@ -232768,6 +233540,684 @@ function MemoryAdminTab({ tenantKey, username }) {
232768
233540
  return (jsxs(Tabs, { defaultValue: "global-memories", "aria-label": t('memoryAdminTab.tabsAriaLabel'), children: [jsxs(TabsList, { "aria-label": t('memoryAdminTab.tabsAriaLabel'), className: "max-w-full overflow-x-auto justify-start px-1", children: [jsx(TabsTrigger, { "data-testid": "memory-admin-sub-tab-global", value: "global-memories", children: t('memoryAdminTab.tabGlobalMemories') }), jsx(TabsTrigger, { "data-testid": "memory-admin-sub-tab-agent", value: "agent-memories", children: t('memoryAdminTab.tabAgentMemories') })] }), jsx(TabsContent, { className: "mt-4", value: "global-memories", children: jsx(GlobalMemoriesSection, { tenantKey: tenantKey, username: username }) }), jsx(TabsContent, { className: "mt-4", value: "agent-memories", children: jsx(AgentMemoriesSection, { tenantKey: tenantKey, username: username }) })] }));
232769
233541
  }
232770
233542
 
233543
+ const ISSUE_KEYS = {
233544
+ format: 'virtualMachineHostInput.errorFormat',
233545
+ port: 'virtualMachineHostInput.errorPort',
233546
+ rejected_host: 'virtualMachineHostInput.errorRejectedHost',
233547
+ ip_not_allowed: 'virtualMachineHostInput.errorIpNotAllowed',
233548
+ };
233549
+ /**
233550
+ * A chip (tag) input for `host:port` allowlists. Entries are added with Enter,
233551
+ * comma or space, or by pasting a list; each is checked client-side
233552
+ * (`validateHostPort`) before it becomes a chip, and invalid ones stay in the
233553
+ * box with the reason announced through a polite live region. Backspace on an
233554
+ * empty box removes the last chip; every chip has a labelled remove button so
233555
+ * the whole control works from the keyboard.
233556
+ */
233557
+ function HostPortChipInput({ id, value, onChange, allowIpAddresses = false, maxEntries, disabled = false, placeholder, describedBy, error, listLabel, hint, testId, }) {
233558
+ var _a;
233559
+ const t = useT();
233560
+ const generatedId = useId$2();
233561
+ const hintId = `${generatedId}-hint`;
233562
+ const errorId = `${generatedId}-error`;
233563
+ const [draft, setDraft] = useState('');
233564
+ const [localError, setLocalError] = useState(null);
233565
+ const message = (_a = localError !== null && localError !== void 0 ? localError : error) !== null && _a !== void 0 ? _a : null;
233566
+ /**
233567
+ * Turn the typed / pasted text into chips. Valid entries are appended;
233568
+ * whatever failed stays in the box, with the first problem explained.
233569
+ */
233570
+ const commit = (text) => {
233571
+ const entries = splitHostPortInput(text);
233572
+ if (entries.length === 0) {
233573
+ setDraft('');
233574
+ return;
233575
+ }
233576
+ const next = [...value];
233577
+ const leftover = [];
233578
+ let problem = null;
233579
+ for (const entry of entries) {
233580
+ if (next.includes(entry)) {
233581
+ problem !== null && problem !== void 0 ? problem : (problem = t('virtualMachineHostInput.errorDuplicate', { entry }));
233582
+ continue;
233583
+ }
233584
+ const issue = validateHostPort(entry, { allowIpAddresses });
233585
+ if (issue) {
233586
+ problem !== null && problem !== void 0 ? problem : (problem = t(ISSUE_KEYS[issue], { entry }));
233587
+ leftover.push(entry);
233588
+ continue;
233589
+ }
233590
+ if (maxEntries !== undefined && next.length >= maxEntries) {
233591
+ problem !== null && problem !== void 0 ? problem : (problem = t('virtualMachineHostInput.errorMax', { max: maxEntries }));
233592
+ leftover.push(entry);
233593
+ continue;
233594
+ }
233595
+ next.push(entry);
233596
+ }
233597
+ if (next.length !== value.length)
233598
+ onChange(next);
233599
+ setDraft(leftover.join(' '));
233600
+ setLocalError(problem);
233601
+ };
233602
+ const remove = (host) => {
233603
+ onChange(value.filter((entry) => entry !== host));
233604
+ };
233605
+ const handleKeyDown = (event) => {
233606
+ if (event.key === 'Enter' || event.key === ',' || event.key === ' ') {
233607
+ event.preventDefault();
233608
+ commit(draft);
233609
+ }
233610
+ else if (event.key === 'Backspace' && draft === '' && value.length > 0) {
233611
+ event.preventDefault();
233612
+ remove(value[value.length - 1]);
233613
+ }
233614
+ else if (event.key === 'Escape' && (draft !== '' || localError)) {
233615
+ event.preventDefault();
233616
+ setDraft('');
233617
+ setLocalError(null);
233618
+ }
233619
+ };
233620
+ const handlePaste = (event) => {
233621
+ const pasted = event.clipboardData.getData('text');
233622
+ if (!pasted)
233623
+ return;
233624
+ event.preventDefault();
233625
+ commit(`${draft} ${pasted}`);
233626
+ };
233627
+ return (jsxs("div", { className: "space-y-2", "data-testid": testId, children: [value.length > 0 && (jsx("ul", { role: "list", "aria-label": listLabel !== null && listLabel !== void 0 ? listLabel : t('virtualMachineHostInput.listLabel'), className: "flex flex-wrap gap-2", children: value.map((host) => (jsxs("li", { className: "inline-flex items-center gap-1 rounded-md border border-gray-200 bg-gray-50 py-0.5 pr-1 pl-2 font-mono text-xs text-gray-700", children: [jsx("span", { children: host }), !disabled && (jsx("button", { type: "button", onClick: () => remove(host), "aria-label": t('virtualMachineHostInput.removeHost', { host }), className: "cursor-pointer rounded p-0.5 text-gray-400 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500", children: jsx(X$2, { className: "h-3 w-3", "aria-hidden": "true" }) }))] }, host))) })), jsx(Input, { id: id, type: "text", value: draft, disabled: disabled, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('virtualMachineHostInput.placeholder'), autoComplete: "off", autoCapitalize: "off", spellCheck: false, onChange: (event) => {
233628
+ setDraft(event.target.value);
233629
+ if (localError)
233630
+ setLocalError(null);
233631
+ }, onKeyDown: handleKeyDown, onPaste: handlePaste, onBlur: () => {
233632
+ if (draft.trim())
233633
+ commit(draft);
233634
+ }, "aria-invalid": message ? true : undefined, "aria-describedby": [describedBy, hintId, errorId].filter(Boolean).join(' ') }), jsx("p", { id: hintId, className: "text-xs text-gray-500", children: hint !== null && hint !== void 0 ? hint : t('virtualMachineHostInput.hint') }), jsx("p", { id: errorId, "aria-live": "polite", className: cn(message ? 'text-xs text-red-600' : 'sr-only'), children: message })] }));
233635
+ }
233636
+
233637
+ const NAME_MAX_LENGTH$1 = 255;
233638
+ /**
233639
+ * Create / edit form for a virtual-machine network policy: a name (unique in
233640
+ * the org), 1–100 `host:port` entries and an optional description. Backend
233641
+ * 400s land next to the matching field or, for a plain-string `error`, as a
233642
+ * form-level message. On edit, only the fields that changed are sent
233643
+ * (`allowed_hosts` always replaces the whole list), and removing a host warns
233644
+ * that a bound secret which needs it would stop working — the backend does
233645
+ * not block that edit.
233646
+ */
233647
+ function NetworkPolicyDialog({ open, onOpenChange, tenantKey, policy = null, onSaved, }) {
233648
+ const t = useT();
233649
+ const baseId = useId$2();
233650
+ const nameId = `${baseId}-name`;
233651
+ const hostsId = `${baseId}-hosts`;
233652
+ const descriptionId = `${baseId}-description`;
233653
+ const [createPolicy, { isLoading: isCreating }] = useCreateVirtualMachineNetworkPolicyMutation();
233654
+ const [updatePolicy, { isLoading: isUpdating }] = useUpdateVirtualMachineNetworkPolicyMutation();
233655
+ const isSaving = isCreating || isUpdating;
233656
+ const [name, setName] = useState('');
233657
+ const [hosts, setHosts] = useState([]);
233658
+ const [description, setDescription] = useState('');
233659
+ const [fieldErrors, setFieldErrors] = useState({});
233660
+ const [formError, setFormError] = useState(null);
233661
+ // Start from the policy being edited (or blank) every time the dialog opens.
233662
+ useEffect(() => {
233663
+ var _a, _b, _c;
233664
+ if (!open)
233665
+ return;
233666
+ setName((_a = policy === null || policy === void 0 ? void 0 : policy.name) !== null && _a !== void 0 ? _a : '');
233667
+ setHosts((_b = policy === null || policy === void 0 ? void 0 : policy.allowed_hosts) !== null && _b !== void 0 ? _b : []);
233668
+ setDescription((_c = policy === null || policy === void 0 ? void 0 : policy.description) !== null && _c !== void 0 ? _c : '');
233669
+ setFieldErrors({});
233670
+ setFormError(null);
233671
+ }, [open, policy]);
233672
+ const isEdit = policy !== null;
233673
+ const removedHosts = isEdit ? policy.allowed_hosts.filter((host) => !hosts.includes(host)) : [];
233674
+ const handleSubmit = async (event) => {
233675
+ var _a;
233676
+ event.preventDefault();
233677
+ const trimmedName = name.trim();
233678
+ const trimmedDescription = description.trim();
233679
+ const clientErrors = {};
233680
+ if (!trimmedName)
233681
+ clientErrors.name = t('virtualMachineNetworkPolicies.errorNameRequired');
233682
+ if (hosts.length === 0) {
233683
+ clientErrors.allowed_hosts = t('virtualMachineNetworkPolicies.errorHostsRequired');
233684
+ }
233685
+ setFieldErrors(clientErrors);
233686
+ setFormError(null);
233687
+ if (Object.keys(clientErrors).length > 0)
233688
+ return;
233689
+ try {
233690
+ let saved;
233691
+ if (isEdit) {
233692
+ const body = { id: policy.id };
233693
+ if (trimmedName !== policy.name)
233694
+ body.name = trimmedName;
233695
+ if (hosts.length !== policy.allowed_hosts.length ||
233696
+ hosts.some((host, index) => host !== policy.allowed_hosts[index])) {
233697
+ body.allowed_hosts = hosts;
233698
+ }
233699
+ if (trimmedDescription !== ((_a = policy.description) !== null && _a !== void 0 ? _a : ''))
233700
+ body.description = trimmedDescription;
233701
+ if (Object.keys(body).length === 1) {
233702
+ onOpenChange(false);
233703
+ return;
233704
+ }
233705
+ saved = await updatePolicy({ org: tenantKey, body }).unwrap();
233706
+ toast.success(t('virtualMachineNetworkPolicies.updated'));
233707
+ }
233708
+ else {
233709
+ saved = await createPolicy({
233710
+ org: tenantKey,
233711
+ body: { name: trimmedName, allowed_hosts: hosts, description: trimmedDescription },
233712
+ }).unwrap();
233713
+ toast.success(t('virtualMachineNetworkPolicies.created'));
233714
+ }
233715
+ onSaved === null || onSaved === void 0 ? void 0 : onSaved(saved);
233716
+ onOpenChange(false);
233717
+ }
233718
+ catch (error) {
233719
+ const parsed = getVirtualMachineApiError(error);
233720
+ if (parsed.status === 403) {
233721
+ setFormError(t('virtualMachineNetworkPolicies.forbiddenWrite'));
233722
+ return;
233723
+ }
233724
+ const nextErrors = {};
233725
+ let unmatched = [];
233726
+ for (const [field, messages] of Object.entries(parsed.fieldErrors)) {
233727
+ if (field === 'name' || field === 'allowed_hosts' || field === 'description') {
233728
+ nextErrors[field] = messages.join(' ');
233729
+ }
233730
+ else {
233731
+ unmatched = unmatched.concat(messages);
233732
+ }
233733
+ }
233734
+ setFieldErrors(nextErrors);
233735
+ const message = [parsed.message, ...unmatched].filter(Boolean).join(' ');
233736
+ if (message) {
233737
+ setFormError(message);
233738
+ }
233739
+ else if (Object.keys(nextErrors).length === 0) {
233740
+ setFormError(t('virtualMachineNetworkPolicies.saveFailed'));
233741
+ }
233742
+ }
233743
+ };
233744
+ return (jsx(Dialog, { open: open, onOpenChange: (next) => !isSaving && onOpenChange(next), children: jsxs(DialogContent, { className: "max-h-[90vh] w-full max-w-lg overflow-y-auto", "data-testid": "network-policy-dialog", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { className: "ibl-dialog-title", children: isEdit
233745
+ ? t('virtualMachineNetworkPolicies.editTitle')
233746
+ : t('virtualMachineNetworkPolicies.createTitle') }), jsx(DialogDescription, { children: t('virtualMachineNetworkPolicies.dialogDescription') })] }), jsxs("form", { onSubmit: handleSubmit, noValidate: true, className: "mt-1 grid gap-5", children: [formError && (jsx("div", { role: "alert", "data-testid": "network-policy-form-error", className: "rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700", children: formError })), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: nameId, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineNetworkPolicies.fieldName') }), jsx(Input, { id: nameId, value: name, maxLength: NAME_MAX_LENGTH$1, onChange: (event) => setName(event.target.value), placeholder: t('virtualMachineNetworkPolicies.namePlaceholder'), "aria-invalid": fieldErrors.name ? true : undefined, "aria-describedby": fieldErrors.name ? `${nameId}-error` : undefined, required: true }), fieldErrors.name && (jsx("p", { id: `${nameId}-error`, role: "alert", className: "text-xs text-red-600", children: fieldErrors.name }))] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: hostsId, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineNetworkPolicies.fieldHosts') }), jsx(HostPortChipInput, { id: hostsId, value: hosts, onChange: setHosts, allowIpAddresses: true, maxEntries: VIRTUAL_MACHINE_MAX_POLICY_HOSTS, hint: t('virtualMachineNetworkPolicies.hostsHint', {
233747
+ max: VIRTUAL_MACHINE_MAX_POLICY_HOSTS,
233748
+ }), error: fieldErrors.allowed_hosts, testId: "network-policy-hosts" }), removedHosts.length > 0 && (jsxs("div", { role: "status", "data-testid": "network-policy-removed-hosts-warning", className: "flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-800", children: [jsx(TriangleAlert, { className: "mt-0.5 h-4 w-4 shrink-0", "aria-hidden": "true" }), jsx("span", { children: t('virtualMachineNetworkPolicies.removedHostsWarning', {
233749
+ hosts: removedHosts.join(', '),
233750
+ }) })] }))] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: descriptionId, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineNetworkPolicies.fieldDescription') }), jsx(Textarea, { id: descriptionId, value: description, rows: 2, onChange: (event) => setDescription(event.target.value), placeholder: t('virtualMachineNetworkPolicies.descriptionPlaceholder'), "aria-invalid": fieldErrors.description ? true : undefined, "aria-describedby": fieldErrors.description ? `${descriptionId}-error` : undefined }), fieldErrors.description && (jsx("p", { id: `${descriptionId}-error`, role: "alert", className: "text-xs text-red-600", children: fieldErrors.description }))] }), jsxs(DialogFooter, { children: [jsx(Button$1, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSaving, children: t('virtualMachineNetworkPolicies.cancel') }), jsxs(Button$1, { type: "submit", disabled: isSaving, "data-testid": "network-policy-save", className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isSaving && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }), isEdit
233751
+ ? t('virtualMachineNetworkPolicies.saveChanges')
233752
+ : t('virtualMachineNetworkPolicies.createPolicy')] })] })] })] }) }));
233753
+ }
233754
+
233755
+ const HOST_PREVIEW_COUNT$1 = 3;
233756
+ /** Placeholder swapped for the inline record in the delete sentence. */
233757
+ const RECORD_SLOT$1 = '__record__';
233758
+ const MENTOR_LOOKUP_LIMIT = 100;
233759
+ /** "3 days ago" for a backend timestamp, or a dash when it is unusable. */
233760
+ function relativeTime$1(value) {
233761
+ const date = new Date(value);
233762
+ return Number.isNaN(date.getTime()) ? '—' : formatDistanceToNow(date, { addSuffix: true });
233763
+ }
233764
+ /**
233765
+ * Network policies table with create / edit / delete. Deleting a policy an
233766
+ * agent still uses is refused by the backend; the refusal names the agents,
233767
+ * which are listed (by name where the tenant agent list resolves them, else
233768
+ * by id) so the admin knows what to move off it first.
233769
+ */
233770
+ function NetworkPoliciesSection({ tenantKey, username, policies, isLoading, isError, }) {
233771
+ var _a;
233772
+ const t = useT();
233773
+ const [dialogOpen, setDialogOpen] = useState(false);
233774
+ const [editingPolicy, setEditingPolicy] = useState(null);
233775
+ const [deletingPolicy, setDeletingPolicy] = useState(null);
233776
+ const [deleteFailure, setDeleteFailure] = useState(null);
233777
+ const [deletePolicy, { isLoading: isDeleting }] = useDeleteVirtualMachineNetworkPolicyMutation();
233778
+ const boundMentorIds = (_a = deleteFailure === null || deleteFailure === void 0 ? void 0 : deleteFailure.boundMentorIds) !== null && _a !== void 0 ? _a : [];
233779
+ // Best-effort names for the agents named in a refused delete.
233780
+ const { data: mentorsData } = useGetMentorsQuery({ org: tenantKey, username: username !== null && username !== void 0 ? username : '', limit: MENTOR_LOOKUP_LIMIT }, { skip: !username || boundMentorIds.length === 0 });
233781
+ const mentorNames = useMemo(() => {
233782
+ const names = new Map();
233783
+ const results = mentorsData === null || mentorsData === void 0 ? void 0 : mentorsData.results;
233784
+ for (const mentor of results !== null && results !== void 0 ? results : []) {
233785
+ if (mentor.unique_id && mentor.name)
233786
+ names.set(mentor.unique_id, mentor.name);
233787
+ }
233788
+ return names;
233789
+ }, [mentorsData]);
233790
+ // The translated sentence with the policy name rendered inline, whatever the word order.
233791
+ const [deleteConfirmBefore, deleteConfirmAfter] = t('virtualMachineNetworkPolicies.deleteConfirm', {
233792
+ name: RECORD_SLOT$1,
233793
+ }).split(RECORD_SLOT$1);
233794
+ const openCreate = () => {
233795
+ setEditingPolicy(null);
233796
+ setDialogOpen(true);
233797
+ };
233798
+ const openEdit = (policy) => {
233799
+ setEditingPolicy(policy);
233800
+ setDialogOpen(true);
233801
+ };
233802
+ const openDelete = (policy) => {
233803
+ setDeleteFailure(null);
233804
+ setDeletingPolicy(policy);
233805
+ };
233806
+ const handleDelete = async (policy) => {
233807
+ var _a;
233808
+ try {
233809
+ await deletePolicy({ org: tenantKey, id: policy.id }).unwrap();
233810
+ toast.success(t('virtualMachineNetworkPolicies.deleted'));
233811
+ setDeletingPolicy(null);
233812
+ }
233813
+ catch (error) {
233814
+ const parsed = getVirtualMachineApiError(error);
233815
+ const boundIds = extractBoundMentorIds(parsed.message);
233816
+ setDeleteFailure({
233817
+ message: parsed.status === 403
233818
+ ? t('virtualMachineNetworkPolicies.forbiddenDelete')
233819
+ : boundIds.length > 0
233820
+ ? t('virtualMachineNetworkPolicies.deleteBlockedInUse')
233821
+ : ((_a = parsed.message) !== null && _a !== void 0 ? _a : t('virtualMachineNetworkPolicies.deleteFailed')),
233822
+ boundMentorIds: boundIds,
233823
+ });
233824
+ }
233825
+ };
233826
+ return (jsxs("div", { "data-testid": "vm-network-policies-section", className: "space-y-4", children: [jsx("div", { className: "flex justify-end", children: jsxs(Button$1, { size: "sm", onClick: openCreate, "data-testid": "vm-network-policy-new", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }), t('virtualMachineNetworkPolicies.newPolicy')] }) }), isLoading ? (jsx("div", { className: "flex h-40 items-center justify-center", children: jsx(Spinner, {}) })) : isError ? (jsx("div", { role: "alert", className: "rounded-lg border border-red-200 bg-red-50 px-6 py-6 text-center text-sm text-red-700", children: t('virtualMachineNetworkPolicies.loadFailed') })) : (jsx("div", { className: "overflow-x-auto rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "border-b border-gray-200 bg-gray-50 dark:border-gray-600 dark:bg-gray-700", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.colName') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.colHosts') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.colDescription') }), jsx("th", { className: "px-6 py-3 text-left font-medium whitespace-nowrap text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.colUpdated') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.colActions') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [policies.map((policy) => {
233827
+ const preview = policy.allowed_hosts.slice(0, HOST_PREVIEW_COUNT$1);
233828
+ const remaining = policy.allowed_hosts.length - preview.length;
233829
+ return (jsxs("tr", { "data-testid": `vm-network-policy-row-${policy.id}`, children: [jsx("td", { className: "px-6 py-4 font-medium text-gray-900 dark:text-gray-100", children: policy.name }), jsx("td", { className: "px-6 py-4", children: jsxs("ul", { role: "list", "aria-label": t('virtualMachineNetworkPolicies.hostsListAriaLabel', {
233830
+ name: policy.name,
233831
+ }), className: "flex flex-wrap gap-1", children: [preview.map((host) => (jsx("li", { className: "rounded-md border border-gray-200 bg-gray-50 px-2 py-0.5 font-mono text-xs text-gray-700", children: host }, host))), remaining > 0 && (jsx("li", { className: "px-1 py-0.5 text-xs text-gray-500", children: t('virtualMachineNetworkPolicies.moreHosts', { count: remaining }) }))] }) }), jsx("td", { className: "max-w-0 px-6 py-4 text-gray-600 dark:text-gray-300", children: jsx("div", { className: "truncate", children: policy.description || '—' }) }), jsx("td", { className: "px-6 py-4 whitespace-nowrap text-gray-600 dark:text-gray-300", children: relativeTime$1(policy.updated_at) }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex justify-end gap-1", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(policy), "aria-label": t('virtualMachineNetworkPolicies.editAriaLabel', {
233832
+ name: policy.name,
233833
+ }), "data-testid": `vm-network-policy-edit-${policy.id}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openDelete(policy), "aria-label": t('virtualMachineNetworkPolicies.deleteAriaLabel', {
233834
+ name: policy.name,
233835
+ }), "data-testid": `vm-network-policy-delete-${policy.id}`, className: "text-red-600 hover:text-red-700", children: jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" }) })] }) })] }, policy.id));
233836
+ }), policies.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 5, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('virtualMachineNetworkPolicies.empty') }) }))] })] }) })), jsx(NetworkPolicyDialog, { open: dialogOpen, onOpenChange: setDialogOpen, tenantKey: tenantKey, policy: editingPolicy }), jsx(Dialog, { open: deletingPolicy !== null, onOpenChange: (open) => {
233837
+ if (!open && !isDeleting) {
233838
+ setDeletingPolicy(null);
233839
+ setDeleteFailure(null);
233840
+ }
233841
+ }, children: jsxs(DialogContent, { className: "max-w-md", "data-testid": "vm-network-policy-delete-dialog", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('virtualMachineNetworkPolicies.deleteTitle') }) }), jsxs(DialogDescription, { className: "text-gray-600", children: [deleteConfirmBefore, jsx("span", { className: "font-medium text-gray-900", children: deletingPolicy === null || deletingPolicy === void 0 ? void 0 : deletingPolicy.name }), deleteConfirmAfter] }), deleteFailure && (jsxs("div", { role: "alert", "data-testid": "vm-network-policy-delete-error", className: "space-y-2 rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700", children: [jsx("p", { children: deleteFailure.message }), boundMentorIds.length > 0 && (jsx("ul", { role: "list", className: "list-disc space-y-0.5 pl-5", children: boundMentorIds.map((id) => {
233842
+ var _a;
233843
+ return (jsx("li", { children: (_a = mentorNames.get(id)) !== null && _a !== void 0 ? _a : id }, id));
233844
+ }) }))] })), jsxs(DialogFooter, { className: "pt-2", children: [jsx(Button$1, { type: "button", variant: "outline", disabled: isDeleting, onClick: () => {
233845
+ setDeletingPolicy(null);
233846
+ setDeleteFailure(null);
233847
+ }, children: t('virtualMachineNetworkPolicies.cancel') }), boundMentorIds.length === 0 && deletingPolicy && (jsxs(Button$1, { type: "button", onClick: () => void handleDelete(deletingPolicy), disabled: isDeleting, "data-testid": "vm-network-policy-delete-confirm", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isDeleting && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }), t('virtualMachineNetworkPolicies.delete')] }))] })] }) })] }));
233848
+ }
233849
+
233850
+ function fieldKeys(value) {
233851
+ if (value && typeof value === 'object' && !Array.isArray(value)) {
233852
+ return Object.keys(value);
233853
+ }
233854
+ // Some serialisers hand the masked value back as a JSON string.
233855
+ if (typeof value === 'string') {
233856
+ try {
233857
+ return fieldKeys(JSON.parse(value));
233858
+ }
233859
+ catch (_a) {
233860
+ return [];
233861
+ }
233862
+ }
233863
+ return [];
233864
+ }
233865
+ /**
233866
+ * Normalise the integration-credential list response into picker options.
233867
+ * Tolerates a bare array or a `{ results }` / `{ data }` wrapper, and drops
233868
+ * rows without a numeric id.
233869
+ */
233870
+ function toIntegrationCredentialOptions(data) {
233871
+ var _a, _b;
233872
+ const rows = Array.isArray(data)
233873
+ ? data
233874
+ : data && typeof data === 'object'
233875
+ ? ((_b = (_a = data.results) !== null && _a !== void 0 ? _a : data.data) !== null && _b !== void 0 ? _b : [])
233876
+ : [];
233877
+ const options = [];
233878
+ for (const row of rows) {
233879
+ if (!row || typeof row !== 'object')
233880
+ continue;
233881
+ const { id, name, value } = row;
233882
+ if (typeof id !== 'number')
233883
+ continue;
233884
+ options.push({
233885
+ id,
233886
+ name: typeof name === 'string' && name ? name : String(id),
233887
+ fields: fieldKeys(value),
233888
+ });
233889
+ }
233890
+ return options.sort((a, b) => a.name.localeCompare(b.name));
233891
+ }
233892
+
233893
+ /**
233894
+ * Radio items in the virtual-machine forms use the same blue as the sandbox
233895
+ * switches (`data-[state=checked]:bg-blue-500`) so the selected option reads
233896
+ * as "on" like the toggles around it. The indicator is an inner svg, hence the
233897
+ * descendant variants.
233898
+ */
233899
+ const BLUE_RADIO_ITEM_CLASS = 'mt-0.5 border-gray-300 text-blue-500 data-[state=checked]:border-blue-500 [&_svg]:fill-blue-500 [&_svg]:text-blue-500';
233900
+
233901
+ const FIELD_NAMES = [
233902
+ 'name',
233903
+ 'env_var',
233904
+ 'allow_hosts',
233905
+ 'value',
233906
+ 'source_credential_id',
233907
+ 'source_field',
233908
+ ];
233909
+ const NAME_MAX_LENGTH = 255;
233910
+ const ENV_VAR_MAX_LENGTH = 128;
233911
+ /** Values that look masked (`sk-****`) are rejected by the backend too. */
233912
+ const MASKED_VALUE_PATTERN = /\*{3,}/;
233913
+ /**
233914
+ * Create / edit form for a VM secret. A secret gets its value in one of two
233915
+ * ways, offered as a choice: the admin pastes a key (stored, min 8
233916
+ * characters), or the secret points at one field of an integration
233917
+ * credential the org already saved and reads it at run time. No endpoint ever
233918
+ * returns the value, so the field is never prefilled — on edit it stays blank
233919
+ * to keep the current value — and `env_var` is read-only once created (delete
233920
+ * and recreate to rename). Backend 400s land next to the matching field or as
233921
+ * a form-level message.
233922
+ */
233923
+ function VmSecretDialog({ open, onOpenChange, tenantKey, secret = null, credentials, onSaved, }) {
233924
+ var _a;
233925
+ const t = useT();
233926
+ const baseId = useId$2();
233927
+ const ids = {
233928
+ name: `${baseId}-name`,
233929
+ envVar: `${baseId}-env-var`,
233930
+ envVarHelp: `${baseId}-env-var-help`,
233931
+ hosts: `${baseId}-hosts`,
233932
+ source: `${baseId}-source`,
233933
+ sourceValue: `${baseId}-source-value`,
233934
+ sourceCredential: `${baseId}-source-credential`,
233935
+ value: `${baseId}-value`,
233936
+ valueHelp: `${baseId}-value-help`,
233937
+ credential: `${baseId}-credential`,
233938
+ credentialLabel: `${baseId}-credential-label`,
233939
+ field: `${baseId}-field`,
233940
+ fieldLabel: `${baseId}-field-label`,
233941
+ };
233942
+ const [createSecret, { isLoading: isCreating }] = useCreateVirtualMachineSecretMutation();
233943
+ const [updateSecret, { isLoading: isUpdating }] = useUpdateVirtualMachineSecretMutation();
233944
+ const isSaving = isCreating || isUpdating;
233945
+ const [name, setName] = useState('');
233946
+ const [envVar, setEnvVar] = useState('');
233947
+ const [hosts, setHosts] = useState([]);
233948
+ const [source, setSource] = useState('value');
233949
+ const [value, setValue] = useState('');
233950
+ const [credentialId, setCredentialId] = useState('');
233951
+ const [field, setField] = useState('');
233952
+ const [fieldErrors, setFieldErrors] = useState({});
233953
+ const [formError, setFormError] = useState(null);
233954
+ // Start from the secret being edited (or blank) every time the dialog
233955
+ // opens. The value is deliberately never prefilled.
233956
+ useEffect(() => {
233957
+ var _a, _b, _c, _d;
233958
+ if (!open)
233959
+ return;
233960
+ setName((_a = secret === null || secret === void 0 ? void 0 : secret.name) !== null && _a !== void 0 ? _a : '');
233961
+ setEnvVar((_b = secret === null || secret === void 0 ? void 0 : secret.env_var) !== null && _b !== void 0 ? _b : '');
233962
+ setHosts((_c = secret === null || secret === void 0 ? void 0 : secret.allow_hosts) !== null && _c !== void 0 ? _c : []);
233963
+ const linked = (secret === null || secret === void 0 ? void 0 : secret.source_credential_id) != null;
233964
+ setSource(linked ? 'credential' : 'value');
233965
+ setValue('');
233966
+ setCredentialId(linked ? String(secret.source_credential_id) : '');
233967
+ setField(linked ? ((_d = secret.source_field) !== null && _d !== void 0 ? _d : '') : '');
233968
+ setFieldErrors({});
233969
+ setFormError(null);
233970
+ }, [open, secret]);
233971
+ const isEdit = secret !== null;
233972
+ const selectedCredential = credentials.find((option) => String(option.id) === credentialId);
233973
+ const credentialFields = (_a = selectedCredential === null || selectedCredential === void 0 ? void 0 : selectedCredential.fields) !== null && _a !== void 0 ? _a : [];
233974
+ const handleSubmit = async (event) => {
233975
+ event.preventDefault();
233976
+ const trimmedName = name.trim();
233977
+ const trimmedEnvVar = envVar.trim();
233978
+ const clientErrors = {};
233979
+ if (!trimmedName)
233980
+ clientErrors.name = t('virtualMachineSecrets.errorNameRequired');
233981
+ if (!isEdit) {
233982
+ if (!trimmedEnvVar) {
233983
+ clientErrors.env_var = t('virtualMachineSecrets.errorEnvVarRequired');
233984
+ }
233985
+ else if (!VIRTUAL_MACHINE_ENV_VAR_PATTERN.test(trimmedEnvVar)) {
233986
+ clientErrors.env_var = t('virtualMachineSecrets.errorEnvVarFormat');
233987
+ }
233988
+ }
233989
+ if (hosts.length === 0)
233990
+ clientErrors.allow_hosts = t('virtualMachineSecrets.errorHostsRequired');
233991
+ if (source === 'value') {
233992
+ if (!isEdit && !value) {
233993
+ clientErrors.value = t('virtualMachineSecrets.errorValueRequired');
233994
+ }
233995
+ else if (value && value.length < VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH) {
233996
+ clientErrors.value = t('virtualMachineSecrets.errorValueTooShort', {
233997
+ min: VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH,
233998
+ });
233999
+ }
234000
+ else if (value && MASKED_VALUE_PATTERN.test(value)) {
234001
+ clientErrors.value = t('virtualMachineSecrets.errorValueMasked');
234002
+ }
234003
+ }
234004
+ else {
234005
+ if (!credentialId) {
234006
+ clientErrors.source_credential_id = t('virtualMachineSecrets.errorCredentialRequired');
234007
+ }
234008
+ if (!field)
234009
+ clientErrors.source_field = t('virtualMachineSecrets.errorFieldRequired');
234010
+ }
234011
+ setFieldErrors(clientErrors);
234012
+ setFormError(null);
234013
+ if (Object.keys(clientErrors).length > 0)
234014
+ return;
234015
+ try {
234016
+ let saved;
234017
+ if (isEdit) {
234018
+ const body = { env_var: secret.env_var };
234019
+ if (trimmedName !== secret.name)
234020
+ body.name = trimmedName;
234021
+ if (hosts.length !== secret.allow_hosts.length ||
234022
+ hosts.some((host, index) => host !== secret.allow_hosts[index])) {
234023
+ body.allow_hosts = hosts;
234024
+ }
234025
+ if (source === 'value') {
234026
+ // A blank value keeps the stored one; a new value replaces it (and
234027
+ // drops any credential link on the backend).
234028
+ if (value)
234029
+ body.value = value;
234030
+ }
234031
+ else if (Number(credentialId) !== secret.source_credential_id ||
234032
+ field !== secret.source_field) {
234033
+ body.source_credential_id = Number(credentialId);
234034
+ body.source_field = field;
234035
+ }
234036
+ if (Object.keys(body).length === 1) {
234037
+ onOpenChange(false);
234038
+ return;
234039
+ }
234040
+ saved = await updateSecret({ org: tenantKey, body }).unwrap();
234041
+ toast.success(t('virtualMachineSecrets.updated'));
234042
+ }
234043
+ else {
234044
+ const body = {
234045
+ name: trimmedName,
234046
+ env_var: trimmedEnvVar,
234047
+ allow_hosts: hosts,
234048
+ ...(source === 'value'
234049
+ ? { value }
234050
+ : { source_credential_id: Number(credentialId), source_field: field }),
234051
+ };
234052
+ saved = await createSecret({ org: tenantKey, body }).unwrap();
234053
+ toast.success(t('virtualMachineSecrets.created'));
234054
+ }
234055
+ onSaved === null || onSaved === void 0 ? void 0 : onSaved(saved);
234056
+ onOpenChange(false);
234057
+ }
234058
+ catch (error) {
234059
+ const parsed = getVirtualMachineApiError(error);
234060
+ if (parsed.status === 403) {
234061
+ setFormError(t('virtualMachineSecrets.forbiddenWrite'));
234062
+ return;
234063
+ }
234064
+ const nextErrors = {};
234065
+ let unmatched = [];
234066
+ for (const [key, messages] of Object.entries(parsed.fieldErrors)) {
234067
+ if (FIELD_NAMES.includes(key)) {
234068
+ nextErrors[key] = messages.join(' ');
234069
+ }
234070
+ else {
234071
+ unmatched = unmatched.concat(messages);
234072
+ }
234073
+ }
234074
+ setFieldErrors(nextErrors);
234075
+ const message = [parsed.message, ...unmatched].filter(Boolean).join(' ');
234076
+ if (message) {
234077
+ setFormError(message);
234078
+ }
234079
+ else if (Object.keys(nextErrors).length === 0) {
234080
+ setFormError(t('virtualMachineSecrets.saveFailed'));
234081
+ }
234082
+ }
234083
+ };
234084
+ const fieldError = (key, id) => fieldErrors[key] ? (jsx("p", { id: `${id}-error`, role: "alert", className: "text-xs text-red-600", children: fieldErrors[key] })) : null;
234085
+ return (jsx(Dialog, { open: open, onOpenChange: (next) => !isSaving && onOpenChange(next), children: jsxs(DialogContent, { className: "max-h-[90vh] w-full max-w-lg overflow-y-auto", "data-testid": "vm-secret-dialog", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { className: "ibl-dialog-title", children: isEdit ? t('virtualMachineSecrets.editTitle') : t('virtualMachineSecrets.createTitle') }), jsx(DialogDescription, { children: t('virtualMachineSecrets.dialogDescription') })] }), jsxs("form", { onSubmit: handleSubmit, noValidate: true, className: "mt-1 grid gap-5", children: [formError && (jsx("div", { role: "alert", "data-testid": "vm-secret-form-error", className: "rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700", children: formError })), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: ids.name, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldName') }), jsx(Input, { id: ids.name, value: name, maxLength: NAME_MAX_LENGTH, onChange: (event) => setName(event.target.value), placeholder: t('virtualMachineSecrets.namePlaceholder'), "aria-invalid": fieldErrors.name ? true : undefined, "aria-describedby": fieldErrors.name ? `${ids.name}-error` : undefined, required: true }), fieldError('name', ids.name)] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: ids.envVar, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldEnvVar') }), jsx(Input, { id: ids.envVar, value: envVar, maxLength: ENV_VAR_MAX_LENGTH, readOnly: isEdit, disabled: isEdit, onChange: (event) => setEnvVar(event.target.value), placeholder: t('virtualMachineSecrets.envVarPlaceholder'), autoCapitalize: "characters", autoComplete: "off", spellCheck: false, className: "font-mono", "aria-invalid": fieldErrors.env_var ? true : undefined, "aria-describedby": [ids.envVarHelp, fieldErrors.env_var ? `${ids.envVar}-error` : '']
234086
+ .filter(Boolean)
234087
+ .join(' '), required: !isEdit }), jsx("p", { id: ids.envVarHelp, className: "text-xs text-gray-500", children: isEdit
234088
+ ? t('virtualMachineSecrets.envVarReadOnlyHelp')
234089
+ : t('virtualMachineSecrets.envVarHelp') }), fieldError('env_var', ids.envVar)] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: ids.hosts, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldHosts') }), jsx(HostPortChipInput, { id: ids.hosts, value: hosts, onChange: setHosts, hint: t('virtualMachineSecrets.hostsHint'), error: fieldErrors.allow_hosts, testId: "vm-secret-hosts" })] }), jsxs("fieldset", { className: "space-y-3", children: [jsx("legend", { id: ids.source, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldSource') }), jsxs(RadioGroup, { value: source, onValueChange: (next) => setSource(next), "aria-labelledby": ids.source, className: "gap-3", children: [jsxs("div", { className: "flex items-start gap-3", children: [jsx(RadioGroupItem, { value: "value", id: ids.sourceValue, "data-testid": "vm-secret-source-value", className: BLUE_RADIO_ITEM_CLASS }), jsxs(Label$1, { htmlFor: ids.sourceValue, className: "flex flex-col gap-1 font-normal", children: [jsx("span", { className: "text-[13px] font-medium text-[#646464]", children: t('virtualMachineSecrets.sourceValue') }), jsx("span", { className: "text-xs text-gray-500", children: t('virtualMachineSecrets.sourceValueDescription') })] })] }), jsxs("div", { className: "flex items-start gap-3", children: [jsx(RadioGroupItem, { value: "credential", id: ids.sourceCredential, "data-testid": "vm-secret-source-credential", className: BLUE_RADIO_ITEM_CLASS }), jsxs(Label$1, { htmlFor: ids.sourceCredential, className: "flex flex-col gap-1 font-normal", children: [jsx("span", { className: "text-[13px] font-medium text-[#646464]", children: t('virtualMachineSecrets.sourceCredential') }), jsx("span", { className: "text-xs text-gray-500", children: t('virtualMachineSecrets.sourceCredentialDescription') })] })] })] })] }), source === 'value' ? (jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { htmlFor: ids.value, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldValue') }), jsx(Input, { id: ids.value, type: "password", value: value, onChange: (event) => setValue(event.target.value), placeholder: isEdit
234090
+ ? t('virtualMachineSecrets.valueKeepPlaceholder')
234091
+ : t('virtualMachineSecrets.valuePlaceholder'), autoComplete: "new-password", spellCheck: false, "aria-invalid": fieldErrors.value ? true : undefined, "aria-describedby": [ids.valueHelp, fieldErrors.value ? `${ids.value}-error` : '']
234092
+ .filter(Boolean)
234093
+ .join(' '), required: !isEdit, "data-testid": "vm-secret-value" }), jsx("p", { id: ids.valueHelp, className: "text-xs text-gray-500", children: isEdit
234094
+ ? t('virtualMachineSecrets.valueKeepHelp')
234095
+ : t('virtualMachineSecrets.valueHelp', {
234096
+ min: VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH,
234097
+ }) }), fieldError('value', ids.value)] })) : (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { id: ids.credentialLabel, htmlFor: ids.credential, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldCredential') }), credentials.length === 0 ? (jsx("p", { className: "text-xs text-gray-500", "data-testid": "vm-secret-no-credentials", children: t('virtualMachineSecrets.noCredentials') })) : (jsxs(Select$1, { value: credentialId, onValueChange: (next) => {
234098
+ setCredentialId(next);
234099
+ setField('');
234100
+ }, children: [jsx(SelectTrigger, { id: ids.credential, "aria-labelledby": ids.credentialLabel, "aria-invalid": fieldErrors.source_credential_id ? true : undefined, "data-testid": "vm-secret-credential-select", children: jsx(SelectValue, { placeholder: t('virtualMachineSecrets.credentialPlaceholder') }) }), jsx(SelectContent, { children: credentials.map((option) => (jsx(SelectItem, { value: String(option.id), children: option.name }, option.id))) })] })), fieldError('source_credential_id', ids.credential)] }), jsxs("div", { className: "space-y-1.5", children: [jsx(Label$1, { id: ids.fieldLabel, htmlFor: ids.field, className: "flex items-center text-sm font-medium text-[#646464]", children: t('virtualMachineSecrets.fieldCredentialField') }), jsxs(Select$1, { value: field, onValueChange: setField, disabled: !selectedCredential || credentialFields.length === 0, children: [jsx(SelectTrigger, { id: ids.field, "aria-labelledby": ids.fieldLabel, "aria-invalid": fieldErrors.source_field ? true : undefined, "data-testid": "vm-secret-field-select", children: jsx(SelectValue, { placeholder: t('virtualMachineSecrets.credentialFieldPlaceholder') }) }), jsx(SelectContent, { children: credentialFields.map((key) => (jsx(SelectItem, { value: key, children: key }, key))) })] }), selectedCredential && credentialFields.length === 0 && (jsx("p", { className: "text-xs text-gray-500", children: t('virtualMachineSecrets.credentialNoFields') })), fieldError('source_field', ids.field)] })] })), jsxs(DialogFooter, { children: [jsx(Button$1, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSaving, children: t('virtualMachineSecrets.cancel') }), jsxs(Button$1, { type: "submit", disabled: isSaving, "data-testid": "vm-secret-save", className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isSaving && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }), isEdit
234101
+ ? t('virtualMachineSecrets.saveChanges')
234102
+ : t('virtualMachineSecrets.createSecret')] })] })] })] }) }));
234103
+ }
234104
+
234105
+ const HOST_PREVIEW_COUNT = 3;
234106
+ /** Placeholder swapped for the inline variable in the delete sentence. */
234107
+ const RECORD_SLOT = '__record__';
234108
+ /** "3 days ago" for a backend timestamp, or a dash when it is unusable. */
234109
+ function relativeTime(value) {
234110
+ const date = new Date(value);
234111
+ return Number.isNaN(date.getTime()) ? '—' : formatDistanceToNow(date, { addSuffix: true });
234112
+ }
234113
+ /**
234114
+ * VM secrets table with create / edit / delete. A value is never displayed
234115
+ * — the Source column only says whether the secret holds a stored value or
234116
+ * follows an integration credential's field. Deleting a secret also unbinds
234117
+ * it from every agent that uses it, which the confirmation spells out.
234118
+ */
234119
+ function VmSecretsSection({ tenantKey, secrets, isLoading, isError, }) {
234120
+ const t = useT();
234121
+ const [dialogOpen, setDialogOpen] = useState(false);
234122
+ const [editingSecret, setEditingSecret] = useState(null);
234123
+ const [deletingSecret, setDeletingSecret] = useState(null);
234124
+ const [deleteError, setDeleteError] = useState(null);
234125
+ const [deleteSecret, { isLoading: isDeleting }] = useDeleteVirtualMachineSecretMutation();
234126
+ // The org's integration credentials feed the "use an existing credential"
234127
+ // source in the form and name the credential in the Source column.
234128
+ const { data: credentialsData } = useGetIntegrationCredentialsQuery({ org: tenantKey });
234129
+ const credentials = useMemo(() => toIntegrationCredentialOptions(credentialsData), [credentialsData]);
234130
+ const credentialNames = useMemo(() => new Map(credentials.map((option) => [option.id, option.name])), [credentials]);
234131
+ const sourceLabel = (secret) => {
234132
+ var _a;
234133
+ if (secret.source_credential_id == null)
234134
+ return t('virtualMachineSecrets.sourceStored');
234135
+ const credentialName = (_a = credentialNames.get(secret.source_credential_id)) !== null && _a !== void 0 ? _a : `#${secret.source_credential_id}`;
234136
+ return t('virtualMachineSecrets.sourceFromCredential', {
234137
+ credential: credentialName,
234138
+ field: secret.source_field,
234139
+ });
234140
+ };
234141
+ // The translated sentence with the variable rendered as the table's code chip.
234142
+ const [deleteConfirmBefore, deleteConfirmAfter] = t('virtualMachineSecrets.deleteConfirm', {
234143
+ envVar: RECORD_SLOT,
234144
+ }).split(RECORD_SLOT);
234145
+ const openCreate = () => {
234146
+ setEditingSecret(null);
234147
+ setDialogOpen(true);
234148
+ };
234149
+ const openEdit = (secret) => {
234150
+ setEditingSecret(secret);
234151
+ setDialogOpen(true);
234152
+ };
234153
+ const openDelete = (secret) => {
234154
+ setDeleteError(null);
234155
+ setDeletingSecret(secret);
234156
+ };
234157
+ const handleDelete = async (secret) => {
234158
+ var _a;
234159
+ try {
234160
+ await deleteSecret({ org: tenantKey, envVar: secret.env_var }).unwrap();
234161
+ toast.success(t('virtualMachineSecrets.deleted'));
234162
+ setDeletingSecret(null);
234163
+ }
234164
+ catch (error) {
234165
+ const parsed = getVirtualMachineApiError(error);
234166
+ setDeleteError(parsed.status === 403
234167
+ ? t('virtualMachineSecrets.forbiddenDelete')
234168
+ : ((_a = parsed.message) !== null && _a !== void 0 ? _a : t('virtualMachineSecrets.deleteFailed')));
234169
+ }
234170
+ };
234171
+ return (jsxs("div", { "data-testid": "vm-secrets-section", className: "space-y-4", children: [jsx("div", { className: "flex justify-end", children: jsxs(Button$1, { size: "sm", onClick: openCreate, "data-testid": "vm-secret-new", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }), t('virtualMachineSecrets.newSecret')] }) }), isLoading ? (jsx("div", { className: "flex h-40 items-center justify-center", children: jsx(Spinner, {}) })) : isError ? (jsx("div", { role: "alert", className: "rounded-lg border border-red-200 bg-red-50 px-6 py-6 text-center text-sm text-red-700", children: t('virtualMachineSecrets.loadFailed') })) : (jsx("div", { className: "overflow-x-auto rounded-lg border border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "border-b border-gray-200 bg-gray-50 dark:border-gray-600 dark:bg-gray-700", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colName') }), jsx("th", { className: "px-6 py-3 text-left font-medium whitespace-nowrap text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colEnvVar') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colHosts') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colSource') }), jsx("th", { className: "px-6 py-3 text-left font-medium whitespace-nowrap text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colUpdated') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.colActions') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [secrets.map((secret) => {
234172
+ const preview = secret.allow_hosts.slice(0, HOST_PREVIEW_COUNT);
234173
+ const remaining = secret.allow_hosts.length - preview.length;
234174
+ return (jsxs("tr", { "data-testid": `vm-secret-row-${secret.env_var}`, children: [jsx("td", { className: "px-6 py-4 font-medium text-gray-900 dark:text-gray-100", children: secret.name }), jsx("td", { className: "px-6 py-4", children: jsx("code", { className: "rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs text-gray-800", children: secret.env_var }) }), jsx("td", { className: "px-6 py-4", children: jsxs("ul", { role: "list", "aria-label": t('virtualMachineSecrets.hostsListAriaLabel', {
234175
+ name: secret.name,
234176
+ }), className: "flex flex-wrap gap-1", children: [preview.map((host) => (jsx("li", { className: "rounded-md border border-gray-200 bg-gray-50 px-2 py-0.5 font-mono text-xs text-gray-700", children: host }, host))), remaining > 0 && (jsx("li", { className: "px-1 py-0.5 text-xs text-gray-500", children: t('virtualMachineSecrets.moreHosts', { count: remaining }) }))] }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300", children: sourceLabel(secret) }), jsx("td", { className: "px-6 py-4 whitespace-nowrap text-gray-600 dark:text-gray-300", children: relativeTime(secret.updated_at) }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex justify-end gap-1", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(secret), "aria-label": t('virtualMachineSecrets.editAriaLabel', {
234177
+ name: secret.name,
234178
+ }), "data-testid": `vm-secret-edit-${secret.env_var}`, children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openDelete(secret), "aria-label": t('virtualMachineSecrets.deleteAriaLabel', {
234179
+ name: secret.name,
234180
+ }), "data-testid": `vm-secret-delete-${secret.env_var}`, className: "text-red-600 hover:text-red-700", children: jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" }) })] }) })] }, secret.id));
234181
+ }), secrets.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 6, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('virtualMachineSecrets.empty') }) }))] })] }) })), jsx(VmSecretDialog, { open: dialogOpen, onOpenChange: setDialogOpen, tenantKey: tenantKey, secret: editingSecret, credentials: credentials }), jsx(Dialog, { open: deletingSecret !== null, onOpenChange: (open) => {
234182
+ if (!open && !isDeleting) {
234183
+ setDeletingSecret(null);
234184
+ setDeleteError(null);
234185
+ }
234186
+ }, children: jsxs(DialogContent, { className: "max-w-md", "data-testid": "vm-secret-delete-dialog", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: t('virtualMachineSecrets.deleteTitle') }) }), jsxs(DialogDescription, { className: "text-gray-600", children: [deleteConfirmBefore, jsx("code", { className: "rounded bg-gray-100 px-1.5 py-0.5 font-mono text-xs text-gray-800", children: deletingSecret === null || deletingSecret === void 0 ? void 0 : deletingSecret.env_var }), deleteConfirmAfter] }), deleteError && (jsx("div", { role: "alert", "data-testid": "vm-secret-delete-error", className: "rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700", children: deleteError })), jsxs(DialogFooter, { className: "pt-2", children: [jsx(Button$1, { type: "button", variant: "outline", disabled: isDeleting, onClick: () => {
234187
+ setDeletingSecret(null);
234188
+ setDeleteError(null);
234189
+ }, children: t('virtualMachineSecrets.cancel') }), jsxs(Button$1, { type: "button", onClick: () => {
234190
+ if (deletingSecret)
234191
+ void handleDelete(deletingSecret);
234192
+ }, disabled: isDeleting, "data-testid": "vm-secret-delete-confirm", className: "cursor-pointer bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", children: [isDeleting && jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" }), t('virtualMachineSecrets.delete')] })] })] }) })] }));
234193
+ }
234194
+
234195
+ /**
234196
+ * Tenant-settings **Virtual Machine** tab. Org admins manage the two records
234197
+ * that decide what an agent's Virtual Machine Shell can reach: reusable
234198
+ * `host:port` network policies (bound under the `custom` egress profile) and
234199
+ * VM secrets the VM can use but never read. Each section is hidden when its
234200
+ * list call answers 403; when both do, a single permission notice remains.
234201
+ */
234202
+ function VirtualMachineAdminTab({ tenantKey, username, defaultTab = 'network-policies', }) {
234203
+ var _a, _b;
234204
+ const t = useT();
234205
+ const policiesQuery = useListVirtualMachineNetworkPoliciesQuery({ org: tenantKey });
234206
+ const secretsQuery = useListVirtualMachineSecretsQuery({ org: tenantKey });
234207
+ const policiesForbidden = getVirtualMachineErrorStatus(policiesQuery.error) === 403;
234208
+ const secretsForbidden = getVirtualMachineErrorStatus(secretsQuery.error) === 403;
234209
+ if (policiesQuery.isLoading && secretsQuery.isLoading) {
234210
+ return (jsxs("div", { className: "space-y-6", "data-testid": "vm-admin-loading", children: [jsx(Skeleton, { className: "h-10 w-full max-w-sm rounded-lg" }), jsx(Skeleton, { className: "h-40 w-full rounded-lg" })] }));
234211
+ }
234212
+ if (policiesForbidden && secretsForbidden) {
234213
+ return (jsx("div", { className: "max-w-2xl", children: jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, "data-testid": "vm-admin-forbidden", children: jsx("p", { className: "text-sm text-gray-500", children: t('virtualMachineAdminTab.forbidden') }) }) }));
234214
+ }
234215
+ const initialTab = (defaultTab === 'secrets' && !secretsForbidden) || policiesForbidden
234216
+ ? 'secrets'
234217
+ : 'network-policies';
234218
+ return (jsxs("div", { className: "space-y-4", children: [jsx("div", { className: "rounded-md border border-gray-200 bg-gray-50 p-3 text-xs text-gray-600", "data-testid": "vm-admin-info-box", children: t('virtualMachineAdminTab.infoBox') }), jsxs(Tabs, { defaultValue: initialTab, "aria-label": t('virtualMachineAdminTab.tabsAriaLabel'), children: [jsxs(TabsList, { "aria-label": t('virtualMachineAdminTab.tabsAriaLabel'), className: "max-w-full justify-start overflow-x-auto px-1", children: [!policiesForbidden && (jsx(TabsTrigger, { "data-testid": "vm-admin-sub-tab-policies", value: "network-policies", children: t('virtualMachineAdminTab.tabNetworkPolicies') })), !secretsForbidden && (jsx(TabsTrigger, { "data-testid": "vm-admin-sub-tab-secrets", value: "secrets", children: t('virtualMachineAdminTab.tabSecrets') }))] }), !policiesForbidden && (jsx(TabsContent, { className: "mt-4", value: "network-policies", children: jsx(NetworkPoliciesSection, { tenantKey: tenantKey, username: username, policies: (_a = policiesQuery.data) !== null && _a !== void 0 ? _a : [], isLoading: policiesQuery.isLoading, isError: policiesQuery.isError }) })), !secretsForbidden && (jsx(TabsContent, { className: "mt-4", value: "secrets", children: jsx(VmSecretsSection, { tenantKey: tenantKey, secrets: (_b = secretsQuery.data) !== null && _b !== void 0 ? _b : [], isLoading: secretsQuery.isLoading, isError: secretsQuery.isError }) }))] })] }));
234219
+ }
234220
+
232771
234221
  // ::- Persistent data structure representing an ordered mapping from
232772
234222
  // strings to values, with some convenient update methods.
232773
234223
  function OrderedMap(content) {
@@ -265078,7 +266528,7 @@ const ProjectFilesModal$1 = lazy(() => Promise.resolve().then(function () { retu
265078
266528
  const AddMentorToProjectModal$1 = lazy(() => Promise.resolve().then(function () { return addMentorToProjectModal; }).then((mod) => ({
265079
266529
  default: mod.AddMentorToProjectModal,
265080
266530
  })));
265081
- function ProjectLandingPage({ project, sessionId, onSubmit, onScreenSharingClick, isScreenSharingModalOpen, onPhoneCallClick, stopGenerating, tenantKey, username, enableSafetyDisclaimer, enableWebBrowsing, isStreaming, updateSessionTools, setSessionTools, activeTools, screenSharing, deepResearch, studyMode, imageGeneration, codeInterpreter, promptsIsEnabled, isPreviewMode, setMessage, mentorId, mentorUniqueId, projectId, googleSlidesIsEnabled, googleDocumentIsEnabled, artifactsEnabled, userIsStudent, isPublicRoute, navigateToProject, showExploreMentors = false, }) {
266531
+ function ProjectLandingPage({ project, sessionId, onSubmit, onScreenSharingClick, isScreenSharingModalOpen, onPhoneCallClick, stopGenerating, tenantKey, username, enableSafetyDisclaimer, enableWebBrowsing, isStreaming, updateSessionTools, setSessionTools, activeTools, screenSharing, deepResearch, studyMode, imageGeneration, codeInterpreter, promptsIsEnabled, isPreviewMode, setMessage, mentorId, mentorUniqueId, projectId, googleSlidesIsEnabled, googleDocumentIsEnabled, artifactsEnabled, userIsStudent, isPublicRoute, navigateToProject, showExploreMentors = false, disabledResourceTypes, maxUploadSizeMb, dropboxExtensions, }) {
265082
266532
  var _a;
265083
266533
  const [isInstructionsModalOpen, setIsInstructionsModalOpen] = useState(false);
265084
266534
  const [isFilesModalOpen, setIsFilesModalOpen] = useState(false);
@@ -265091,7 +266541,7 @@ function ProjectLandingPage({ project, sessionId, onSubmit, onScreenSharingClick
265091
266541
  name: mentor.name,
265092
266542
  avatar: mentor.profile_image,
265093
266543
  description: mentor.description,
265094
- })), onAddMentorClick: () => setIsAddMentorModalOpen(true), showTitle: true, tenantKey: tenantKey, mentorId: mentorId, projectId: projectId, username: username, navigateToProject: navigateToProject }))] })] })] }), isInstructionsModalOpen && (jsx(Suspense, { fallback: null, children: jsx(ProjectInstructionsModal$1, { isOpen: isInstructionsModalOpen, onClose: () => setIsInstructionsModalOpen(false), tenantKey: tenantKey, projectId: projectId, username: username }) })), isFilesModalOpen && (jsx(Suspense, { fallback: null, children: jsx(ProjectFilesModal$1, { isOpen: isFilesModalOpen, onClose: () => setIsFilesModalOpen(false), tenantKey: tenantKey, mentorId: mentorId, username: username }) })), isAddMentorModalOpen && (jsx(Suspense, { fallback: null, children: jsx(AddMentorToProjectModal$1, { isOpen: isAddMentorModalOpen, onClose: () => setIsAddMentorModalOpen(false), projectName: project.name, tenantKey: tenantKey, projectId: projectId, username: username, isPublicRoute: isPublicRoute }) }))] }));
266544
+ })), onAddMentorClick: () => setIsAddMentorModalOpen(true), showTitle: true, tenantKey: tenantKey, mentorId: mentorId, projectId: projectId, username: username, navigateToProject: navigateToProject }))] })] })] }), isInstructionsModalOpen && (jsx(Suspense, { fallback: null, children: jsx(ProjectInstructionsModal$1, { isOpen: isInstructionsModalOpen, onClose: () => setIsInstructionsModalOpen(false), tenantKey: tenantKey, projectId: projectId, username: username }) })), isFilesModalOpen && (jsx(Suspense, { fallback: null, children: jsx(ProjectFilesModal$1, { isOpen: isFilesModalOpen, onClose: () => setIsFilesModalOpen(false), tenantKey: tenantKey, mentorId: mentorId, username: username, disabledResourceTypes: disabledResourceTypes, maxUploadSizeMb: maxUploadSizeMb, dropboxExtensions: dropboxExtensions }) })), isAddMentorModalOpen && (jsx(Suspense, { fallback: null, children: jsx(AddMentorToProjectModal$1, { isOpen: isAddMentorModalOpen, onClose: () => setIsAddMentorModalOpen(false), projectName: project.name, tenantKey: tenantKey, projectId: projectId, username: username, isPublicRoute: isPublicRoute }) }))] }));
265095
266545
  }
265096
266546
 
265097
266547
  function MinimumMentorAlert({ open, onOpenChange }) {
@@ -265364,8 +266814,9 @@ const TrainOrDeleteModal$1 = dynamic(() => Promise.resolve().then(function () {
265364
266814
  */
265365
266815
  function isCrawlableDocType(documentType) {
265366
266816
  const docType = documentType === null || documentType === void 0 ? void 0 : documentType.toLowerCase();
265367
- // Uploaded documents (local files like PDF, DOCX, etc.)
265368
- const uploadedFileTypes = ['file'];
266817
+ // Uploaded documents: generic local files ('file') plus the local resource
266818
+ // types that send their own fileType as the document type.
266819
+ const uploadedFileTypes = ['file', 'image', 'audio', 'video', 'zip'];
265369
266820
  if (uploadedFileTypes.some((type) => docType === null || docType === void 0 ? void 0 : docType.includes(type))) {
265370
266821
  return false;
265371
266822
  }
@@ -265376,6 +266827,12 @@ function isCrawlableDocType(documentType) {
265376
266827
  }
265377
266828
  return true;
265378
266829
  }
266830
+ /**
266831
+ * The crawler User-Agent override only applies to web crawler documents.
266832
+ */
266833
+ function isWebCrawlerDocType(documentType) {
266834
+ return !!(documentType === null || documentType === void 0 ? void 0 : documentType.toLowerCase().includes('webcrawler'));
266835
+ }
265379
266836
  function DatasetItem({ dataset, onSelect, isSelected, labels }) {
265380
266837
  var _a, _b, _c, _d, _e;
265381
266838
  const t = useT();
@@ -265452,7 +266909,7 @@ function DatasetItem({ dataset, onSelect, isSelected, labels }) {
265452
266909
  }
265453
266910
  }, className: "text-gray-500 hover:text-gray-700", disabled: isEditTrainingDocumentLoading || disabled, children: dataset.access === 'private' ? (jsxs(Fragment$1, { children: [jsx(EyeOff, { className: "h-4 w-4" }), jsx("span", { className: "sr-only", children: t('datasetsTabDatasetItem.makePublic') })] })) : (jsxs(Fragment$1, { children: [jsx(Eye, { className: "h-4 w-4" }), jsx("span", { className: "sr-only", children: t('datasetsTabDatasetItem.makePrivate') })] })) })) }) }), jsx(TableCell$1, { className: "p-3 whitespace-nowrap", children: jsx(WithFormPermissions, { name: "is_trained",
265454
266911
  // @ts-ignore
265455
- permissions: (_e = dataset === null || dataset === void 0 ? void 0 : dataset.permissions) === null || _e === void 0 ? void 0 : _e.field, children: ({ disabled }) => (jsx(TrainingStatusSwitch, { is_trained: dataset.is_trained, url: dataset.url, disabled: disabled, training_status: dataset.training_status, handleEditTrainingDocument: handleEditTrainingDocument, onUntrainSuccess: () => setIsDeleteDatasetModalOpen(true), onTrainRequest: () => setIsTrainOrDeleteModalOpen(true) })) }) })] }, dataset.id), isDeleteDatasetModalOpen && (jsx(DeleteDatasetModal$1, { isOpen: isDeleteDatasetModalOpen, onClose: () => setIsDeleteDatasetModalOpen(false), dataset: dataset, labels: labels })), isRetrainScheduleModalOpen && (jsx(RetrainScheduleModal$1, { isOpen: isRetrainScheduleModalOpen, onClose: () => setIsRetrainScheduleModalOpen(false), dataset: dataset, labels: labels })), isTrainOrDeleteModalOpen && (jsx(TrainOrDeleteModal$1, { isOpen: isTrainOrDeleteModalOpen, onClose: () => setIsTrainOrDeleteModalOpen(false), onTrain: handleTrainDataset, onDelete: handleDeleteFromTrainModal, showUserAgentField: isCrawlableDocType(dataset.document_type), isLoading: isEditTrainingDocumentLoading, labels: labels }))] }));
266912
+ permissions: (_e = dataset === null || dataset === void 0 ? void 0 : dataset.permissions) === null || _e === void 0 ? void 0 : _e.field, children: ({ disabled }) => (jsx(TrainingStatusSwitch, { is_trained: dataset.is_trained, url: dataset.url, disabled: disabled, training_status: dataset.training_status, handleEditTrainingDocument: handleEditTrainingDocument, onUntrainSuccess: () => setIsDeleteDatasetModalOpen(true), onTrainRequest: () => setIsTrainOrDeleteModalOpen(true) })) }) })] }, dataset.id), isDeleteDatasetModalOpen && (jsx(DeleteDatasetModal$1, { isOpen: isDeleteDatasetModalOpen, onClose: () => setIsDeleteDatasetModalOpen(false), dataset: dataset, labels: labels })), isRetrainScheduleModalOpen && (jsx(RetrainScheduleModal$1, { isOpen: isRetrainScheduleModalOpen, onClose: () => setIsRetrainScheduleModalOpen(false), dataset: dataset, labels: labels })), isTrainOrDeleteModalOpen && (jsx(TrainOrDeleteModal$1, { isOpen: isTrainOrDeleteModalOpen, onClose: () => setIsTrainOrDeleteModalOpen(false), onTrain: handleTrainDataset, onDelete: handleDeleteFromTrainModal, showUserAgentField: isWebCrawlerDocType(dataset.document_type), isLoading: isEditTrainingDocumentLoading, labels: labels }))] }));
265456
266913
  }
265457
266914
  function TrainingStatusSwitch({ is_trained, url, training_status, disabled, handleEditTrainingDocument, onUntrainSuccess, onTrainRequest, }) {
265458
266915
  const t = useT();
@@ -265719,6 +267176,15 @@ const resourceTypes = [
265719
267176
  accept: 'text/plain',
265720
267177
  icon: (jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("rect", { width: "24", height: "24", rx: "4", fill: "url(#paint0_linear_text)" }), jsx("path", { d: "M7 7H17V9H13V17H11V9H7V7Z", fill: "white" }), jsx("defs", { children: jsxs("linearGradient", { id: "paint0_linear_text", x1: "0", y1: "0", x2: "24", y2: "24", gradientUnits: "userSpaceOnUse", children: [jsx("stop", { stopColor: "#4F46E5" }), jsx("stop", { offset: "1", stopColor: "#06B6D4" })] }) })] })),
265721
267178
  },
267179
+ {
267180
+ id: 'markdown',
267181
+ name: 'Markdown',
267182
+ bgColor: 'bg-blue-100',
267183
+ isActive: true,
267184
+ type: 'local',
267185
+ accept: 'text/markdown,.md,.markdown',
267186
+ icon: (jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [jsx("rect", { width: "24", height: "24", rx: "4", fill: "#1F2937" }), jsx("path", { d: "M4 16V8h2l2 3 2-3h2v8H9.5v-4.6L8 13.7l-1.5-2.3V16H4Zm11.5 0L13 13h1.75V8h1.5v5H18l-2.5 3Z", fill: "white" })] })),
267187
+ },
265722
267188
  {
265723
267189
  id: 'audio',
265724
267190
  name: 'Audio',
@@ -265780,6 +267246,26 @@ const resourceTypes = [
265780
267246
  },
265781
267247
  ];
265782
267248
 
267249
+ /**
267250
+ * Shared chrome for the Add Resources picker and every per-type resource
267251
+ * dialog, mirroring the Datasets tab: a fixed header (title + description bar
267252
+ * with a divider), a body that scrolls on its own (`ResourceDialogBody`), and
267253
+ * an optional fixed footer (`ResourceDialogFooter`).
267254
+ */
267255
+ function ResourceDialogContent({ title, description, className, children, }) {
267256
+ return (jsxs(DialogContent, { className: cn('flex max-h-[80vh] w-full max-w-lg flex-col gap-0 overflow-hidden p-0', className), children: [jsxs(DialogHeader, { className: "flex-shrink-0 space-y-1 border-b border-gray-200 bg-white px-4 pt-4 pr-10 pb-3 text-left", children: [jsx(DialogTitle, { className: "text-muted-foreground text-base", children: title }), jsx(DialogDescription, { className: "text-xs text-gray-600", children: description })] }), children] }));
267257
+ }
267258
+ /** The only scrolling part of a resource dialog; focusable so keyboard users can scroll it. */
267259
+ function ResourceDialogBody({ label, children }) {
267260
+ return (jsx("div", { className: "min-h-0 flex-1 space-y-4 overflow-x-hidden overflow-y-auto p-4", tabIndex: 0, role: "region", "aria-label": label, children: children }));
267261
+ }
267262
+ /** Actions pinned below the scroll region so they stay visible. */
267263
+ function ResourceDialogFooter({ children }) {
267264
+ return (jsx("div", { className: "flex flex-shrink-0 justify-end border-t border-gray-200 bg-white px-4 py-3", children: children }));
267265
+ }
267266
+ /** Submit button styling shared by every resource dialog footer. */
267267
+ const RESOURCE_SUBMIT_BUTTON_CLASS = 'bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-sm text-white hover:text-white hover:opacity-90';
267268
+
265783
267269
  /**
265784
267270
  * Spend-cap blocks (HTTP 429) carry the machine code in `error`/`error_code`
265785
267271
  * and a friendly, learner-safe sentence in `message`. Detection keys on
@@ -265874,7 +267360,7 @@ function GithubFileUploadModal() {
265874
267360
  const { branches, error, isLoading } = useGithubRepoDetails(debouncedGithubUrl, tenantKey);
265875
267361
  const isLoadingDisabled = !githubUrl || isLoading || isAddTrainingDocumentLoading;
265876
267362
  const isDisabled = isLoadingDisabled || !branch;
265877
- return (jsxs("div", { className: "flex flex-col space-y-4", children: [jsx(Input, { type: "url", placeholder: t('resourceModalGithubFileUploadModal.githubRepoUrlPlaceholder'), value: githubUrl, onChange: (e) => setGithubUrl(e.target.value), autoComplete: "url", disabled: isAddTrainingDocumentLoading }), jsx("p", { className: "text-xs font-light text-red-500", children: error }), jsxs(Select$1, { value: branch, onValueChange: (value) => setBranch(value), disabled: isLoadingDisabled, children: [jsx(SelectTrigger, { className: "w-full rounded-md border p-2", children: jsx(SelectValue, { placeholder: t('resourceModalGithubFileUploadModal.selectBranchPlaceholder') }) }), jsx(SelectContent, { children: branches.map((b) => (jsx(SelectItem, { value: b, children: b }, b))) })] }), jsx("div", { className: "flex justify-end", children: jsx(Button$1, { onClick: handleSubmit, disabled: isDisabled, className: `${githubUrl ? 'bg-gradient-to-r from-blue-600 to-blue-400 text-white' : 'bg-gray-100 text-gray-500'} hover:opacity-90`, children: t('resourceModalGithubFileUploadModal.submit') }) })] }));
267363
+ return (jsxs(Fragment$1, { children: [jsxs(ResourceDialogBody, { label: t('resourceModalGithubFileUploadModal.scrollRegionAriaLabel'), children: [jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: "github-repo-url", children: t('resourceModalGithubFileUploadModal.repoUrlLabel') }), jsx(Input, { id: "github-repo-url", type: "url", placeholder: t('resourceModalGithubFileUploadModal.githubRepoUrlPlaceholder'), value: githubUrl, onChange: (e) => setGithubUrl(e.target.value), autoComplete: "url", disabled: isAddTrainingDocumentLoading, "aria-describedby": error ? 'github-repo-url-error' : undefined, "aria-invalid": !!error }), error ? (jsx("p", { id: "github-repo-url-error", className: "text-destructive -mt-1 text-xs", role: "alert", children: error })) : null] }), jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: "github-branch", children: t('resourceModalGithubFileUploadModal.branchLabel') }), jsxs(Select$1, { value: branch, onValueChange: (value) => setBranch(value), disabled: isLoadingDisabled, children: [jsx(SelectTrigger, { id: "github-branch", className: "w-full", children: jsx(SelectValue, { placeholder: t('resourceModalGithubFileUploadModal.selectBranchPlaceholder') }) }), jsx(SelectContent, { children: branches.map((b) => (jsx(SelectItem, { value: b, children: b }, b))) })] })] })] }), jsx(ResourceDialogFooter, { children: jsx(Button$1, { onClick: handleSubmit, disabled: isDisabled, className: RESOURCE_SUBMIT_BUTTON_CLASS, children: t('resourceModalGithubFileUploadModal.submit') }) })] }));
265878
267364
  }
265879
267365
 
265880
267366
  /**
@@ -265994,18 +267480,18 @@ function LocalFileUploadModal({ resource, maxFileSizeMB = DEFAULT_MAX_FILE_SIZE_
265994
267480
  handleUploadFile();
265995
267481
  }
265996
267482
  };
265997
- return (jsxs("div", { className: "flex flex-col items-center", children: [jsxs("div", { className: `w-full max-w-sm border-2 border-dashed ${isDraggingFile
265998
- ? 'border-blue-400 bg-blue-50/50 backdrop-blur-sm'
265999
- : 'border-gray-300 bg-gray-50'} flex flex-col items-center justify-center rounded-lg p-8 transition-all duration-200 ${!isDraggingFile && 'hover:bg-gray-100'}`, onDragOver: handleDragOver, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDrop: handleDrop, children: [jsx("div", { className: "mb-4 rounded-full bg-blue-100 p-3", children: jsx(Upload, { className: "h-8 w-8 text-blue-600" }) }), jsx("h3", { className: "mb-1 text-lg font-medium text-gray-700", children: t('resourceModalLocalFileUploadModal.dragAndDrop') }), jsx("p", { className: "mb-4 text-sm text-gray-500", children: t('resourceModalLocalFileUploadModal.or') }), jsxs("label", { htmlFor: "file-upload", className: "cursor-pointer", children: [jsx("div", { className: "rounded-md bg-gradient-to-r from-blue-600 to-blue-400 px-4 py-2 font-medium text-white transition-colors hover:opacity-90", children: t('resourceModalLocalFileUploadModal.browseFiles') }), jsx("input", { id: "file-upload", type: "file", accept: resource.accept, className: "hidden", ref: fileInputRef, onChange: handleFileChange })] }), jsx("p", { className: "mt-4 text-xs text-gray-500", children: t('resourceModalLocalFileUploadModal.maximumFileSize', {
266000
- value: maxFileSize.value,
266001
- unit: maxFileSize.unit,
266002
- }) }), file && (jsxs(Fragment$1, { children: [jsx("div", { className: "mt-4 flex w-full items-center rounded-md border border-gray-200 bg-white p-3", children: jsxs("div", { className: "flex w-full items-center", children: [jsx("div", { className: "mr-3 flex-shrink-0 rounded-md bg-blue-100 p-2", children: jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { d: "M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2Z", fill: "#4285F4" }), jsx("path", { d: "M14 2V8H20L14 2Z", fill: "#A1C2FA" })] }) }), jsxs("div", { className: "isolate z-50 min-w-0 flex-1 overflow-hidden", children: [jsx("p", { className: "truncate text-sm font-medium", children: file.name }), jsxs("p", { className: "text-xs text-gray-500", children: [convertFromBytes(file.size).value, " ", convertFromBytes(file.size).unit] })] }), jsx("button", { onClick: () => {
266003
- setFile(null);
266004
- setDescription('');
266005
- if (fileInputRef.current) {
266006
- fileInputRef.current.value = '';
266007
- }
266008
- }, className: "ml-2 flex-shrink-0 rounded-full p-1 transition-colors hover:bg-gray-100", children: jsx(X$2, { className: "h-4 w-4 text-gray-500" }) })] }) }), isImageFile(file) && (jsxs("div", { className: "mt-3 w-full", children: [jsx("label", { htmlFor: "image-description", className: "mb-1 block text-sm font-medium text-gray-700", children: t('resourceModalLocalFileUploadModal.descriptionOptional') }), jsx(Textarea, { id: "image-description", value: description, onChange: (e) => setDescription(e.target.value), placeholder: t('resourceModalLocalFileUploadModal.descriptionPlaceholder'), className: "resize-none", rows: 3 })] }))] }))] }), jsx("div", { className: "mt-4 flex w-full justify-end", children: jsx(Button$1, { onClick: handleSubmit, disabled: !file || isDisabled, className: `${file ? 'bg-gradient-to-r from-blue-600 to-blue-400 text-white' : 'bg-gray-100 text-gray-500'} hover:opacity-90`, children: isAddTrainingDocumentLoading ? (jsxs(Fragment$1, { children: [jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" }), ' ', t('resourceModalLocalFileUploadModal.submitting')] })) : (jsx(Fragment$1, { children: t('resourceModalLocalFileUploadModal.submit') })) }) })] }));
267483
+ return (jsxs(Fragment$1, { children: [jsx(ResourceDialogBody, { label: t('resourceModalLocalFileUploadModal.scrollRegionAriaLabel'), children: jsxs("div", { className: `w-full border-2 border-dashed ${isDraggingFile
267484
+ ? 'border-blue-400 bg-blue-50/50 backdrop-blur-sm'
267485
+ : 'border-gray-300 bg-gray-50'} flex flex-col items-center justify-center rounded-lg p-8 transition-all duration-200 ${!isDraggingFile && 'hover:bg-gray-100'}`, onDragOver: handleDragOver, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDrop: handleDrop, children: [jsx("div", { className: "mb-4 rounded-full bg-blue-100 p-3", children: jsx(Upload, { className: "h-8 w-8 text-blue-600" }) }), jsx("h3", { className: "mb-1 text-lg font-medium text-gray-700", children: t('resourceModalLocalFileUploadModal.dragAndDrop') }), jsx("p", { className: "mb-4 text-sm text-gray-500", children: t('resourceModalLocalFileUploadModal.or') }), jsxs("label", { htmlFor: "file-upload", className: "cursor-pointer", children: [jsx("div", { className: "rounded-md bg-gradient-to-r from-blue-600 to-blue-400 px-4 py-2 font-medium text-white transition-colors hover:opacity-90", children: t('resourceModalLocalFileUploadModal.browseFiles') }), jsx("input", { id: "file-upload", type: "file", accept: resource.accept, className: "hidden", ref: fileInputRef, onChange: handleFileChange })] }), jsx("p", { className: "mt-4 text-xs text-gray-500", children: t('resourceModalLocalFileUploadModal.maximumFileSize', {
267486
+ value: maxFileSize.value,
267487
+ unit: maxFileSize.unit,
267488
+ }) }), file && (jsxs(Fragment$1, { children: [jsx("div", { className: "mt-4 flex w-full items-center rounded-md border border-gray-200 bg-white p-3", children: jsxs("div", { className: "flex w-full items-center", children: [jsx("div", { className: "mr-3 flex-shrink-0 rounded-md bg-blue-100 p-2", children: jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { d: "M14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H18C19.1 22 20 21.1 20 20V8L14 2Z", fill: "#4285F4" }), jsx("path", { d: "M14 2V8H20L14 2Z", fill: "#A1C2FA" })] }) }), jsxs("div", { className: "isolate z-50 min-w-0 flex-1 overflow-hidden", children: [jsx("p", { className: "truncate text-sm font-medium", children: file.name }), jsxs("p", { className: "text-xs text-gray-500", children: [convertFromBytes(file.size).value, " ", convertFromBytes(file.size).unit] })] }), jsx("button", { onClick: () => {
267489
+ setFile(null);
267490
+ setDescription('');
267491
+ if (fileInputRef.current) {
267492
+ fileInputRef.current.value = '';
267493
+ }
267494
+ }, className: "ml-2 flex-shrink-0 rounded-full p-1 transition-colors hover:bg-gray-100", children: jsx(X$2, { className: "h-4 w-4 text-gray-500" }) })] }) }), isImageFile(file) && (jsxs("div", { className: "mt-3 grid w-full gap-2", children: [jsx(Label$1, { htmlFor: "image-description", children: t('resourceModalLocalFileUploadModal.descriptionOptional') }), jsx(Textarea, { id: "image-description", value: description, onChange: (e) => setDescription(e.target.value), placeholder: t('resourceModalLocalFileUploadModal.descriptionPlaceholder'), className: "resize-none", rows: 3 })] }))] }))] }) }), jsx(ResourceDialogFooter, { children: jsx(Button$1, { onClick: handleSubmit, disabled: !file || isDisabled, className: RESOURCE_SUBMIT_BUTTON_CLASS, children: isAddTrainingDocumentLoading ? (jsxs(Fragment$1, { children: [jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" }), ' ', t('resourceModalLocalFileUploadModal.submitting')] })) : (jsx(Fragment$1, { children: t('resourceModalLocalFileUploadModal.submit') })) }) })] }));
266009
267495
  }
266010
267496
 
266011
267497
  function UrlUploadModal({ resource }) {
@@ -266074,9 +267560,7 @@ function UrlUploadModal({ resource }) {
266074
267560
  handleSubmitUrl();
266075
267561
  }
266076
267562
  };
266077
- return (jsxs("div", { className: "flex flex-col space-y-4", children: [jsx(Input, { type: "url", placeholder: t('resourceModalUrlUploadModal.urlPlaceholder'), value: url, onChange: handleUrlChange, autoComplete: "url" }), jsx("div", { className: "flex justify-end", children: jsx(Button$1, { onClick: handleSubmit, disabled: !url || isDisabled, className: cn('cursor-pointer hover:opacity-90', url
266078
- ? 'bg-gradient-to-r from-blue-600 to-blue-400 text-white'
266079
- : 'bg-gray-100 text-gray-500'), children: t('resourceModalUrlUploadModal.submit') }) })] }));
267563
+ return (jsxs(Fragment$1, { children: [jsx(ResourceDialogBody, { label: t('resourceModalUrlUploadModal.scrollRegionAriaLabel'), children: jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: "resource-url", children: t('resourceModalUrlUploadModal.urlLabel') }), jsx(Input, { id: "resource-url", type: "url", placeholder: t('resourceModalUrlUploadModal.urlPlaceholder'), value: url, onChange: handleUrlChange, autoComplete: "url" })] }) }), jsx(ResourceDialogFooter, { children: jsx(Button$1, { onClick: handleSubmit, disabled: !url || isDisabled, className: RESOURCE_SUBMIT_BUTTON_CLASS, children: t('resourceModalUrlUploadModal.submit') }) })] }));
266080
267564
  }
266081
267565
 
266082
267566
  function useWebsiteCrawlerResource(resource) {
@@ -266101,9 +267585,11 @@ function useWebsiteCrawlerResource(resource) {
266101
267585
  crawler_match_patterns: [],
266102
267586
  crawler_pattern_type: 'glob',
266103
267587
  temp_crawler_match_patterns: '',
267588
+ crawler_user_agent: '',
266104
267589
  },
266105
267590
  onSubmit: async ({ value }) => {
266106
267591
  try {
267592
+ const crawlerUserAgent = value.crawler_user_agent.trim();
266107
267593
  await addTrainingDocument({
266108
267594
  org: tenantKey,
266109
267595
  formData: {
@@ -266115,6 +267601,11 @@ function useWebsiteCrawlerResource(resource) {
266115
267601
  crawler_match_patterns: crawlerMatchPatterns,
266116
267602
  //@ts-expect-error crawler_pattern_type may not be on the typed args but is accepted by the API
266117
267603
  crawler_pattern_type: value.crawler_pattern_type,
267604
+ // Per-document User-Agent override; sent only when set so the
267605
+ // backend default applies otherwise.
267606
+ ...(crawlerUserAgent
267607
+ ? { crawler_extra_headers: { 'User-Agent': crawlerUserAgent } }
267608
+ : {}),
266118
267609
  },
266119
267610
  userId: username !== null && username !== void 0 ? username : '',
266120
267611
  }).unwrap();
@@ -266141,30 +267632,30 @@ function useWebsiteCrawlerResource(resource) {
266141
267632
  function WebsiteCrawlModal({ resource }) {
266142
267633
  const t = useT();
266143
267634
  const { form, handleCheckUrlIsValid, crawlerMatchPatterns, setCrawlerMatchPatterns } = useWebsiteCrawlerResource(resource);
266144
- return (jsxs(Card$1, { className: "mx-auto w-full max-w-2xl", role: "dialog", "aria-labelledby": "crawler-title", "aria-describedby": "crawler-description", children: [jsxs(CardHeader, { children: [jsx(CardTitle, { id: "crawler-title", className: "text-md font-semibold text-gray-600", children: t('resourceModalWebsiteCrawlModal.title') }), jsx("p", { id: "crawler-description", className: "text-muted-foreground text-sm", children: t('resourceModalWebsiteCrawlModal.description') })] }), jsx(CardContent, { children: jsx("form", { className: "space-y-4", onSubmit: (e) => {
266145
- e.preventDefault();
266146
- e.stopPropagation();
266147
- form.handleSubmit();
266148
- }, "aria-label": t('resourceModalWebsiteCrawlModal.formAriaLabel'), children: jsxs(Fragment$1, { children: [jsx(form.Field, { name: "url", validators: {
267635
+ return (jsxs("form", { className: "flex min-h-0 flex-1 flex-col", onSubmit: (e) => {
267636
+ e.preventDefault();
267637
+ e.stopPropagation();
267638
+ form.handleSubmit();
267639
+ }, "aria-label": t('resourceModalWebsiteCrawlModal.formAriaLabel'), children: [jsxs(ResourceDialogBody, { label: t('resourceModalWebsiteCrawlModal.scrollRegionAriaLabel'), children: [jsx("div", { className: "rounded-md border border-gray-200 bg-gray-50 p-3 text-xs text-gray-600", children: t('resourceModalWebsiteCrawlModal.infoBox') }), jsxs(Fragment$1, { children: [jsx(form.Field, { name: "url", validators: {
266149
267640
  onChange: ({ value }) => (!value && t('resourceModalWebsiteCrawlModal.urlRequired')) ||
266150
267641
  (!handleCheckUrlIsValid(value) && t('resourceModalWebsiteCrawlModal.invalidUrl')),
266151
267642
  }, children: (field) => {
266152
267643
  var _a, _b, _c;
266153
- return (jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: field.name, children: t('resourceModalWebsiteCrawlModal.urlLabel') }), jsx(Input, { id: field.name, type: "url", value: field.state.value, onChange: (e) => field.handleChange(e.target.value), placeholder: t('resourceModalWebsiteCrawlModal.urlPlaceholder'), "aria-describedby": ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) ? `${field.name}-error` : undefined, "aria-invalid": !!((_b = field.state.meta.errors) === null || _b === void 0 ? void 0 : _b.length), "aria-required": "true" }), ((_c = field.state.meta.errors) === null || _c === void 0 ? void 0 : _c.length) ? (jsx("p", { id: `${field.name}-error`, className: "text-destructive mb-2 text-sm", role: "alert", children: field.state.meta.errors })) : null] }));
267644
+ return (jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: field.name, children: t('resourceModalWebsiteCrawlModal.urlLabel') }), jsx(Input, { id: field.name, type: "url", value: field.state.value, onChange: (e) => field.handleChange(e.target.value), placeholder: t('resourceModalWebsiteCrawlModal.urlPlaceholder'), "aria-describedby": ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) ? `${field.name}-error` : undefined, "aria-invalid": !!((_b = field.state.meta.errors) === null || _b === void 0 ? void 0 : _b.length), "aria-required": "true" }), ((_c = field.state.meta.errors) === null || _c === void 0 ? void 0 : _c.length) ? (jsx("p", { id: `${field.name}-error`, className: "text-destructive -mt-1 text-xs", role: "alert", children: field.state.meta.errors })) : null] }));
266154
267645
  } }), jsxs("div", { className: "grid grid-cols-2 gap-4", children: [jsx(form.Field, { name: "crawler_max_depth", validators: {
266155
267646
  onChange: ({ value }) => (!value && t('resourceModalWebsiteCrawlModal.fieldRequired')) ||
266156
267647
  (value < 1 && t('resourceModalWebsiteCrawlModal.mustBeGreaterThanZero')) ||
266157
267648
  (value > 10000 && t('resourceModalWebsiteCrawlModal.mustBeLessThan10000')),
266158
267649
  }, children: (field) => {
266159
267650
  var _a, _b, _c;
266160
- return (jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: field.name, children: t('resourceModalWebsiteCrawlModal.maxCrawlDepthLabel') }), jsx(Input, { id: field.name, type: "number", min: "1", max: "10000", value: field.state.value, onChange: (e) => field.handleChange(Number.parseInt(e.target.value)), "aria-describedby": ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) ? `${field.name}-error` : undefined, "aria-invalid": !!((_b = field.state.meta.errors) === null || _b === void 0 ? void 0 : _b.length), "aria-required": "true" }), ((_c = field.state.meta.errors) === null || _c === void 0 ? void 0 : _c.length) ? (jsx("p", { id: `${field.name}-error`, className: "text-destructive mb-2 text-sm", role: "alert", children: field.state.meta.errors })) : null] }));
267651
+ return (jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: field.name, children: t('resourceModalWebsiteCrawlModal.maxCrawlDepthLabel') }), jsx(Input, { id: field.name, type: "number", min: "1", max: "10000", value: field.state.value, onChange: (e) => field.handleChange(Number.parseInt(e.target.value)), "aria-describedby": ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) ? `${field.name}-error` : undefined, "aria-invalid": !!((_b = field.state.meta.errors) === null || _b === void 0 ? void 0 : _b.length), "aria-required": "true" }), ((_c = field.state.meta.errors) === null || _c === void 0 ? void 0 : _c.length) ? (jsx("p", { id: `${field.name}-error`, className: "text-destructive -mt-1 text-xs", role: "alert", children: field.state.meta.errors })) : null] }));
266161
267652
  } }), jsx(form.Field, { name: "crawler_max_pages_limit", validators: {
266162
267653
  onChange: ({ value }) => (!value && t('resourceModalWebsiteCrawlModal.fieldRequired')) ||
266163
267654
  (value < 1 && t('resourceModalWebsiteCrawlModal.mustBeGreaterThanZero')),
266164
267655
  }, children: (field) => {
266165
267656
  var _a, _b, _c;
266166
- return (jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: field.name, children: t('resourceModalWebsiteCrawlModal.maxPagesLimitLabel') }), jsx(Input, { id: field.name, type: "number", min: "1", value: field.state.value, onChange: (e) => field.handleChange(Number.parseInt(e.target.value)), "aria-describedby": ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) ? `${field.name}-error` : undefined, "aria-invalid": !!((_b = field.state.meta.errors) === null || _b === void 0 ? void 0 : _b.length), "aria-required": "true" }), ((_c = field.state.meta.errors) === null || _c === void 0 ? void 0 : _c.length) ? (jsx("p", { id: `${field.name}-error`, className: "text-destructive mb-2 text-sm", role: "alert", children: field.state.meta.errors })) : null] }));
266167
- } })] }), jsx(form.Field, { name: "crawler_pattern_type", children: (field) => (jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: "pattern-type", children: t('resourceModalWebsiteCrawlModal.patternTypeLabel') }), jsxs(Select$1, { value: field.state.value, onValueChange: (value) => field.handleChange(value), children: [jsx(SelectTrigger, { id: "pattern-type", "aria-label": t('resourceModalWebsiteCrawlModal.selectPatternTypeAriaLabel'), children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: "glob", children: t('resourceModalWebsiteCrawlModal.globPattern') }), jsx(SelectItem, { value: "regex", children: t('resourceModalWebsiteCrawlModal.regularExpression') })] })] })] })) }), jsx(form.Subscribe, { selector: (state) => [
267657
+ return (jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: field.name, children: t('resourceModalWebsiteCrawlModal.maxPagesLimitLabel') }), jsx(Input, { id: field.name, type: "number", min: "1", value: field.state.value, onChange: (e) => field.handleChange(Number.parseInt(e.target.value)), "aria-describedby": ((_a = field.state.meta.errors) === null || _a === void 0 ? void 0 : _a.length) ? `${field.name}-error` : undefined, "aria-invalid": !!((_b = field.state.meta.errors) === null || _b === void 0 ? void 0 : _b.length), "aria-required": "true" }), ((_c = field.state.meta.errors) === null || _c === void 0 ? void 0 : _c.length) ? (jsx("p", { id: `${field.name}-error`, className: "text-destructive -mt-1 text-xs", role: "alert", children: field.state.meta.errors })) : null] }));
267658
+ } })] }), jsx(form.Field, { name: "crawler_pattern_type", children: (field) => (jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: "pattern-type", children: t('resourceModalWebsiteCrawlModal.patternTypeLabel') }), jsxs(Select$1, { value: field.state.value, onValueChange: (value) => field.handleChange(value), children: [jsx(SelectTrigger, { id: "pattern-type", "aria-label": t('resourceModalWebsiteCrawlModal.selectPatternTypeAriaLabel'), children: jsx(SelectValue, {}) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: "glob", children: t('resourceModalWebsiteCrawlModal.globPattern') }), jsx(SelectItem, { value: "regex", children: t('resourceModalWebsiteCrawlModal.regularExpression') })] })] })] })) }), jsx(form.Field, { name: "crawler_user_agent", children: (field) => (jsxs("div", { className: "grid gap-2", children: [jsx(Label$1, { htmlFor: field.name, children: t('resourceModalWebsiteCrawlModal.userAgentLabel') }), jsx(Input, { id: field.name, type: "text", value: field.state.value, onChange: (e) => field.handleChange(e.target.value), placeholder: t('resourceModalWebsiteCrawlModal.userAgentPlaceholder'), "aria-describedby": "user-agent-help" }), jsx("p", { id: "user-agent-help", className: "text-muted-foreground -mt-1 text-xs", children: t('resourceModalWebsiteCrawlModal.userAgentHelpText') })] })) }), jsx(form.Subscribe, { selector: (state) => [
266168
267659
  state.values.temp_crawler_match_patterns,
266169
267660
  state.values.crawler_pattern_type,
266170
267661
  ], children: ([tempCrawlerMatchPatterns, crawlerPatternType]) => (jsx(form.Field, { name: "temp_crawler_match_patterns", validators: {
@@ -266195,14 +267686,24 @@ function WebsiteCrawlModal({ resource }) {
266195
267686
  ]);
266196
267687
  field.handleChange('');
266197
267688
  }
266198
- }, disabled: !String(tempCrawlerMatchPatterns).trim(), size: "sm", "aria-label": t('resourceModalWebsiteCrawlModal.addPatternAriaLabel'), children: jsx(Plus, { className: "h-4 w-4" }) })] }), ((_c = field.state.meta.errors) === null || _c === void 0 ? void 0 : _c.length) ? (jsx("p", { id: "pattern-error", className: "text-destructive mb-2 text-sm", role: "alert", children: field.state.meta.errors })) : null, jsx("p", { id: "pattern-help", className: "text-muted-foreground text-sm", children: t('resourceModalWebsiteCrawlModal.patternHelpText') }), jsx("div", { className: "bg-muted/50 flex min-h-[2rem] flex-wrap gap-2 rounded-md border p-2", role: "list", "aria-label": t('resourceModalWebsiteCrawlModal.addedPatternsAriaLabel'), children: crawlerMatchPatterns.length === 0 ? (jsx("span", { className: "text-muted-foreground text-sm", children: t('resourceModalWebsiteCrawlModal.noPatternsAdded') })) : (crawlerMatchPatterns.map((pattern, index) => (jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [jsx("span", { className: "text-xs", children: pattern }), jsx("button", { type: "button", onClick: () => setCrawlerMatchPatterns(crawlerMatchPatterns.filter((p) => p !== pattern)), className: "hover:bg-destructive/20 ml-1 rounded-full p-0.5", "aria-label": t('resourceModalWebsiteCrawlModal.removePatternAriaLabel', { pattern }), children: jsx(X$2, { className: "h-3 w-3" }) })] }, index)))) })] })] }));
266199
- } })) }), jsx(form.Subscribe, { selector: (state) => [state.isSubmitting], children: ([isSubmitting]) => (jsxs("div", { className: "flex gap-3 pt-4", children: [jsx(Button$1, { type: "submit", className: "w-full bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-sm text-white hover:text-white hover:opacity-90", disabled: isSubmitting, "aria-describedby": isSubmitting ? 'submitting-status' : undefined, children: isSubmitting
266200
- ? t('resourceModalWebsiteCrawlModal.submitting')
266201
- : t('resourceModalWebsiteCrawlModal.submit') }), isSubmitting && (jsx("div", { id: "submitting-status", className: "sr-only", role: "status", "aria-live": "polite", children: t('resourceModalWebsiteCrawlModal.formBeingSubmitted') }))] })) })] }) }) })] }));
266202
- }
266203
-
266204
- function ResourceModal({ resource, isOpen, onClose }) {
266205
- return (jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(DialogContent, { className: "w-full max-w-md", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { className: "text-muted-foreground text-base", children: resource.name }) }), resource.type === 'github' && jsx(GithubFileUploadModal, {}), resource.type === 'local' && jsx(LocalFileUploadModal, { resource: resource }), resource.type === 'webcrawler' && jsx(WebsiteCrawlModal, { resource: resource }), resource.type === 'url' && jsx(UrlUploadModal, { resource: resource })] }) }));
267689
+ }, disabled: !String(tempCrawlerMatchPatterns).trim(), size: "sm", "aria-label": t('resourceModalWebsiteCrawlModal.addPatternAriaLabel'), children: jsx(Plus, { className: "h-4 w-4" }) })] }), ((_c = field.state.meta.errors) === null || _c === void 0 ? void 0 : _c.length) ? (jsx("p", { id: "pattern-error", className: "text-destructive -mt-1 text-xs", role: "alert", children: field.state.meta.errors })) : null, jsx("p", { id: "pattern-help", className: "text-muted-foreground -mt-1 text-xs", children: t('resourceModalWebsiteCrawlModal.patternHelpText') }), jsx("div", { className: "bg-muted/50 flex min-h-[2rem] flex-wrap gap-2 rounded-md border p-2", role: "list", "aria-label": t('resourceModalWebsiteCrawlModal.addedPatternsAriaLabel'), children: crawlerMatchPatterns.length === 0 ? (jsx("span", { className: "text-muted-foreground text-xs", children: t('resourceModalWebsiteCrawlModal.noPatternsAdded') })) : (crawlerMatchPatterns.map((pattern, index) => (jsxs(Badge, { variant: "secondary", className: "flex items-center gap-1", children: [jsx("span", { className: "text-xs", children: pattern }), jsx("button", { type: "button", onClick: () => setCrawlerMatchPatterns(crawlerMatchPatterns.filter((p) => p !== pattern)), className: "hover:bg-destructive/20 ml-1 rounded-full p-0.5", "aria-label": t('resourceModalWebsiteCrawlModal.removePatternAriaLabel', { pattern }), children: jsx(X$2, { className: "h-3 w-3" }) })] }, index)))) })] })] }));
267690
+ } })) })] })] }), jsx(form.Subscribe, { selector: (state) => [state.isSubmitting], children: ([isSubmitting]) => (jsxs(ResourceDialogFooter, { children: [jsx(Button$1, { type: "submit", className: RESOURCE_SUBMIT_BUTTON_CLASS, disabled: isSubmitting, "aria-describedby": isSubmitting ? 'submitting-status' : undefined, children: isSubmitting
267691
+ ? t('resourceModalWebsiteCrawlModal.submitting')
267692
+ : t('resourceModalWebsiteCrawlModal.submit') }), isSubmitting && (jsx("div", { id: "submitting-status", className: "sr-only", role: "status", "aria-live": "polite", children: t('resourceModalWebsiteCrawlModal.formBeingSubmitted') }))] })) })] }));
267693
+ }
267694
+
267695
+ // `link` types open a cloud picker instead of this dialog; it maps to the
267696
+ // generic Add Resources copy only to keep the record total.
267697
+ const DESCRIPTION_KEYS = {
267698
+ github: 'resourceModalGithubFileUploadModal.description',
267699
+ local: 'resourceModalLocalFileUploadModal.description',
267700
+ url: 'resourceModalUrlUploadModal.description',
267701
+ webcrawler: 'resourceModalWebsiteCrawlModal.description',
267702
+ link: 'datasetsTabAddResourceModal.description',
267703
+ };
267704
+ function ResourceModal({ resource, isOpen, onClose, maxFileSizeMB }) {
267705
+ const t = useT();
267706
+ return (jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(ResourceDialogContent, { title: resource.name, description: t(DESCRIPTION_KEYS[resource.type]), children: [resource.type === 'github' && jsx(GithubFileUploadModal, {}), resource.type === 'local' && (jsx(LocalFileUploadModal, { resource: resource, maxFileSizeMB: maxFileSizeMB })), resource.type === 'webcrawler' && jsx(WebsiteCrawlModal, { resource: resource }), resource.type === 'url' && jsx(UrlUploadModal, { resource: resource })] }) }));
266206
267707
  }
266207
267708
 
266208
267709
  var bundle = {exports: {}};
@@ -266215,6 +267716,8 @@ var bundle = {exports: {}};
266215
267716
  var bundleExports = bundle.exports;
266216
267717
  var GoogleDrivePicker = /*@__PURE__*/getDefaultExportFromCjs(bundleExports);
266217
267718
 
267719
+ /** Least-privilege scope: only files the user picks/creates via the picker. */
267720
+ const GOOGLE_DRIVE_SCOPES = ['https://www.googleapis.com/auth/drive.file'];
266218
267721
  const useGoogleDrivePicker = ({ tenantKey, mentorId }) => {
266219
267722
  const [authToken, setAuthToken] = React__default.useState(null);
266220
267723
  const [driveFiles, setDriveFiles] = React__default.useState([]);
@@ -266289,10 +267792,7 @@ const useGoogleDrivePicker = ({ tenantKey, mentorId }) => {
266289
267792
  refresh_token: 'test-refresh token',
266290
267793
  client_id: credentials.client_id,
266291
267794
  token: authToken === null || authToken === void 0 ? void 0 : authToken.access_token,
266292
- scopes: [
266293
- 'https://www.googleapis.com/auth/drive.metadata.readonly',
266294
- 'https://www.googleapis.com/auth/drive.readonly',
266295
- ],
267795
+ scopes: GOOGLE_DRIVE_SCOPES,
266296
267796
  token_type: authToken === null || authToken === void 0 ? void 0 : authToken.token_type,
266297
267797
  expiry_date: new Date(Date.now() + ((authToken === null || authToken === void 0 ? void 0 : authToken.expires_in) || 0) * 1000).toISOString(),
266298
267798
  },
@@ -266386,10 +267886,7 @@ const useGoogleDrivePicker = ({ tenantKey, mentorId }) => {
266386
267886
  openPicker({
266387
267887
  clientId: credentials.client_id,
266388
267888
  developerKey: credentials.developer_key,
266389
- customScopes: [
266390
- 'https://www.googleapis.com/auth/drive.metadata.readonly',
266391
- 'https://www.googleapis.com/auth/drive.readonly',
266392
- ],
267889
+ customScopes: GOOGLE_DRIVE_SCOPES,
266393
267890
  // @ts-expect-error - token accepts null to force fresh auth per google-drive-picker API
266394
267891
  token: null, // Always start with null token to force fresh auth
266395
267892
  showUploadView: true,
@@ -266477,6 +267974,8 @@ const useGoogleDrivePicker = ({ tenantKey, mentorId }) => {
266477
267974
  forceClosePickerModal,
266478
267975
  pickerError,
266479
267976
  resetPickerState,
267977
+ credentialsLoaded: credentialLoaded,
267978
+ isConfigured: Boolean(credentials.client_id),
266480
267979
  };
266481
267980
  };
266482
267981
 
@@ -266547,6 +268046,7 @@ function ieOnEnd (script, cb) {
266547
268046
 
266548
268047
  var loadScript = /*@__PURE__*/getDefaultExportFromCjs(loadScript$1);
266549
268048
 
268049
+ /** Default file types offered by the Dropbox chooser. Hosts override via `extensions`. */
266550
268050
  const DROPBOX_EXTENSIONS = [
266551
268051
  '.pdf',
266552
268052
  '.doc',
@@ -266558,6 +268058,12 @@ const DROPBOX_EXTENSIONS = [
266558
268058
  '.xlsx',
266559
268059
  '.ppt',
266560
268060
  '.pptx',
268061
+ '.png',
268062
+ '.jpeg',
268063
+ '.jpg',
268064
+ '.mp3',
268065
+ '.wav',
268066
+ '.m4a',
266561
268067
  ];
266562
268068
  const DROPBOX_SDK_URL = 'https://www.dropbox.com/static/api/2/dropins.js';
266563
268069
  const SCRIPT_ID = 'dropboxjs';
@@ -266566,6 +268072,7 @@ const useDropboxPicker = ({ tenantKey, mentorId, cancel = () => { }, linkType =
266566
268072
  const [dropboxReady, setDropboxReady] = useState(false);
266567
268073
  const [openChooser, setOpenChooser] = useState(false);
266568
268074
  const [appKey, setAppKey] = useState(null);
268075
+ const [credentialsLoaded, setCredentialsLoaded] = useState(false);
266569
268076
  // Use RTK Query hooks
266570
268077
  const [getCredentials] = useLazyGetCredentialsQuery();
266571
268078
  const [addTrainingDocument] = useAddTrainingDocumentMutation();
@@ -266588,6 +268095,7 @@ const useDropboxPicker = ({ tenantKey, mentorId, cancel = () => { }, linkType =
266588
268095
  catch (error) {
266589
268096
  console.error(JSON.stringify({ tenant: tenantKey, error }));
266590
268097
  }
268098
+ setCredentialsLoaded(true);
266591
268099
  }
266592
268100
  };
266593
268101
  handleFetchAppKey();
@@ -266685,6 +268193,8 @@ const useDropboxPicker = ({ tenantKey, mentorId, cancel = () => { }, linkType =
266685
268193
  openChooser: onChoose,
266686
268194
  dropboxReady,
266687
268195
  appKey,
268196
+ credentialsLoaded,
268197
+ isConfigured: Boolean(appKey),
266688
268198
  };
266689
268199
  };
266690
268200
 
@@ -266694,6 +268204,7 @@ const useOneDrivePicker = ({ tenantKey, mentorId }) => {
266694
268204
  const [onedriveAppId, setOnedriveAppId] = useState(null);
266695
268205
  const [fullDomain, setFullDomain] = useState(null);
266696
268206
  const [isSDKLoaded, setIsSDKLoaded] = useState(false);
268207
+ const [credentialsLoaded, setCredentialsLoaded] = useState(false);
266697
268208
  // Use RTK Query hooks
266698
268209
  const [getCredentials] = useLazyGetCredentialsQuery();
266699
268210
  const [addTrainingDocument] = useAddTrainingDocumentMutation();
@@ -266808,6 +268319,7 @@ const useOneDrivePicker = ({ tenantKey, mentorId }) => {
266808
268319
  catch (error) {
266809
268320
  console.error(JSON.stringify({ tenant: tenantKey, error }));
266810
268321
  }
268322
+ setCredentialsLoaded(true);
266811
268323
  }
266812
268324
  };
266813
268325
  handleFetchAppId();
@@ -266900,46 +268412,81 @@ const useOneDrivePicker = ({ tenantKey, mentorId }) => {
266900
268412
  pickOneDriveFile,
266901
268413
  onedriveAppId,
266902
268414
  isSDKLoaded,
268415
+ credentialsLoaded,
268416
+ isConfigured: Boolean(onedriveAppId),
266903
268417
  };
266904
268418
  };
266905
268419
 
266906
- function AddResourceModal({ isOpen, onClose, disabledDatasets = [], }) {
268420
+ function AddResourceModal({ isOpen, onClose, disabledDatasets = [], maxFileSizeMB, dropboxExtensions, }) {
266907
268421
  const t = useT();
266908
268422
  const { tenantKey, mentorId } = useAgentSettings();
266909
268423
  const [selectedResource, setSelectedResource] = React__default.useState(null);
266910
- const { openChooser } = useDropboxPicker({
268424
+ const dropbox = useDropboxPicker({
266911
268425
  autoShow: false,
266912
268426
  tenantKey,
266913
268427
  mentorId,
268428
+ extensions: dropboxExtensions,
266914
268429
  });
266915
- const { handlePickerOpen, loadGoogleApiScript, isPickerLoaded, forceClosePickerModal, pickerError, } = useGoogleDrivePicker({ tenantKey, mentorId });
266916
- const { pickOneDriveFile } = useOneDrivePicker({ tenantKey, mentorId });
266917
- return (jsxs(Fragment$1, { children: [jsx(Script, { src: "https://apis.google.com/js/api.js", onLoad: loadGoogleApiScript, strategy: "lazyOnload" }), jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsxs(DialogContent, { className: "max-h-[90vh] overflow-y-auto sm:max-w-[800px]", children: [jsx(DialogHeader, { className: "flex flex-row items-center justify-between", children: jsx(DialogTitle, { children: t('datasetsTabAddResourceModal.title') }) }), jsx("div", { className: "pt-4", children: jsxs("div", { children: [jsx("p", { className: "mb-6 text-gray-600", children: t('datasetsTabAddResourceModal.description') }), pickerError && (jsx("div", { className: "mb-4 rounded-lg border border-red-200 bg-red-50 p-4", children: jsxs("div", { className: "flex items-center justify-between", children: [jsxs("div", { children: [jsx("h4", { className: "text-sm font-medium text-red-800", children: t('datasetsTabAddResourceModal.googleDrivePickerError') }), jsx("p", { className: "mt-1 text-sm text-red-600", children: pickerError })] }), jsx("button", { onClick: forceClosePickerModal, className: "ml-4 rounded bg-red-100 px-3 py-1 text-sm font-medium text-red-800 hover:bg-red-200", children: t('datasetsTabAddResourceModal.forceClosePicker') })] }) })), jsx("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: resourceTypes.map((resource) => (jsxs("button", { className: cn('flex items-center rounded-lg border p-4 transition-colors duration-200 hover:bg-gray-50', resource.isActive && !disabledDatasets.includes(resource.id.toLowerCase())
266918
- ? 'cursor-pointer'
266919
- : 'cursor-not-allowed opacity-50'), onClick: () => {
266920
- if (resource.type !== 'link') {
266921
- setSelectedResource(resource);
266922
- return;
266923
- }
266924
- if (resource.name === 'Google Drive') {
266925
- if (isPickerLoaded) {
266926
- handlePickerOpen();
266927
- }
266928
- else {
266929
- // Show loading state or toast
266930
- console.log('Google Picker is still loading...');
266931
- }
266932
- return;
266933
- }
266934
- if (resource.name === 'Dropbox') {
266935
- openChooser();
266936
- return;
268430
+ const { handlePickerOpen, loadGoogleApiScript, isPickerLoaded, forceClosePickerModal, pickerError, credentialsLoaded: googleCredentialsLoaded, isConfigured: googleIsConfigured, } = useGoogleDrivePicker({ tenantKey, mentorId });
268431
+ const oneDrive = useOneDrivePicker({ tenantKey, mentorId });
268432
+ // A cloud provider only works once the tenant has OAuth credentials for it
268433
+ // (GET .../integration-credential/?name=<provider>). Without them the SDK is
268434
+ // handed an empty client id and the click does nothing at all — no popup, no
268435
+ // error — which reads as a broken button. Disable and say why instead.
268436
+ // `loaded` gates on the lookup having finished so the buttons are not
268437
+ // disabled during the in-flight fetch.
268438
+ const cloudProviders = {
268439
+ 'google-drive': {
268440
+ loaded: googleCredentialsLoaded,
268441
+ configured: googleIsConfigured,
268442
+ },
268443
+ onedrive: {
268444
+ loaded: oneDrive.credentialsLoaded,
268445
+ configured: oneDrive.isConfigured,
268446
+ },
268447
+ dropbox: {
268448
+ loaded: dropbox.credentialsLoaded,
268449
+ configured: dropbox.isConfigured,
268450
+ },
268451
+ };
268452
+ return (jsxs(Fragment$1, { children: [jsx(Script, { src: "https://apis.google.com/js/api.js", onLoad: loadGoogleApiScript, strategy: "lazyOnload" }), jsx(Dialog, { open: isOpen, onOpenChange: onClose, children: jsx(ResourceDialogContent, { title: t('datasetsTabAddResourceModal.title'), description: t('datasetsTabAddResourceModal.description'), className: "sm:max-w-[800px]", children: jsxs(ResourceDialogBody, { label: t('datasetsTabAddResourceModal.scrollRegionAriaLabel'), children: [pickerError && (jsx("div", { className: "rounded-lg border border-red-200 bg-red-50 p-4", children: jsxs("div", { className: "flex items-center justify-between", children: [jsxs("div", { children: [jsx("h4", { className: "text-sm font-medium text-red-800", children: t('datasetsTabAddResourceModal.googleDrivePickerError') }), jsx("p", { className: "mt-1 text-sm text-red-600", children: pickerError })] }), jsx("button", { onClick: forceClosePickerModal, className: "ml-4 rounded bg-red-100 px-3 py-1 text-sm font-medium text-red-800 hover:bg-red-200", children: t('datasetsTabAddResourceModal.forceClosePicker') })] }) })), jsx("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: resourceTypes.map((resource) => {
268453
+ const cloudProvider = cloudProviders[resource.id];
268454
+ const notConfigured = cloudProvider
268455
+ ? cloudProvider.loaded && !cloudProvider.configured
268456
+ : false;
268457
+ const isDisabled = !resource.isActive ||
268458
+ disabledDatasets.includes(resource.id.toLowerCase()) ||
268459
+ notConfigured;
268460
+ return (jsxs("button", { title: notConfigured ? t('datasetsTabAddResourceModal.notConfigured') : undefined, className: cn('flex items-center rounded-lg border p-4 transition-colors duration-200 hover:bg-gray-50', !isDisabled ? 'cursor-pointer' : 'cursor-not-allowed opacity-50'), onClick: () => {
268461
+ if (resource.type !== 'link') {
268462
+ setSelectedResource(resource);
268463
+ return;
268464
+ }
268465
+ if (resource.name === 'Google Drive') {
268466
+ if (isPickerLoaded) {
268467
+ handlePickerOpen();
266937
268468
  }
266938
- if (resource.name === 'Microsoft OneDrive') {
266939
- pickOneDriveFile();
266940
- return;
268469
+ else {
268470
+ // Show loading state or toast
268471
+ console.log('Google Picker is still loading...');
266941
268472
  }
266942
- }, disabled: !resource.isActive || disabledDatasets.includes(resource.id.toLowerCase()), children: [jsx("div", { className: "mr-3 flex h-10 w-10 items-center justify-center rounded-md bg-blue-100", children: resource.icon }), jsx("span", { className: "text-gray-700", children: resource.name })] }, resource.id))) })] }) })] }) }), selectedResource && (jsx(ResourceModal, { resource: selectedResource, isOpen: !!selectedResource, onClose: () => setSelectedResource(null) }))] }));
268473
+ return;
268474
+ }
268475
+ if (resource.name === 'Dropbox') {
268476
+ dropbox.openChooser();
268477
+ return;
268478
+ }
268479
+ if (resource.name === 'Microsoft OneDrive') {
268480
+ oneDrive.pickOneDriveFile();
268481
+ return;
268482
+ }
268483
+ }, disabled: isDisabled, children: [jsx("div", { className: "mr-3 flex h-10 w-10 items-center justify-center rounded-md bg-blue-100", children: resource.icon }), jsxs("span", { className: "flex flex-col items-start text-left", children: [jsx("span", { className: "text-gray-700", children: resource.name }), notConfigured && (
268484
+ // aria-hidden: the same text is already the button's
268485
+ // `title`, so exposing it here too would append it to
268486
+ // the accessible name ("Dropbox Not configured for
268487
+ // this tenant") and break name-based lookups.
268488
+ jsx("span", { "aria-hidden": "true", className: "text-xs text-gray-500", children: t('datasetsTabAddResourceModal.notConfigured') }))] })] }, resource.id));
268489
+ }) })] }) }) }), selectedResource && (jsx(ResourceModal, { resource: selectedResource, isOpen: !!selectedResource, onClose: () => setSelectedResource(null), maxFileSizeMB: maxFileSizeMB }))] }));
266943
268490
  }
266944
268491
 
266945
268492
  // DatasetItemList requires a full labels object; without it the empty-state
@@ -266951,7 +268498,7 @@ const PROJECT_FILES_DATASET_LABELS = resolveDatasetsTabLabels({
266951
268498
  function ProjectFilesModal(props) {
266952
268499
  return (jsx(AgentSettingsProvider, { tenantKey: props.tenantKey, mentorId: props.mentorId, username: props.username, enableRBAC: false, children: jsx(ProjectFilesModalInner, { ...props }) }));
266953
268500
  }
266954
- function ProjectFilesModalInner({ isOpen, onClose }) {
268501
+ function ProjectFilesModalInner({ isOpen, onClose, disabledResourceTypes, maxUploadSizeMb, dropboxExtensions, }) {
266955
268502
  var _a;
266956
268503
  const t = useT();
266957
268504
  const [showAddResourceModal, setShowAddResourceModal] = React__default.useState(false);
@@ -266966,7 +268513,7 @@ function ProjectFilesModalInner({ isOpen, onClose }) {
266966
268513
  // @ts-expect-error - Type mismatch between RetrieverDocumentEmbedding[] and Dataset[], id property type difference
266967
268514
  , {
266968
268515
  // @ts-expect-error - Type mismatch between RetrieverDocumentEmbedding[] and Dataset[], id property type difference
266969
- datasets: (_a = datasets === null || datasets === void 0 ? void 0 : datasets.results) !== null && _a !== void 0 ? _a : [], labels: PROJECT_FILES_DATASET_LABELS })] })) }) }) }), jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: handlePageChange, disabled: isDatasetsFetching || isDatasetsLoading }), jsx(AddResourceModal, { isOpen: showAddResourceModal, onClose: () => closeAddResourceModal(), keepParentOpen: true }), isModalOpen && FreeTrialDialog && (jsx(FreeTrialDialog, { isOpen: isModalOpen, onClose: closeModal }))] }) })] }) }) }));
268516
+ datasets: (_a = datasets === null || datasets === void 0 ? void 0 : datasets.results) !== null && _a !== void 0 ? _a : [], labels: PROJECT_FILES_DATASET_LABELS })] })) }) }) }), jsx(IblPagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: handlePageChange, disabled: isDatasetsFetching || isDatasetsLoading }), jsx(AddResourceModal, { isOpen: showAddResourceModal, onClose: () => closeAddResourceModal(), keepParentOpen: true, disabledDatasets: disabledResourceTypes, maxFileSizeMB: maxUploadSizeMb, dropboxExtensions: dropboxExtensions }), isModalOpen && FreeTrialDialog && (jsx(FreeTrialDialog, { isOpen: isModalOpen, onClose: closeModal }))] }) })] }) }) }));
266970
268517
  }
266971
268518
 
266972
268519
  var projectFilesModal = /*#__PURE__*/Object.freeze({
@@ -267509,6 +269056,7 @@ const TAB_DESC_KEYS = {
267509
269056
  monetization: 'descMonetization',
267510
269057
  datasets: 'descBenchmarks',
267511
269058
  memory: 'descMemory',
269059
+ virtualMachine: 'descVirtualMachine',
267512
269060
  advanced: 'descAdvanced',
267513
269061
  basic: 'descBasic',
267514
269062
  social: 'descSocial',
@@ -267567,6 +269115,12 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
267567
269115
  ]
267568
269116
  : []),
267569
269117
  { id: 'memory', label: t('profileAccount.tabMemory'), icon: Brain, group: 'aiData' },
269118
+ {
269119
+ id: 'virtualMachine',
269120
+ label: t('profileAccount.tabVirtualMachine'),
269121
+ icon: Server,
269122
+ group: 'aiData',
269123
+ },
267570
269124
  { id: 'advanced', label: t('profileAccount.tabAdvanced'), icon: Settings$1, group: 'system' },
267571
269125
  ];
267572
269126
  const [organizationLogo, setOrganizationLogo] = useState(`${LOGO_ENDPOINTS.light_logo(tenant)}?v=${Date.now()}`);
@@ -267663,7 +269217,7 @@ function Account({ tenant, tenants = [], username, onInviteClick, email, mainPla
267663
269217
  setOrganizationLogo('');
267664
269218
  } }) })) : (jsx("div", { className: "flex h-14 w-14 flex-shrink-0 items-center justify-center rounded-xl border border-blue-100 bg-blue-50 text-blue-600 dark:border-blue-900 dark:bg-blue-950 dark:text-blue-300", "aria-hidden": "true", children: jsx(BriefcaseBusiness, { className: "h-6 w-6" }) })), jsxs("div", { className: "min-w-0", children: [jsx("h2", { className: "truncate text-[15px] font-semibold text-gray-900 dark:text-gray-100", title: platformName, children: platformName }), platformName !== tenant && (jsx("p", { className: "truncate font-mono text-xs text-gray-500 dark:text-gray-400", children: tenant }))] })] }), jsxs("div", { className: "flex flex-wrap gap-1.5", children: [roleChip, showPlatformName && jsx(SettingsChip, { children: tenant.toUpperCase() })] })] }));
267665
269219
  const mobileHeader = (jsx("div", { className: "flex min-w-0 items-center justify-between gap-3", children: jsx("p", { className: "truncate text-[15px] font-semibold text-gray-900 dark:text-gray-100", children: platformName || t('profileAccount.profileTitle') }) }));
267666
- return (jsx(SettingsShell, { sidebarHeader: sidebarHeader, sidebarNav: jsx(SettingsSidebarNav, { groups: navGroups, activeId: activeTab, onSelect: selectTab, variant: "buttons", ariaLabel: t('profileAccount.ariaSettingsNav') }), mobileHeader: mobileHeader, mobileNav: jsx(SettingsMobileNav, { groups: navGroups, activeId: activeTab, onSelect: selectTab, variant: "buttons", ariaLabel: t('profileAccount.ariaSettingsNavMobile') }), title: title, description: description, overlays: jsx(ToastProvider, {}), children: jsxs("div", { className: "space-y-6", children: [activeTab === 'management' && hasManagementPermissions && (jsx(Admin, { onboardingBasePath: onboardingBasePath, authSpaUrl: authURL, onInviteClick: onInviteClick, tenant: tenant, currentSpa: currentSPA, hasUserTabPermission: hasUserTabPermission, hasGroupsTabPermission: hasGroupsTabPermission, hasPoliciesTabPermission: hasPoliciesTabPermission, hasRolesTabPermission: hasRolesTabPermission, hasTeamsTabPermission: hasTeamsTabPermission, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, hasAlertsTabPermission: hasAlertsTabPermission, rbacPermissions: rbacPermissions, enableRbac: enableRbac, showGradebookTab: showGradebookTab })), activeTab === 'organization' && (jsx(OrganizationTab, { platformKey: tenant, tenant: tenants.find((ten) => ten.key === tenant), onTenantUpdate: onTenantUpdate, setOrganizationLogoFromOutside: setOrganizationLogo, defaultSupportPhone: defaultSupportPhone, enableSupportPhone: enableSupportPhone })), activeTab === 'integrations' && jsx(IntegrationsTab, { tenantKey: tenant, username: username }), activeTab === 'billing' && canSeeBilling && (jsx(BillingTab, { tenant: tenant, userActiveApp: userActiveApp, username: username, currentUserEmail: email, mainPlatformKey: mainPlatformKey })), activeTab === 'monetization' && jsx(MonetizationTab, { platformKey: tenant, authURL: authURL }), activeTab === 'datasets' && showBenchmarks && (jsx(BenchmarksTab, { tenantKey: tenant, username: username })), activeTab === 'memory' && jsx(MemoryAdminTab, { tenantKey: tenant, username: username }), activeTab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenant, currentSPA: currentSPA, username: username, authURL: authURL, currentPlatformBaseDomain: currentPlatformBaseDomain }))] }) }));
269220
+ return (jsx(SettingsShell, { sidebarHeader: sidebarHeader, sidebarNav: jsx(SettingsSidebarNav, { groups: navGroups, activeId: activeTab, onSelect: selectTab, variant: "buttons", ariaLabel: t('profileAccount.ariaSettingsNav') }), mobileHeader: mobileHeader, mobileNav: jsx(SettingsMobileNav, { groups: navGroups, activeId: activeTab, onSelect: selectTab, variant: "buttons", ariaLabel: t('profileAccount.ariaSettingsNavMobile') }), title: title, description: description, overlays: jsx(ToastProvider, {}), children: jsxs("div", { className: "space-y-6", children: [activeTab === 'management' && hasManagementPermissions && (jsx(Admin, { onboardingBasePath: onboardingBasePath, authSpaUrl: authURL, onInviteClick: onInviteClick, tenant: tenant, currentSpa: currentSPA, hasUserTabPermission: hasUserTabPermission, hasGroupsTabPermission: hasGroupsTabPermission, hasPoliciesTabPermission: hasPoliciesTabPermission, hasRolesTabPermission: hasRolesTabPermission, hasTeamsTabPermission: hasTeamsTabPermission, hasInviteUserPermission: hasInviteUserPermission, hasCreateTeamPermission: hasCreateTeamPermission, onLoadGroupPermissions: onLoadGroupPermissions, hasAlertsTabPermission: hasAlertsTabPermission, rbacPermissions: rbacPermissions, enableRbac: enableRbac, showGradebookTab: showGradebookTab })), activeTab === 'organization' && (jsx(OrganizationTab, { platformKey: tenant, tenant: tenants.find((ten) => ten.key === tenant), onTenantUpdate: onTenantUpdate, setOrganizationLogoFromOutside: setOrganizationLogo, defaultSupportPhone: defaultSupportPhone, enableSupportPhone: enableSupportPhone })), activeTab === 'integrations' && jsx(IntegrationsTab, { tenantKey: tenant, username: username }), activeTab === 'billing' && canSeeBilling && (jsx(BillingTab, { tenant: tenant, userActiveApp: userActiveApp, username: username, currentUserEmail: email, mainPlatformKey: mainPlatformKey })), activeTab === 'monetization' && jsx(MonetizationTab, { platformKey: tenant, authURL: authURL }), activeTab === 'datasets' && showBenchmarks && (jsx(BenchmarksTab, { tenantKey: tenant, username: username })), activeTab === 'memory' && jsx(MemoryAdminTab, { tenantKey: tenant, username: username }), activeTab === 'virtualMachine' && (jsx(VirtualMachineAdminTab, { tenantKey: tenant, username: username })), activeTab === 'advanced' && (jsx(AdvancedTab, { platformKey: tenant, currentSPA: currentSPA, username: username, authURL: authURL, currentPlatformBaseDomain: currentPlatformBaseDomain }))] }) }));
267667
269221
  }
267668
269222
 
267669
269223
  function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, showMentorAIDisplayCheckbox = false, showLeaderboardDisplayCheckbox = false, showGradebookTab = false, showUsernameField = false, showPlatformName = false, useGravatarPicFallback = true, enableCatalogInvite = false, targetTab = 'basic', currentPlan = '', currentSPA = '', userActiveApp = null, authURL, tenants = [], onTenantUpdate, currentPlatformBaseDomain = '', rbacPermissions = {}, enableRbac = false, onLoadGroupPermissions, onTabChange, defaultSupportPhone = '', onBillingTabRequest, onAccountDeleted, enableMemoryTab = false, showLlmUsageTab = true, showBenchmarks = false, localLLMProps, enableSupportPhone, onboardingBasePath = '', }) {
@@ -267741,6 +269295,7 @@ function UserProfileModal({ isOpen, onClose, params, email, mainPlatformKey, sho
267741
269295
  'billing',
267742
269296
  'monetization',
267743
269297
  'datasets',
269298
+ 'virtualMachine',
267744
269299
  ].includes(targetTab) && (jsxs(Fragment$1, { children: [jsx(Account, { onboardingBasePath: onboardingBasePath, onInviteClick: () => setIsInviteUserDialogOpen(true), tenant: params.tenantKey, tenants: tenants, username: getUserName$1(), email: email, mainPlatformKey: mainPlatformKey, showUsernameField: showUsernameField, showPlatformName: showPlatformName, useGravatarPicFallback: useGravatarPicFallback, onClose: onClose, isAdmin: params.isAdmin, targetTab: targetTab, currentPlan: currentPlan, currentSPA: currentSPA, userActiveApp: userActiveApp, authURL: authURL, onTenantUpdate: onTenantUpdate, currentPlatformBaseDomain: currentPlatformBaseDomain, rbacPermissions: rbacPermissions, enableRbac: enableRbac, onLoadGroupPermissions: onLoadGroupPermissions, onTabChange: onTabChange, defaultSupportPhone: defaultSupportPhone, showBenchmarks: showBenchmarks, enableSupportPhone: enableSupportPhone, showGradebookTab: showGradebookTab }), isInviteUserDialogOpen && (jsx(InviteUserDialog, { tenant: params.tenantKey, onClose: () => setIsInviteUserDialogOpen(false), isOpen: isInviteUserDialogOpen, enableCatalogInvite: enableCatalogInvite, hasManageUsersPermission: hasManageUsersPermission })), isInvitedUsersDialogOpen && (jsx(InvitedUsersDialog, { onClose: () => setIsInvitedUsersDialogOpen(false), tenant: params.tenantKey }))] }))] }) }) }));
267745
269300
  }
267746
269301
 
@@ -280099,11 +281654,12 @@ function AgentHumanSupportTab({ PaginationComponent = IblPagination, labels: lab
280099
281654
  : labels.list.untitled }) }), jsx("div", { className: "mx-auto w-full max-w-full overflow-x-hidden", children: selectedTicket && renderTicketDetail(selectedTicket) })] }) })] }));
280100
281655
  }
280101
281656
 
280102
- function AgentDatasetsTab({ labels: labelsOverride, onSelect, selectedDatasetId, AddResourceModal, PaginationComponent, page, search, onPageChange, onSearchChange, }) {
281657
+ function AgentDatasetsTab({ labels: labelsOverride, onSelect, selectedDatasetId, AddResourceModal: AddResourceModal$1, PaginationComponent, page, search, onPageChange, onSearchChange, disabledResourceTypes, maxUploadSizeMb, dropboxExtensions, }) {
280103
281658
  var _a;
280104
281659
  const { tenantKey, mentorId, username, rbacPermissions, executeGatedAction } = useAgentSettings();
280105
281660
  const t = useT();
280106
281661
  const labels = React__default.useMemo(() => resolveDatasetsTabLabels(labelsOverride, t), [labelsOverride, t]);
281662
+ const Pagination = PaginationComponent !== null && PaginationComponent !== void 0 ? PaginationComponent : IblPagination;
280107
281663
  const [showAddResourceModal, setShowAddResourceModal] = React__default.useState(false);
280108
281664
  const openAddResourceModal = () => setShowAddResourceModal(true);
280109
281665
  const closeAddResourceModal = () => setShowAddResourceModal(false);
@@ -280145,7 +281701,7 @@ function AgentDatasetsTab({ labels: labelsOverride, onSelect, selectedDatasetId,
280145
281701
  // @ts-ignore - Type mismatch between RetrieverDocumentEmbedding[] and Dataset[], id property type difference
280146
281702
  , {
280147
281703
  // @ts-ignore - Type mismatch between RetrieverDocumentEmbedding[] and Dataset[], id property type difference
280148
- datasets: (_a = datasets === null || datasets === void 0 ? void 0 : datasets.results) !== null && _a !== void 0 ? _a : [], onSelect: onSelect, selectedDatasetId: selectedDatasetId, labels: labels })] })) }) }) }), PaginationComponent && (jsx(PaginationComponent, { currentPage: currentPage, totalPages: totalPages, onPageChange: handlePageChange, disabled: isDatasetsFetching || isDatasetsLoading })), AddResourceModal && (jsx(AddResourceModal, { isOpen: showAddResourceModal, onClose: () => closeAddResourceModal(), keepParentOpen: true }))] })] })] }));
281704
+ datasets: (_a = datasets === null || datasets === void 0 ? void 0 : datasets.results) !== null && _a !== void 0 ? _a : [], onSelect: onSelect, selectedDatasetId: selectedDatasetId, labels: labels })] })) }) }) }), jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: handlePageChange, disabled: isDatasetsFetching || isDatasetsLoading }), AddResourceModal$1 ? (jsx(AddResourceModal$1, { isOpen: showAddResourceModal, onClose: () => closeAddResourceModal(), keepParentOpen: true })) : (jsx(AddResourceModal, { isOpen: showAddResourceModal, onClose: () => closeAddResourceModal(), keepParentOpen: true, disabledDatasets: disabledResourceTypes, maxFileSizeMB: maxUploadSizeMb, dropboxExtensions: dropboxExtensions }))] })] })] }));
280149
281705
  }
280150
281706
 
280151
281707
  /**