@yrpri/api 9.0.108 → 9.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/active-citizen/controllers/activities.d.cts +2 -0
- package/active-citizen/controllers/activities.d.ts +5 -0
- package/active-citizen/controllers/news_feeds.d.cts +2 -0
- package/active-citizen/controllers/notifications.d.cts +2 -0
- package/active-citizen/controllers/notifications.d.ts +5 -0
- package/active-citizen/controllers/recommendations.d.cts +2 -0
- package/active-citizen/engine/allOurIdeas/aiHelper.d.ts +22 -0
- package/active-citizen/engine/allOurIdeas/explainAnswersAssistant.d.ts +13 -0
- package/active-citizen/engine/allOurIdeas/iconGenerator.d.ts +7 -0
- package/active-citizen/engine/analytics/export_anon_community_activities.d.ts +1 -0
- package/active-citizen/engine/analytics/importer.d.ts +1 -0
- package/active-citizen/engine/analytics/manager.d.cts +6 -0
- package/active-citizen/engine/analytics/plausible/manager.d.cts +5 -0
- package/active-citizen/engine/analytics/statsCalc.d.cts +94 -0
- package/active-citizen/engine/analytics/utils.d.cts +5 -0
- package/active-citizen/engine/marketing/campaign.d.cts +1 -0
- package/active-citizen/engine/moderation/fraud/CreateFraudAuditReport.d.cts +1 -0
- package/active-citizen/engine/moderation/fraud/FraudBase.d.cts +31 -0
- package/active-citizen/engine/moderation/fraud/FraudDeleteBase.d.cts +21 -0
- package/active-citizen/engine/moderation/fraud/FraudDeleteEndorsements.d.cts +8 -0
- package/active-citizen/engine/moderation/fraud/FraudDeletePointQualities.d.cts +6 -0
- package/active-citizen/engine/moderation/fraud/FraudDeletePoints.d.cts +6 -0
- package/active-citizen/engine/moderation/fraud/FraudDeletePosts.d.cts +4 -0
- package/active-citizen/engine/moderation/fraud/FraudDeleteRatings.d.cts +4 -0
- package/active-citizen/engine/moderation/fraud/FraudGetBase.d.cts +8 -0
- package/active-citizen/engine/moderation/fraud/FraudGetEndorsements.d.cts +7 -0
- package/active-citizen/engine/moderation/fraud/FraudGetPointQualities.d.cts +7 -0
- package/active-citizen/engine/moderation/fraud/FraudGetPoints.d.cts +6 -0
- package/active-citizen/engine/moderation/fraud/FraudGetPosts.d.cts +6 -0
- package/active-citizen/engine/moderation/fraud/FraudGetRatings.d.cts +5 -0
- package/active-citizen/engine/moderation/fraud/FraudScannerNotifier.d.cts +1 -0
- package/active-citizen/engine/moderation/get_moderation_items.d.cts +55 -0
- package/active-citizen/engine/moderation/image_labeling/CommunityLabeling.d.cts +6 -0
- package/active-citizen/engine/moderation/image_labeling/GroupLabeling.d.cts +6 -0
- package/active-citizen/engine/moderation/image_labeling/ImageLabelingBase.d.cts +30 -0
- package/active-citizen/engine/moderation/image_labeling/PointLabeling.d.cts +6 -0
- package/active-citizen/engine/moderation/image_labeling/PostLabeling.d.cts +6 -0
- package/active-citizen/engine/moderation/perspective_api_client.d.cts +33 -0
- package/active-citizen/engine/moderation/process_moderation_items.d.cts +2 -0
- package/active-citizen/engine/moderation/toxicity_analysis.d.cts +3 -0
- package/active-citizen/engine/news_feeds/activity_and_item_index_definitions.d.cts +7 -0
- package/active-citizen/engine/news_feeds/generate_dynamically.d.cts +2 -0
- package/active-citizen/engine/news_feeds/generate_from_notifications.d.cts +2 -0
- package/active-citizen/engine/news_feeds/news_feeds_utils.d.cts +99 -0
- package/active-citizen/engine/notifications/emails_utils.d.cts +2 -0
- package/active-citizen/engine/notifications/generate_point_notifications.d.cts +2 -0
- package/active-citizen/engine/notifications/generate_post_notifications.d.cts +2 -0
- package/active-citizen/engine/notifications/generate_post_status_change_notifications.d.cts +2 -0
- package/active-citizen/engine/notifications/notifications_utils.d.cts +3 -0
- package/active-citizen/engine/notifications/point_delivery.d.cts +2 -0
- package/active-citizen/engine/notifications/post_delivery.d.cts +2 -0
- package/active-citizen/engine/notifications/process_delayed_notifications.d.cts +1 -0
- package/active-citizen/engine/notifications/process_general_notifications.d.cts +2 -0
- package/active-citizen/engine/old/exporters/categories_dataset.d.ts +1 -0
- package/active-citizen/engine/old/exporters/dataset_tools.d.ts +3 -0
- package/active-citizen/engine/old/exporters/sentiment_dataset.d.ts +1 -0
- package/active-citizen/engine/recommendations/events_importer.d.cts +1 -0
- package/active-citizen/engine/recommendations/events_manager.d.cts +5 -0
- package/active-citizen/engine/reports/add_points_to_sheet.d.cts +1 -0
- package/active-citizen/engine/reports/commonUtils.d.ts +5 -0
- package/active-citizen/engine/reports/common_utils.d.cts +44 -0
- package/active-citizen/engine/reports/docx_group_report.d.cts +1 -0
- package/active-citizen/engine/reports/xlsAllOurIdeasExport.d.ts +1 -0
- package/active-citizen/engine/reports/xls_community_users_report.d.cts +2 -0
- package/active-citizen/engine/reports/xls_group_report.d.cts +1 -0
- package/active-citizen/llms/baseChatBot.d.ts +33 -0
- package/active-citizen/llms/imageGeneration/chatGptImageGenerator.d.ts +13 -0
- package/active-citizen/llms/imageGeneration/collectionImageGenerator.d.ts +23 -0
- package/active-citizen/llms/imageGeneration/dalleImageGenerator.d.ts +10 -0
- package/active-citizen/llms/imageGeneration/fluxImageGenerator.d.ts +9 -0
- package/active-citizen/llms/imageGeneration/iImageGenerator.d.ts +7 -0
- package/active-citizen/llms/imageGeneration/imageProcessorService.d.ts +12 -0
- package/active-citizen/llms/imageGeneration/imagenImageGenerator.d.ts +16 -0
- package/active-citizen/llms/imageGeneration/s3Service.d.ts +12 -0
- package/active-citizen/llms/llmTranslation.d.ts +26 -0
- package/active-citizen/models/ac_activity.d.cts +2 -0
- package/active-citizen/models/ac_background_job.d.cts +2 -0
- package/active-citizen/models/ac_campaign.d.cts +2 -0
- package/active-citizen/models/ac_client_activity.d.cts +2 -0
- package/active-citizen/models/ac_delayed_notification.d.cts +2 -0
- package/active-citizen/models/ac_following.d.cts +2 -0
- package/active-citizen/models/ac_list.d.cts +2 -0
- package/active-citizen/models/ac_list_users.d.cts +2 -0
- package/active-citizen/models/ac_mute.d.cts +2 -0
- package/active-citizen/models/ac_news_feed_item.d.cts +2 -0
- package/active-citizen/models/ac_news_feed_processed_range.d.cts +2 -0
- package/active-citizen/models/ac_notification.d.cts +2 -0
- package/active-citizen/models/ac_translation_cache.d.cts +2 -0
- package/active-citizen/models/ac_watching.d.cts +2 -0
- package/active-citizen/scripts/analytics/setup_all_plausible_goals.d.cts +1 -0
- package/active-citizen/scripts/fix_old_delayed_notifications.d.ts +1 -0
- package/active-citizen/scripts/kue_status.d.ts +2 -0
- package/active-citizen/scripts/kue_watch_stuck_jobs.d.ts +2 -0
- package/active-citizen/scripts/translation_clear_language.d.ts +1 -0
- package/active-citizen/scripts/translation_delete.d.ts +1 -0
- package/active-citizen/scripts/translation_replace_text_from_url.d.ts +1 -0
- package/active-citizen/scripts/translation_update.d.ts +1 -0
- package/active-citizen/scripts/translations_list.d.ts +1 -0
- package/active-citizen/utils/airbrake.d.cts +2 -0
- package/active-citizen/utils/get_anonymous_system_user.d.cts +2 -0
- package/active-citizen/utils/i18n.d.cts +2 -0
- package/active-citizen/utils/logger.d.cts +2 -0
- package/active-citizen/utils/redisConnection.d.cts +2 -0
- package/active-citizen/utils/to_json.d.cts +2 -0
- package/active-citizen/utils/translation_cloning.d.cts +5 -0
- package/active-citizen/utils/translation_helpers.d.cts +8 -0
- package/active-citizen/utils/truncate_text.d.cts +2 -0
- package/active-citizen/utils/updateAllLocalesFromEn.d.ts +20 -0
- package/active-citizen/utils/updateLocaleFolders.d.ts +1 -0
- package/active-citizen/workers/activity.cjs +13 -2
- package/active-citizen/workers/activity.d.cts +16 -0
- package/active-citizen/workers/anonymizations.cjs +13 -2
- package/active-citizen/workers/anonymizations.d.cts +16 -0
- package/active-citizen/workers/bulk_status_update.cjs +12 -1
- package/active-citizen/workers/bulk_status_update.d.cts +16 -0
- package/active-citizen/workers/delayed_jobs.cjs +13 -2
- package/active-citizen/workers/delayed_jobs.d.cts +16 -0
- package/active-citizen/workers/deletions.cjs +14 -3
- package/active-citizen/workers/deletions.d.cts +16 -0
- package/active-citizen/workers/email.cjs +12 -1
- package/active-citizen/workers/email.d.cts +16 -0
- package/active-citizen/workers/fraud_management.cjs +13 -2
- package/active-citizen/workers/fraud_management.d.cts +16 -0
- package/active-citizen/workers/generativeAi.d.ts +3 -0
- package/active-citizen/workers/main.d.cts +1 -0
- package/active-citizen/workers/marketing.cjs +13 -2
- package/active-citizen/workers/marketing.d.cts +16 -0
- package/active-citizen/workers/moderation.cjs +13 -2
- package/active-citizen/workers/moderation.d.cts +16 -0
- package/active-citizen/workers/notification_delivery.cjs +12 -1
- package/active-citizen/workers/notification_delivery.d.cts +16 -0
- package/active-citizen/workers/notification_news_feed.cjs +12 -1
- package/active-citizen/workers/notification_news_feed.d.cts +16 -0
- package/active-citizen/workers/queue.d.cts +21 -0
- package/active-citizen/workers/recount.d.cts +1 -0
- package/active-citizen/workers/reports.d.cts +2 -0
- package/active-citizen/workers/similarities.cjs +13 -2
- package/active-citizen/workers/similarities.d.cts +16 -0
- package/active-citizen/workers/speech_to_text.cjs +13 -2
- package/active-citizen/workers/speech_to_text.d.cts +16 -0
- package/agents/assistants/agentAssistant.d.ts +27 -0
- package/agents/assistants/assistant.d.ts +156 -0
- package/agents/assistants/baseAssistant.d.ts +115 -0
- package/agents/assistants/baseAssistantWithVoice.d.ts +18 -0
- package/agents/assistants/modes/agentDirectConnection.d.ts +16 -0
- package/agents/assistants/modes/agentSelectionMode.d.ts +12 -0
- package/agents/assistants/modes/baseAssistantMode.d.ts +10 -0
- package/agents/assistants/modes/tools/agentTools.d.ts +100 -0
- package/agents/assistants/modes/tools/baseTools.d.ts +21 -0
- package/agents/assistants/modes/tools/loginTools.d.ts +51 -0
- package/agents/assistants/modes/tools/models/agents.d.ts +27 -0
- package/agents/assistants/modes/tools/models/subscriptions.d.ts +13 -0
- package/agents/assistants/modes/tools/models/users.d.ts +7 -0
- package/agents/assistants/modes/tools/navigationTools.d.ts +33 -0
- package/agents/assistants/modes/tools/subscriptionTools.d.ts +53 -0
- package/agents/assistants/modes/tools/workflowConverstationTools.d.ts +49 -0
- package/agents/assistants/voiceAssistant.d.ts +78 -0
- package/agents/controllers/agentProductController.d.ts +23 -0
- package/agents/controllers/agentSubscriptionController.d.ts +30 -0
- package/agents/controllers/assistantsController.d.ts +47 -0
- package/agents/controllers/policySynthAgents.d.ts +49 -0
- package/agents/managers/agentProductManager.d.ts +12 -0
- package/agents/managers/emailInvitesManager.d.ts +6 -0
- package/agents/managers/emailTemplateRenderer.d.ts +25 -0
- package/agents/managers/newAiModelSetup.d.ts +37 -0
- package/agents/managers/notificationAgentQueueManager.d.ts +23 -0
- package/agents/managers/subscriptionManager.d.ts +29 -0
- package/agents/managers/workflowConversationManager.d.ts +14 -0
- package/agents/models/agentProduct.d.ts +31 -0
- package/agents/models/agentProductBoosterPurchase.d.ts +27 -0
- package/agents/models/agentProductBundle.d.ts +12 -0
- package/agents/models/agentProductRun.d.ts +23 -0
- package/agents/models/discount.d.ts +21 -0
- package/agents/models/subscription.d.ts +26 -0
- package/agents/models/subscriptionPlan.d.ts +17 -0
- package/agents/models/subscriptionUser.d.ts +11 -0
- package/agents/models/testData/createEvolyAgentProduct.d.ts +1 -0
- package/agents/models/testData/old/updateAgentWorkflowConfiguration.d.ts +1 -0
- package/agents/models/testData/setupEvolyAgentProductConfig.d.ts +1 -0
- package/agents/models/testData/updateAgentWorkflowConfiguration.d.ts +1 -0
- package/agents/models/workflowConversation.d.ts +11 -0
- package/agents/tools/setTemplateWorkflowCommunityId.d.ts +1 -0
- package/app.d.ts +53 -0
- package/authorization.d.cts +1 -0
- package/bot_control.d.ts +4 -0
- package/controllers/allOurIdeas.d.ts +40 -0
- package/controllers/audios.d.cts +2 -0
- package/controllers/bulkStatusUpdates.d.cts +2 -0
- package/controllers/categories.d.cts +2 -0
- package/controllers/communities.d.cts +2 -0
- package/controllers/domains.d.cts +2 -0
- package/controllers/externalIds.d.cts +2 -0
- package/controllers/groups.d.cts +2 -0
- package/controllers/images.d.cts +2 -0
- package/controllers/index.d.cts +2 -0
- package/controllers/legacyPages.d.cts +2 -0
- package/controllers/legacyPosts.d.cts +2 -0
- package/controllers/legacyUsers.d.cts +2 -0
- package/controllers/nonSpa.d.cts +2 -0
- package/controllers/organizations.d.cts +2 -0
- package/controllers/points.d.cts +2 -0
- package/controllers/posts.d.cts +2 -0
- package/controllers/ratings.d.cts +2 -0
- package/controllers/users.d.cts +2 -0
- package/controllers/videos.d.cts +2 -0
- package/deleteUnwantedDeclerations.d.cts +1 -0
- package/migrations/agentAuditLogs.d.cts +1 -0
- package/migrations/agentClasses.d.cts +1 -0
- package/migrations/agentConnectorClasses.d.cts +1 -0
- package/migrations/agentConnectors.d.cts +1 -0
- package/migrations/agentEvals.d.cts +1 -0
- package/migrations/agentRegistries.d.cts +1 -0
- package/migrations/agents.d.cts +1 -0
- package/migrations/aiModels.d.cts +1 -0
- package/migrations/apiUsage.d.cts +1 -0
- package/migrations/apis.d.cts +1 -0
- package/migrations/groupPrivateData.d.cts +2 -0
- package/migrations/modelUsage.d.cts +2 -0
- package/migrations/privateAccessStore.d.cts +1 -0
- package/migrations/zzz_associations.d.cts +1 -0
- package/migrations/zzzz_createUsersAndAdminsForClasses.d.cts +1 -0
- package/migrations/zzzzz_create_agent_runs.d.cts +2 -0
- package/migrations/zzzzzz_create_agent_runs_fix.d.cts +2 -0
- package/migrations/zzzzzzz_create_trees.d.cts +2 -0
- package/models/audio.d.cts +2 -0
- package/models/bulk_status_update.d.cts +2 -0
- package/models/campaign.d.cts +2 -0
- package/models/category.d.cts +2 -0
- package/models/community.d.cts +2 -0
- package/models/domain.d.cts +2 -0
- package/models/endorsement.d.cts +2 -0
- package/models/general_data_store.d.cts +2 -0
- package/models/group.d.cts +2 -0
- package/models/image.d.cts +2 -0
- package/models/index.cjs +2 -2
- package/models/index.d.cts +3 -0
- package/models/invite.d.cts +2 -0
- package/models/iso_country.d.cts +2 -0
- package/models/organization.d.cts +2 -0
- package/models/page.d.cts +2 -0
- package/models/point.d.cts +2 -0
- package/models/point_quality.d.cts +2 -0
- package/models/point_revision.d.cts +2 -0
- package/models/post.d.cts +2 -0
- package/models/post_revision.d.cts +2 -0
- package/models/post_status_change.d.cts +2 -0
- package/models/promotion.d.cts +2 -0
- package/models/rating.d.cts +2 -0
- package/models/relationship.d.cts +2 -0
- package/models/request_to_join.d.cts +2 -0
- package/models/user.d.cts +2 -0
- package/models/user_legacy_password.d.cts +2 -0
- package/models/video.d.cts +2 -0
- package/package.json +3 -2
- package/publish.d.ts +1 -0
- package/repack.d.ts +1 -0
- package/scripts/addRatingUsersToGroup.d.ts +1 -0
- package/scripts/addUserToOrganization.d.ts +1 -0
- package/scripts/analyseRatingsForCommunity.d.ts +1 -0
- package/scripts/analyzeAndFixBrokenPointUsers.d.ts +1 -0
- package/scripts/analyzeEndorsementsByCountry.d.ts +1 -0
- package/scripts/analyzePostsForCommunity.d.ts +1 -0
- package/scripts/bulkStatusUpdates/listUpdates.d.ts +1 -0
- package/scripts/bulkStatusUpdates/mergeLatestPostsToUpdate.d.ts +1 -0
- package/scripts/bulkStatusUpdates/performUpdate.d.ts +1 -0
- package/scripts/bulkStatusUpdates/performUpdateForGroup.d.cts +1 -0
- package/scripts/bulkStatusUpdates/performUpdateForStatus.d.ts +1 -0
- package/scripts/change/changeVideoAspectTo.d.ts +1 -0
- package/scripts/change/setUseNewVersion.d.cts +1 -0
- package/scripts/changeCommunityGroupcount.d.ts +1 -0
- package/scripts/changeCommunityPostCount.d.ts +1 -0
- package/scripts/changeGroupPostCount.d.ts +1 -0
- package/scripts/changeLanguage.d.ts +1 -0
- package/scripts/changeOfficalStatus.d.ts +1 -0
- package/scripts/cleanups/deleteAnonNotifications.d.cts +1 -0
- package/scripts/cleanups/deleteLinkGroupsWithDeletedCommunities.d.ts +1 -0
- package/scripts/cleanups/deleteYearOldNotifications.d.cts +1 -0
- package/scripts/cleanups/removeAllUsersFromHiddenPublicGroup.d.ts +1 -0
- package/scripts/clearAllEndorsementInGroup.d.ts +1 -0
- package/scripts/cloning/clearUsersForCommunitiesFromUrl.d.ts +1 -0
- package/scripts/cloning/cloneFromUrlScript.d.ts +1 -0
- package/scripts/cloning/cloneWBFromUrlScriptAndCreateLinks.d.ts +1 -0
- package/scripts/cloning/cloneWBFromUrlScriptNoUsersOrPoints.d.ts +1 -0
- package/scripts/cloning/cloneWBSerbianFromUrlScriptAndCreateLinks.d.ts +1 -0
- package/scripts/cloning/copyCommunityConfigAndTranslationsFromURL.d.ts +1 -0
- package/scripts/cloning/copyCommunityOneGroupToDomainNoUsersNoEndorsements.d.ts +1 -0
- package/scripts/cloning/copyCommunityToDomainNoUsersNoEndorsements.d.ts +1 -0
- package/scripts/cloning/copyCommunityToDomainWithEverything.d.ts +1 -0
- package/scripts/cloning/copyCommunityToDomainWithOnlyGroups.d.ts +1 -0
- package/scripts/cloning/copyGroupConfigAndTranslationsFromURL.d.ts +1 -0
- package/scripts/cloning/copyPostToGroupOld.d.ts +1 -0
- package/scripts/cloning/copyPostVideosFromURL.d.ts +1 -0
- package/scripts/cloning/copyPostWithOutAnyVotingOrActivities.d.ts +1 -0
- package/scripts/cloning/deepCloneSerbianWBFromUrlScriptAndCreateLinks.d.ts +1 -0
- package/scripts/cloning/deepCloneWBFromUrlScriptAndCreateLinks.d.ts +1 -0
- package/scripts/cloning/setAdminsFromURL.d.ts +1 -0
- package/scripts/cloning/setExternalIdsFromURL.d.ts +1 -0
- package/scripts/countCommunity.d.ts +1 -0
- package/scripts/countCommunityUsers.d.ts +1 -0
- package/scripts/countDelayedNotifications.d.ts +1 -0
- package/scripts/countGroup.d.ts +1 -0
- package/scripts/countStuff.d.ts +1 -0
- package/scripts/countUniqueVotersInAGroup.d.ts +1 -0
- package/scripts/createInvitesAndShow.d.ts +1 -0
- package/scripts/database/sync_database.d.ts +1 -0
- package/scripts/database/sync_dev_database.d.ts +1 -0
- package/scripts/debugNotifications.d.ts +1 -0
- package/scripts/deleteAllNewsFeeds.d.ts +1 -0
- package/scripts/deleteCategory.d.ts +1 -0
- package/scripts/deleteOldAppActivities.d.ts +1 -0
- package/scripts/deletePostContactDataForCommunity.d.ts +1 -0
- package/scripts/destroy/destroy_all_but_one_domain.d.ts +1 -0
- package/scripts/displayAuthorForPost.d.ts +1 -0
- package/scripts/endorsementFraudDetection/analyseEndorsementsForCommunity.d.ts +1 -0
- package/scripts/endorsementFraudDetection/bulkDeleteDuplicateEndorsmentsFromUrl.d.ts +1 -0
- package/scripts/exportAllStatusChanges.d.ts +1 -0
- package/scripts/exportClientAcitivity.d.ts +1 -0
- package/scripts/exportEndorsementsForCommunity.d.ts +1 -0
- package/scripts/exportPointQualitiesForCommunity.d.ts +1 -0
- package/scripts/exportPostsAndPointsForCommunity.d.ts +1 -0
- package/scripts/exportPostsDataSetForDomain.d.ts +1 -0
- package/scripts/exportPostsForGroup.d.ts +1 -0
- package/scripts/exportRatingsForPost.d.ts +1 -0
- package/scripts/exportUserEndorsementsWithUserAnalysis.d.ts +1 -0
- package/scripts/exportUsersForCommunity.d.ts +1 -0
- package/scripts/exportUsersForDomain.d.ts +1 -0
- package/scripts/exportUsersForGroup.d.ts +1 -0
- package/scripts/exports/ratingDistribution.d.ts +1 -0
- package/scripts/exports/whoEndorsedWhatByCommunity.d.ts +1 -0
- package/scripts/findUnusedClientImports.d.ts +1 -0
- package/scripts/fixAllPostPointCounts.d.ts +1 -0
- package/scripts/fixAnonNotificationsSettings.d.ts +1 -0
- package/scripts/fixCountKopavogur.d.ts +1 -0
- package/scripts/fixEndorsementsAfterCopyPostToGroup.d.ts +1 -0
- package/scripts/fixExternalUserId.d.ts +1 -0
- package/scripts/fixGroupAccess.d.ts +1 -0
- package/scripts/fixGroupIdeasAndPointsCount.d.ts +1 -0
- package/scripts/fixNotificationSettings.d.ts +1 -0
- package/scripts/fixSurveyRadioBakedInSubCodes.d.ts +1 -0
- package/scripts/fixWrongUserIdForStatusUpdates.d.ts +1 -0
- package/scripts/gallery/exportGalleryData.d.ts +1 -0
- package/scripts/gallery/importGalleryForCommunity.d.ts +1 -0
- package/scripts/gallery/readJsonAndDownloadImagesVersion2.d.ts +1 -0
- package/scripts/gallery/refreshAcApiPostIdsForCommunity.d.ts +1 -0
- package/scripts/genderAnalysis.d.ts +1 -0
- package/scripts/genderAnalysisByStatus.d.ts +1 -0
- package/scripts/importAllLocalesFromLocalFolders.d.ts +1 -0
- package/scripts/importDomain.d.ts +1 -0
- package/scripts/keys/addOidcToDomain.d.cts +1 -0
- package/scripts/landUseGame/export3Ddata.d.ts +1 -0
- package/scripts/listLanguagesForGroup.d.ts +1 -0
- package/scripts/loadTestCreateDummyContentForGroup.d.ts +1 -0
- package/scripts/makeRecursiveMapData.d.ts +1 -0
- package/scripts/mapping/community_map_csv.d.ts +1 -0
- package/scripts/moveCommunityToDomain.d.ts +1 -0
- package/scripts/moveGroupToCommunity.d.ts +1 -0
- package/scripts/movePostToGroup.d.ts +1 -0
- package/scripts/movePostsToGroupsRecountGroupFromUrl.d.ts +1 -0
- package/scripts/oldMovePostToGroup.d.ts +1 -0
- package/scripts/processCsvForPdfUrls.d.ts +1 -0
- package/scripts/processCsvForTranslationAndToxicity.d.ts +1 -0
- package/scripts/recount/recount_recursive_communities.d.ts +1 -0
- package/scripts/recountALLCommunityGroupCounts.d.ts +1 -0
- package/scripts/recountAll.d.ts +1 -0
- package/scripts/recountCommunitesFromUrl.d.ts +1 -0
- package/scripts/recountCommunity.d.ts +1 -0
- package/scripts/recountGroup.d.ts +1 -0
- package/scripts/recountGroupNoUserChange.d.ts +1 -0
- package/scripts/resetAllEndorsementsForGroup.d.ts +1 -0
- package/scripts/resetEnTranslationForGroup.d.ts +1 -0
- package/scripts/setAdminOnAll.d.cts +1 -0
- package/scripts/setDomainAdmin.d.cts +1 -0
- package/scripts/setDomainLocales.d.ts +1 -0
- package/scripts/setEarlQuestionIdOnGroup.d.cts +1 -0
- package/scripts/setLanguageOnGroupCommunitesFromUrl.d.ts +1 -0
- package/scripts/setMemberOfAll.d.ts +1 -0
- package/scripts/setNewUserForContentOfCommunity.d.ts +1 -0
- package/scripts/setOfficialStatusOnAllPostsForCommunity.d.ts +1 -0
- package/scripts/setUserOnAll.d.ts +1 -0
- package/scripts/showCategoryForGroup.d.ts +1 -0
- package/scripts/showOldActivityTypes.d.ts +1 -0
- package/scripts/showPostsMissingCategoryForGroup.d.ts +1 -0
- package/scripts/showStatuses.d.ts +1 -0
- package/scripts/showUniqueVotersInCommunity.d.ts +1 -0
- package/scripts/showUserAgentsAndIpsForEmails.d.ts +1 -0
- package/scripts/simpleExportForGroupsForCommunity.d.ts +1 -0
- package/scripts/simpleExportForPointsForCommunity.d.ts +1 -0
- package/scripts/simpleExportForPostsForCommunity.d.ts +1 -0
- package/scripts/testForEndorsments.d.ts +1 -0
- package/scripts/undeleteGroupAndAllContent.d.ts +1 -0
- package/scripts/undeletePost.d.ts +1 -0
- package/scripts/unlinkSsn.d.ts +1 -0
- package/scripts/updateFromAlthingi.d.ts +1 -0
- package/server.d.ts +1 -104
- package/utils/airbrake.d.cts +2 -0
- package/utils/cjsCodeReview.d.ts +13 -0
- package/utils/community_mapping_tools.d.cts +1 -0
- package/utils/copy_utils.d.cts +11 -0
- package/utils/copy_utils.d.ts +4 -0
- package/utils/docx_utils.d.cts +1 -0
- package/utils/export_utils.d.cts +21 -0
- package/utils/i18n.d.cts +2 -0
- package/utils/is_valid_db_id.d.cts +1 -0
- package/utils/logger.d.cts +2 -0
- package/utils/loggerTs.d.ts +3 -0
- package/utils/manifest_generator.d.cts +2 -0
- package/utils/manifest_generator.d.ts +18 -0
- package/utils/parse_domain.d.cts +6 -0
- package/utils/recount_utils.d.cts +7 -0
- package/utils/sharing_parameters.d.cts +8 -0
- package/utils/sitemap_generator.d.cts +2 -0
- package/utils/to_json.d.cts +2 -0
- package/utils/ypLanguages.d.ts +16 -0
- package/webSockets.d.ts +26 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
|
|
2
|
+
interface UnsubscribeResult {
|
|
3
|
+
success: boolean;
|
|
4
|
+
error?: string;
|
|
5
|
+
subscriptionId?: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface SubscribeResult {
|
|
9
|
+
success: boolean;
|
|
10
|
+
error?: string;
|
|
11
|
+
plan?: YpSubscriptionPlanAttributes;
|
|
12
|
+
subscription?: YpSubscriptionAttributes;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface AssistantAgent {
|
|
16
|
+
subscriptionId: number;
|
|
17
|
+
subscriptionPlanId: number;
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
imageUrl: string;
|
|
21
|
+
isRunning: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface AssistantAgentRun {
|
|
25
|
+
runId: number;
|
|
26
|
+
agentProductId: number;
|
|
27
|
+
agentRunId: number;
|
|
28
|
+
status: string;
|
|
29
|
+
agentName: string;
|
|
30
|
+
workflow: any;
|
|
31
|
+
subscriptionId: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
interface AssistantAgentSubscriptionStatus {
|
|
35
|
+
availableSubscriptions: Array<YpSubscriptionAttributes>;
|
|
36
|
+
runningAgents: Array<AssistantAgentRun>;
|
|
37
|
+
systemStatus: {
|
|
38
|
+
healthy: boolean;
|
|
39
|
+
lastUpdated: Date;
|
|
40
|
+
error?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
interface AssistantAgentBundle {
|
|
45
|
+
agentBundleId: number;
|
|
46
|
+
name: string;
|
|
47
|
+
description: string;
|
|
48
|
+
imageUrl: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface AssistantAgentPlan {
|
|
52
|
+
subscriptionPlanId: number;
|
|
53
|
+
name: string;
|
|
54
|
+
type: YpSubscriptionPlanType;
|
|
55
|
+
description: string;
|
|
56
|
+
imageUrl: string;
|
|
57
|
+
price?: number;
|
|
58
|
+
currency?: string;
|
|
59
|
+
maxRunsPerCycle?: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface AssistantAgentPlanStatus {
|
|
63
|
+
availablePlans: Array<AssistantAgentPlan>;
|
|
64
|
+
availableBundle: AssistantAgentBundle | string;
|
|
65
|
+
systemStatus: {
|
|
66
|
+
healthy: boolean;
|
|
67
|
+
lastUpdated: Date;
|
|
68
|
+
error?: string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface ToolClientEvent {
|
|
73
|
+
name: YpAssistantMessageType;
|
|
74
|
+
details: any;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface ToolClientEventUiClick {
|
|
78
|
+
name: "ui_click";
|
|
79
|
+
details: YpAssistantUiClickTypes;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface ToolExecutionResult<T = unknown> {
|
|
83
|
+
success: boolean;
|
|
84
|
+
data?: T;
|
|
85
|
+
html?: string;
|
|
86
|
+
uniqueToken?: string;
|
|
87
|
+
clientEvents?: ToolClientEvent[];
|
|
88
|
+
error?: string;
|
|
89
|
+
metadata?: Record<string, unknown>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Enhanced AssistantChatbotTool interface with result type
|
|
94
|
+
*/
|
|
95
|
+
interface AssistantChatbotTool {
|
|
96
|
+
name: string;
|
|
97
|
+
description: string;
|
|
98
|
+
type?: string;
|
|
99
|
+
parameters: ToolDefinition["parameters"];
|
|
100
|
+
handler: (params: any) => Promise<ToolExecutionResult>;
|
|
101
|
+
resultSchema?: ToolDefinition["parameters"];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Message format for tool results
|
|
106
|
+
*/
|
|
107
|
+
interface ToolResponseMessage {
|
|
108
|
+
role: "tool";
|
|
109
|
+
content: string;
|
|
110
|
+
tool_call_id: string;
|
|
111
|
+
name: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface ToolCall {
|
|
115
|
+
id: string;
|
|
116
|
+
name: string;
|
|
117
|
+
arguments: string;
|
|
118
|
+
startTime?: number; // For timeout tracking
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
interface AssistantChatbotMode {
|
|
122
|
+
name: YpAssistantMode;
|
|
123
|
+
description: string;
|
|
124
|
+
systemPrompt: string;
|
|
125
|
+
tools: AssistantChatbotTool[];
|
|
126
|
+
routingRules?: string[];
|
|
127
|
+
allowedTransitions?: YpAssistantMode[];
|
|
128
|
+
cleanup?: () => Promise<void>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface YpBaseAssistantMemoryData extends YpBaseChatBotMemoryData {
|
|
132
|
+
redisKey: string;
|
|
133
|
+
currentMode: YpAssistantMode;
|
|
134
|
+
currentUser?: YpUserData;
|
|
135
|
+
haveShownLoginWidget?: boolean;
|
|
136
|
+
haveShownConfigurationWidget?: boolean;
|
|
137
|
+
currentAgentStatus?: {
|
|
138
|
+
subscriptionPlanId: number;
|
|
139
|
+
activeAgentRunId?: number;
|
|
140
|
+
subscriptionId: number | null;
|
|
141
|
+
subscriptionState: YpAssistantAgentSubscriptionState;
|
|
142
|
+
configurationState: YpAssistantAgentConfigurationState;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
allChatLogs?: YpSimpleChatLog[];
|
|
146
|
+
|
|
147
|
+
loginState?: YpAssistantLoginState;
|
|
148
|
+
|
|
149
|
+
modeData?: AssistantModeData;
|
|
150
|
+
modeHistory?: Array<{
|
|
151
|
+
mode: YpAssistantMode;
|
|
152
|
+
timestamp: number;
|
|
153
|
+
reason?: string;
|
|
154
|
+
}>;
|
|
155
|
+
}
|
|
156
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { OpenAI } from "openai";
|
|
2
|
+
import WebSocket from "ws";
|
|
3
|
+
import ioredis from "ioredis";
|
|
4
|
+
import { type ChatCompletionMessageParam } from "openai/resources/chat/completions";
|
|
5
|
+
import { YpBaseChatBot } from "../../active-citizen/llms/baseChatBot.js";
|
|
6
|
+
import { YpAgentProduct } from "../models/agentProduct.js";
|
|
7
|
+
/**
|
|
8
|
+
* Common modes that implementations might use
|
|
9
|
+
*/
|
|
10
|
+
export declare enum CommonModes {
|
|
11
|
+
ErrorRecovery = "error_recovery"
|
|
12
|
+
}
|
|
13
|
+
export declare abstract class YpBaseAssistant extends YpBaseChatBot {
|
|
14
|
+
protected voiceEnabled: boolean;
|
|
15
|
+
openaiClient: OpenAI;
|
|
16
|
+
memory: YpBaseAssistantMemoryData;
|
|
17
|
+
private eventEmitter;
|
|
18
|
+
persistMemory: boolean;
|
|
19
|
+
domainId: number;
|
|
20
|
+
DEBUG: boolean;
|
|
21
|
+
protected modes: Map<YpAssistantMode, AssistantChatbotMode>;
|
|
22
|
+
protected availableTools: Map<string, AssistantChatbotTool>;
|
|
23
|
+
protected toolCallTimeout: number;
|
|
24
|
+
protected maxModeTransitions: number;
|
|
25
|
+
private clientSystemMessageListener;
|
|
26
|
+
redis: ioredis.Redis;
|
|
27
|
+
modelName: string;
|
|
28
|
+
constructor(wsClientId: string, wsClients: Map<string, WebSocket>, redis: ioredis.Redis, redisKey: string, domainId: number);
|
|
29
|
+
destroy(): void;
|
|
30
|
+
removeClientSystemMessageListener(): void;
|
|
31
|
+
handleClientSystemMessage(data: Buffer): void;
|
|
32
|
+
setupClientSystemMessageListener(): void;
|
|
33
|
+
getCurrentAgentProduct(): Promise<YpAgentProductAttributes | undefined>;
|
|
34
|
+
getCurrentSubscriptionPlan(): Promise<YpSubscriptionPlanAttributes | undefined>;
|
|
35
|
+
getCurrentSubscription(): Promise<YpSubscriptionAttributes | undefined>;
|
|
36
|
+
getCurrentAgentRun(): Promise<YpAgentProductRunAttributes | undefined>;
|
|
37
|
+
updateAiModelSession(message: string): Promise<void>;
|
|
38
|
+
maybeSendTextResponse(message: string): Promise<void>;
|
|
39
|
+
processClientSystemMessage(clientEvent: YpAssistantClientSystemMessage): Promise<void>;
|
|
40
|
+
emit(event: string, ...args: any[]): boolean;
|
|
41
|
+
on(event: string, listener: (...args: any[]) => void): void;
|
|
42
|
+
updateCurrentAgentProductPlan(subscriptionPlanId: number, subscriptionId: number | null): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Convert tool result to message format
|
|
45
|
+
*/
|
|
46
|
+
protected convertToolResultToMessage(toolCall: ToolCall, result: ToolExecutionResult): ToolResponseMessage;
|
|
47
|
+
/**
|
|
48
|
+
* Handle executing tool calls with results
|
|
49
|
+
*/
|
|
50
|
+
handleToolCalls(toolCalls: Map<string, ToolCall>): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Handle tool responses by creating a new completion
|
|
53
|
+
*/
|
|
54
|
+
handleToolResponses(toolResponses: ToolResponseMessage[]): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Abstract method that subclasses must implement to define their modes
|
|
57
|
+
*/
|
|
58
|
+
abstract defineAvailableModes(): Promise<AssistantChatbotMode[]>;
|
|
59
|
+
setupMemoryAsync(): Promise<void>;
|
|
60
|
+
loadMemoryAsync(): Promise<void>;
|
|
61
|
+
getCleanedParams<T extends object>(params: string | T): T;
|
|
62
|
+
setCurrentMode(mode: YpAssistantMode): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Initialize modes from subclass definitions
|
|
65
|
+
*/
|
|
66
|
+
initializeModes(): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Get current mode's functions
|
|
69
|
+
*/
|
|
70
|
+
getCurrentModeFunctions(): AssistantChatbotTool[];
|
|
71
|
+
get isLoggedIn(): boolean;
|
|
72
|
+
renderLoginStatus(): string;
|
|
73
|
+
defaultSystemPrompt: string;
|
|
74
|
+
/**
|
|
75
|
+
* Get current mode's system prompt
|
|
76
|
+
*/
|
|
77
|
+
getCurrentSystemPrompt(): string;
|
|
78
|
+
sendAvatarUrlChange(url: string | null, avatarName: string | null): void;
|
|
79
|
+
/**
|
|
80
|
+
* Validate mode transition
|
|
81
|
+
*/
|
|
82
|
+
protected validateModeTransition(fromMode: YpAssistantMode, toMode: YpAssistantMode): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Clean up mode-specific resources
|
|
85
|
+
*/
|
|
86
|
+
protected cleanupMode(mode: YpAssistantMode): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Set mode data with type safety
|
|
89
|
+
*/
|
|
90
|
+
setModeData<T>(type: string, data: T): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Get mode data with type safety
|
|
93
|
+
*/
|
|
94
|
+
protected getModeData<T>(): T | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Main conversation handler with updated function handling
|
|
97
|
+
*/
|
|
98
|
+
conversation(chatLog: YpSimpleChatLog[]): Promise<void>;
|
|
99
|
+
getAgentProduct(agentProductId: number): Promise<YpAgentProduct | null>;
|
|
100
|
+
/**
|
|
101
|
+
* Convert chat log to OpenAI message format
|
|
102
|
+
*/
|
|
103
|
+
protected convertToOpenAIMessages(chatLog: YpSimpleChatLog[]): ChatCompletionMessageParam[];
|
|
104
|
+
/**
|
|
105
|
+
* Handle mode switching
|
|
106
|
+
*/
|
|
107
|
+
handleModeSwitch(newMode: YpAssistantMode, reason: string, params: any): Promise<void>;
|
|
108
|
+
addUserMessage(message: string): Promise<void>;
|
|
109
|
+
addAssistantMessage(message: string): Promise<void>;
|
|
110
|
+
addAssistantHtmlMessage(html: string, uniqueToken?: string): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Handle streaming responses and function calls with comprehensive debugging
|
|
113
|
+
*/
|
|
114
|
+
streamWebSocketResponses(stream: AsyncIterable<OpenAI.Chat.Completions.ChatCompletionChunk>): Promise<void>;
|
|
115
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WebSocket } from "ws";
|
|
2
|
+
import { YpBaseAssistant } from "./baseAssistant.js";
|
|
3
|
+
import { YpBaseChatBotWithVoice } from "./voiceAssistant.js";
|
|
4
|
+
import ioredis from "ioredis";
|
|
5
|
+
export declare abstract class YpBaseAssistantWithVoice extends YpBaseAssistant {
|
|
6
|
+
protected voiceBot: YpBaseChatBotWithVoice | undefined;
|
|
7
|
+
private mainBotWsHandler?;
|
|
8
|
+
private forwardEventHandler?;
|
|
9
|
+
constructor(wsClientId: string, wsClients: Map<string, WebSocket>, redis: ioredis.Redis, voiceEnabled: boolean, redisKey: string, domainId: number);
|
|
10
|
+
destroy(): void;
|
|
11
|
+
initialize(): Promise<void>;
|
|
12
|
+
createVoiceBot(): Promise<void>;
|
|
13
|
+
destroyVoiceBot(): void;
|
|
14
|
+
private setupVoiceEventForwarder;
|
|
15
|
+
setVoiceMode(enabled: boolean): Promise<void>;
|
|
16
|
+
handleModeSwitch(newMode: YpAssistantMode, reason: string, params: any): Promise<void>;
|
|
17
|
+
conversation(chatLog: YpSimpleChatLog[]): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseAssistantMode } from "./baseAssistantMode.js";
|
|
2
|
+
import { YpAgentAssistant } from "../agentAssistant.js";
|
|
3
|
+
import { SubscriptionTools } from "./tools/subscriptionTools.js";
|
|
4
|
+
import { NavigationTools } from "./tools/navigationTools.js";
|
|
5
|
+
import { LoginAssistantTools } from "./tools/loginTools.js";
|
|
6
|
+
import { AgentTools } from "./tools/agentTools.js";
|
|
7
|
+
export declare class DirectConversationMode extends BaseAssistantMode {
|
|
8
|
+
constructor(assistant: YpAgentAssistant);
|
|
9
|
+
subscriptionTools: SubscriptionTools;
|
|
10
|
+
navigationTools: NavigationTools;
|
|
11
|
+
loginTools: LoginAssistantTools;
|
|
12
|
+
agentTools: AgentTools;
|
|
13
|
+
protected getCurrentModeSystemPrompt(): Promise<string>;
|
|
14
|
+
protected getCurrentModeTools(): Promise<AssistantChatbotTool[]>;
|
|
15
|
+
getMode(): Promise<AssistantChatbotMode>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseAssistantMode } from "./baseAssistantMode.js";
|
|
2
|
+
import { YpAgentAssistant } from "../agentAssistant.js";
|
|
3
|
+
import { NavigationTools } from "./tools/navigationTools.js";
|
|
4
|
+
import { LoginAssistantTools } from "./tools/loginTools.js";
|
|
5
|
+
export declare class AgentSelectionMode extends BaseAssistantMode {
|
|
6
|
+
constructor(assistant: YpAgentAssistant);
|
|
7
|
+
navigationTools: NavigationTools;
|
|
8
|
+
loginTools: LoginAssistantTools;
|
|
9
|
+
protected getCurrentModeSystemPrompt(): Promise<string>;
|
|
10
|
+
protected getCurrentModeTools(): Promise<AssistantChatbotTool[]>;
|
|
11
|
+
getMode(): Promise<AssistantChatbotMode>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { YpAgentAssistant } from "../agentAssistant.js";
|
|
2
|
+
export declare class BaseAssistantMode {
|
|
3
|
+
protected assistant: YpAgentAssistant;
|
|
4
|
+
constructor(assistant: YpAgentAssistant);
|
|
5
|
+
protected get memory(): YpBaseAssistantMemoryData;
|
|
6
|
+
renderSimplifiedWorkflowStep(step: YpAgentRunWorkflowStep | undefined): string;
|
|
7
|
+
renderSimplifiedWorkflow(workflow: YpAgentRunWorkflowConfiguration): string;
|
|
8
|
+
renderSimplifiedAgentRun(agentRun: YpAgentProductRunAttributes | undefined): string;
|
|
9
|
+
renderCommon(): Promise<"" | undefined>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { YpAgentAssistant } from "../../agentAssistant.js";
|
|
2
|
+
import { BaseAssistantTools } from "./baseTools.js";
|
|
3
|
+
import { AgentModels } from "./models/agents.js";
|
|
4
|
+
export declare class AgentTools extends BaseAssistantTools {
|
|
5
|
+
agentModels: AgentModels;
|
|
6
|
+
constructor(assistant: YpAgentAssistant);
|
|
7
|
+
get showAgentWorkflowOverviewWidget(): {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
type: string;
|
|
11
|
+
parameters: {
|
|
12
|
+
type: string;
|
|
13
|
+
properties: YpAgentEmptyProperties;
|
|
14
|
+
};
|
|
15
|
+
handler: (params: YpAgentEmptyProperties) => Promise<ToolExecutionResult>;
|
|
16
|
+
};
|
|
17
|
+
showAgentWorkflowOverviewWidgetHandler(params: YpAgentEmptyProperties): Promise<ToolExecutionResult>;
|
|
18
|
+
get showAgentRunWidget(): {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
type: string;
|
|
22
|
+
parameters: {
|
|
23
|
+
type: string;
|
|
24
|
+
properties: YpAgentEmptyProperties;
|
|
25
|
+
};
|
|
26
|
+
handler: (params: YpAgentEmptyProperties) => Promise<ToolExecutionResult>;
|
|
27
|
+
};
|
|
28
|
+
showAgentRunWidgetHandler(params: YpAgentEmptyProperties): Promise<ToolExecutionResult>;
|
|
29
|
+
get createNewAgentRunReadyToRunFirstWorkflowStep(): {
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
type: string;
|
|
33
|
+
parameters: {
|
|
34
|
+
type: string;
|
|
35
|
+
properties: YpAgentRunStartProperties;
|
|
36
|
+
required: readonly ["hasVerballyConfirmedTheRun"];
|
|
37
|
+
};
|
|
38
|
+
handler: (params: YpAgentRunStartParams) => Promise<ToolExecutionResult>;
|
|
39
|
+
};
|
|
40
|
+
createNewAgentRunReadyToRunFirstWorkflowStepHandler(params: YpAgentRunStartParams): Promise<ToolExecutionResult>;
|
|
41
|
+
startCurrentRunAgentNextWorkflowStep(): Promise<{
|
|
42
|
+
name: string;
|
|
43
|
+
description: string;
|
|
44
|
+
type: string;
|
|
45
|
+
parameters: {
|
|
46
|
+
type: string;
|
|
47
|
+
properties: YpAgentRunStartNextWorkflowStepProperties;
|
|
48
|
+
required: readonly ["userHasVerballyConfirmedStartOfNextWorkflowStepWithTheAgentName"];
|
|
49
|
+
};
|
|
50
|
+
handler: (params: YpAgentRunStartNextWorkflowStepParams) => Promise<ToolExecutionResult>;
|
|
51
|
+
}>;
|
|
52
|
+
startCurrentRunAgentNextWorkflowStepHandler(params: YpAgentRunStartNextWorkflowStepParams): Promise<ToolExecutionResult>;
|
|
53
|
+
get stopCurrentAgentWorkflow(): {
|
|
54
|
+
name: string;
|
|
55
|
+
description: string;
|
|
56
|
+
type: string;
|
|
57
|
+
parameters: {
|
|
58
|
+
type: string;
|
|
59
|
+
properties: YpAgentRunStopCurrentWorkflowStepProperties;
|
|
60
|
+
required: readonly ["userHasVerballyConfirmedStopCurrentWorkflowStepWithTheAgentName"];
|
|
61
|
+
};
|
|
62
|
+
handler: (params: YpAgentRunStopCurrentWorkflowStepParams) => Promise<ToolExecutionResult>;
|
|
63
|
+
};
|
|
64
|
+
stopCurrentAgentWorkflowHandler(params: YpAgentRunStopCurrentWorkflowStepParams): Promise<ToolExecutionResult>;
|
|
65
|
+
get deactivateAgent(): {
|
|
66
|
+
name: string;
|
|
67
|
+
description: string;
|
|
68
|
+
type: string;
|
|
69
|
+
parameters: {
|
|
70
|
+
type: string;
|
|
71
|
+
properties: YpAgentEmptyProperties;
|
|
72
|
+
};
|
|
73
|
+
handler: (params: YpAgentEmptyProperties) => Promise<ToolExecutionResult>;
|
|
74
|
+
};
|
|
75
|
+
deactivateAgentHandler(params: YpAgentEmptyProperties): Promise<ToolExecutionResult>;
|
|
76
|
+
get showConfigurationWidget(): {
|
|
77
|
+
name: string;
|
|
78
|
+
description: string;
|
|
79
|
+
type: string;
|
|
80
|
+
parameters: {
|
|
81
|
+
type: string;
|
|
82
|
+
properties: YpAgentEmptyProperties;
|
|
83
|
+
};
|
|
84
|
+
handler: (params: YpAgentEmptyProperties) => Promise<ToolExecutionResult>;
|
|
85
|
+
};
|
|
86
|
+
showConfigurationWidgetHandler(params: YpAgentEmptyProperties): Promise<ToolExecutionResult>;
|
|
87
|
+
get submitConfiguration(): {
|
|
88
|
+
name: string;
|
|
89
|
+
description: string;
|
|
90
|
+
type: string;
|
|
91
|
+
parameters: {
|
|
92
|
+
type: string;
|
|
93
|
+
properties: YpAgentEmptyProperties;
|
|
94
|
+
};
|
|
95
|
+
handler: (params: YpAgentEmptyProperties) => Promise<ToolExecutionResult>;
|
|
96
|
+
};
|
|
97
|
+
submitConfigurationHandler(params: YpAgentEmptyProperties): Promise<ToolExecutionResult>;
|
|
98
|
+
getSimpleWorkflow(workflow: YpAgentRunWorkflowConfiguration): YpAgentRunWorkflowConfiguration;
|
|
99
|
+
private renderAgentRunWidget;
|
|
100
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { YpAgentAssistant } from "agents/assistants/agentAssistant.js";
|
|
2
|
+
export declare class BaseAssistantTools {
|
|
3
|
+
protected assistant: YpAgentAssistant;
|
|
4
|
+
constructor(assistant: YpAgentAssistant);
|
|
5
|
+
waitTick(): Promise<void>;
|
|
6
|
+
updateCurrentAgentProductPlan(plan: YpSubscriptionPlanAttributes, subscription: YpSubscriptionAttributes | null, options?: {
|
|
7
|
+
sendEvent: boolean;
|
|
8
|
+
}): Promise<void>;
|
|
9
|
+
updateAgentProductRun(agentRun: YpAgentProductRunAttributes, options?: {
|
|
10
|
+
sendEvent: boolean;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
updateShownConfigurationWidget(options?: {
|
|
13
|
+
sendEvent: boolean;
|
|
14
|
+
}): Promise<void>;
|
|
15
|
+
updateHaveShownLoginWidget(options?: {
|
|
16
|
+
sendEvent: boolean;
|
|
17
|
+
}): Promise<void>;
|
|
18
|
+
clearCurrentAgentProduct(options?: {
|
|
19
|
+
sendEvent: boolean;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { YpAgentAssistant } from "../../agentAssistant.js";
|
|
2
|
+
import { BaseAssistantTools } from "./baseTools.js";
|
|
3
|
+
export declare class LoginAssistantTools extends BaseAssistantTools {
|
|
4
|
+
constructor(assistant: YpAgentAssistant);
|
|
5
|
+
showLogin(description: string): {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
type: string;
|
|
9
|
+
parameters: {
|
|
10
|
+
type: string;
|
|
11
|
+
properties: YpAgentEmptyProperties;
|
|
12
|
+
required: readonly [];
|
|
13
|
+
};
|
|
14
|
+
handler: (params: {}) => Promise<ToolExecutionResult>;
|
|
15
|
+
};
|
|
16
|
+
showLoginHandler(params: {}): Promise<ToolExecutionResult>;
|
|
17
|
+
get clickMainLoginButton(): {
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
type: string;
|
|
21
|
+
parameters: {
|
|
22
|
+
type: string;
|
|
23
|
+
properties: YpAgentEmptyProperties;
|
|
24
|
+
};
|
|
25
|
+
handler: (params: {}) => Promise<ToolExecutionResult>;
|
|
26
|
+
};
|
|
27
|
+
clickMainLoginButtonHandler(params: {}): Promise<ToolExecutionResult>;
|
|
28
|
+
get clickGoogleLoginButton(): {
|
|
29
|
+
name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
type: string;
|
|
32
|
+
parameters: {
|
|
33
|
+
type: string;
|
|
34
|
+
properties: YpAgentEmptyProperties;
|
|
35
|
+
};
|
|
36
|
+
handler: (params: {}) => Promise<ToolExecutionResult>;
|
|
37
|
+
};
|
|
38
|
+
clickGoogleLoginButtonHandler(params: {}): Promise<ToolExecutionResult>;
|
|
39
|
+
get logout(): {
|
|
40
|
+
name: string;
|
|
41
|
+
description: string;
|
|
42
|
+
type: string;
|
|
43
|
+
parameters: {
|
|
44
|
+
type: string;
|
|
45
|
+
properties: YpAssistantLogoutProperties;
|
|
46
|
+
required: readonly ["confirmLogout"];
|
|
47
|
+
};
|
|
48
|
+
handler: (params: YpAssistantLogoutParams) => Promise<ToolExecutionResult>;
|
|
49
|
+
};
|
|
50
|
+
logoutHandler(params: YpAssistantLogoutParams): Promise<ToolExecutionResult>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SubscriptionModels } from "./subscriptions.js";
|
|
2
|
+
import { YpAgentAssistant } from "../../../../assistants/agentAssistant.js";
|
|
3
|
+
export declare class AgentModels {
|
|
4
|
+
subscriptionModels: SubscriptionModels;
|
|
5
|
+
assistant: YpAgentAssistant;
|
|
6
|
+
private queueManager;
|
|
7
|
+
constructor(assistant: YpAgentAssistant);
|
|
8
|
+
getCurrentAgentAndWorkflow(): Promise<{
|
|
9
|
+
agent: YpAgentProductAttributes;
|
|
10
|
+
run: YpAgentProductRunAttributes | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
convertToUnderscoresWithMaxLength(str: string): string;
|
|
13
|
+
startCurrentWorkflowStep(agentRunId: number, structuredAnswersOverrides?: YpStructuredAnswer[]): Promise<{
|
|
14
|
+
agentRun: YpAgentProductRunAttributes;
|
|
15
|
+
previousStep: YpAgentRunWorkflowStep;
|
|
16
|
+
currentStep: YpAgentRunWorkflowStep;
|
|
17
|
+
message: string;
|
|
18
|
+
}>;
|
|
19
|
+
getCurrentWorkflowStep(): Promise<YpAgentRunWorkflowStep>;
|
|
20
|
+
getNextWorkflowStep(): Promise<YpAgentRunWorkflowStep | undefined>;
|
|
21
|
+
stopCurrentWorkflowStep(): Promise<{
|
|
22
|
+
agent: YpAgentProductAttributes;
|
|
23
|
+
run: YpAgentProductRunAttributes;
|
|
24
|
+
message: string;
|
|
25
|
+
}>;
|
|
26
|
+
checkAgentStatus(): Promise<PsAgentStatus | null>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { YpAgentAssistant } from "../../../../assistants/agentAssistant.js";
|
|
2
|
+
export declare class SubscriptionModels {
|
|
3
|
+
assistant: YpAgentAssistant;
|
|
4
|
+
constructor(assistant: YpAgentAssistant);
|
|
5
|
+
loadAgentSubscriptionPlans(): Promise<AssistantAgentPlanStatus>;
|
|
6
|
+
loadAgentProductPlanAndSubscription(subscriptionPlanId: number): Promise<{
|
|
7
|
+
plan: YpSubscriptionPlanAttributes | null;
|
|
8
|
+
subscription: YpSubscriptionAttributes | null;
|
|
9
|
+
}>;
|
|
10
|
+
loadUserAgentSubscriptions(): Promise<AssistantAgentSubscriptionStatus>;
|
|
11
|
+
unsubscribeFromAgentPlan(subscriptionId: number): Promise<UnsubscribeResult>;
|
|
12
|
+
subscribeToAgentPlan(agentProductId: number, subscriptionPlanId: number, returnCurrentSubscription?: boolean): Promise<SubscribeResult>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { YpAgentAssistant } from "../../agentAssistant.js";
|
|
2
|
+
import { AgentModels } from "./models/agents.js";
|
|
3
|
+
import { SubscriptionModels } from "./models/subscriptions.js";
|
|
4
|
+
import { BaseAssistantTools } from "./baseTools.js";
|
|
5
|
+
export declare class NavigationTools extends BaseAssistantTools {
|
|
6
|
+
protected agentModels: AgentModels;
|
|
7
|
+
protected subscriptionModels: SubscriptionModels;
|
|
8
|
+
constructor(assistant: YpAgentAssistant);
|
|
9
|
+
goBackToMainAssistant(): Promise<ToolExecutionResult>;
|
|
10
|
+
get connectDirectlyToAgent(): {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
type: string;
|
|
14
|
+
parameters: {
|
|
15
|
+
type: string;
|
|
16
|
+
properties: YpAgentSelectProperties;
|
|
17
|
+
required: readonly ["subscriptionPlanId"];
|
|
18
|
+
};
|
|
19
|
+
handler: (params: YpAgentSelectParams) => Promise<ToolExecutionResult>;
|
|
20
|
+
};
|
|
21
|
+
connectToOneOfTheAgentsHandler(params: YpAgentSelectParams): Promise<ToolExecutionResult>;
|
|
22
|
+
get listAllAgentsAvailableForConnection(): {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
type: string;
|
|
26
|
+
parameters: {
|
|
27
|
+
type: string;
|
|
28
|
+
properties: YpAgentEmptyProperties;
|
|
29
|
+
};
|
|
30
|
+
handler: (params: YpAgentEmptyProperties) => Promise<ToolExecutionResult>;
|
|
31
|
+
};
|
|
32
|
+
listAllAgentsAvailableForConnectionsHandler(params: YpAgentEmptyProperties): Promise<ToolExecutionResult>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { YpAgentAssistant } from "../../agentAssistant.js";
|
|
2
|
+
import { SubscriptionModels } from "./models/subscriptions.js";
|
|
3
|
+
import { BaseAssistantTools } from "./baseTools.js";
|
|
4
|
+
export declare class SubscriptionTools extends BaseAssistantTools {
|
|
5
|
+
subscriptionModels: SubscriptionModels;
|
|
6
|
+
constructor(assistant: YpAgentAssistant);
|
|
7
|
+
get listMyAgentSubscriptions(): {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
type: string;
|
|
11
|
+
parameters: {
|
|
12
|
+
type: string;
|
|
13
|
+
properties: YpAgentEmptyProperties;
|
|
14
|
+
};
|
|
15
|
+
handler: (params: YpAgentEmptyProperties) => Promise<ToolExecutionResult>;
|
|
16
|
+
};
|
|
17
|
+
listMyAgentSubscriptionsHandler(params: YpAgentEmptyProperties): Promise<ToolExecutionResult>;
|
|
18
|
+
get listAllAgentsAvailableForSubscription(): {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
type: string;
|
|
22
|
+
parameters: {
|
|
23
|
+
type: string;
|
|
24
|
+
properties: YpAgentEmptyProperties;
|
|
25
|
+
};
|
|
26
|
+
handler: (params: YpAgentEmptyProperties) => Promise<ToolExecutionResult>;
|
|
27
|
+
};
|
|
28
|
+
listAllAgentsAvailableForSubscriptionHandler(params: YpAgentEmptyProperties): Promise<ToolExecutionResult>;
|
|
29
|
+
get subscribeToCurrentAgentPlan(): {
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
type: string;
|
|
33
|
+
parameters: {
|
|
34
|
+
type: string;
|
|
35
|
+
properties: YpAgentSubscribeProperties;
|
|
36
|
+
required: readonly ["useHasVerballyConfirmedSubscribeWithTheAgentName"];
|
|
37
|
+
};
|
|
38
|
+
handler: (params: YpAgentSubscribeParams) => Promise<ToolExecutionResult>;
|
|
39
|
+
};
|
|
40
|
+
subscribeToCurrentAgentPlanHandler(params: YpAgentSubscribeParams): Promise<ToolExecutionResult>;
|
|
41
|
+
get unsubscribeFromCurrentAgentSubscription(): {
|
|
42
|
+
name: string;
|
|
43
|
+
description: string;
|
|
44
|
+
type: string;
|
|
45
|
+
parameters: {
|
|
46
|
+
type: string;
|
|
47
|
+
properties: YpAgentUnsubscribeProperties;
|
|
48
|
+
required: readonly ["useHasVerballyConfirmedUnsubscribeWithTheAgentName"];
|
|
49
|
+
};
|
|
50
|
+
handler: (params: YpAgentUnsubscribeParams) => Promise<ToolExecutionResult>;
|
|
51
|
+
};
|
|
52
|
+
unsubscribeFromCurrentAgentSubscriptionHandler(params: YpAgentUnsubscribeParams): Promise<ToolExecutionResult>;
|
|
53
|
+
}
|