Generated the JSON contracts of the stored data at compile time (#1148)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-02 18:23:19 +01:00
1 parent fc7399e81b
commit e954881fda
75 files changed
+5437 -298

No files matched your search

@@ -11,32 +11,32 @@ public sealed class Data
/// The version of the settings file. Allows us to upgrade the settings
/// when a new version is available.
/// </summary>
public Version Version { get; init; } = Version.V6;
public Version Version { get; set; } = Version.V6;
/// <summary>
/// List of configured providers.
/// </summary>
public List<Provider> Providers { get; init; } = [];
public List<Provider> Providers { get; set; } = [];
/// <summary>
/// Settings concerning confidence levels.
/// </summary>
public DataConfidence Confidence { get; init; } = new(x => x.Confidence);
public DataConfidence Confidence { get; set; } = new(x => x.Confidence);
/// <summary>
/// Settings concerning data source security checks.
/// </summary>
public DataSourceSecuritySettings DataSourceSecurity { get; init; } = new(x => x.DataSourceSecurity);
public DataSourceSecuritySettings DataSourceSecurity { get; set; } = new(x => x.DataSourceSecurity);
/// <summary>
/// A collection of embedding providers configured.
/// </summary>
public List<EmbeddingProvider> EmbeddingProviders { get; init; } = [];
public List<EmbeddingProvider> EmbeddingProviders { get; set; } = [];
/// <summary>
/// A collection of speech providers configured.
/// </summary>
public List<TranscriptionProvider> TranscriptionProviders { get; init; } = [];
public List<TranscriptionProvider> TranscriptionProviders { get; set; } = [];
/// <summary>
/// A collection of data sources configured.
@@ -59,17 +59,17 @@ public sealed class Data
/// <summary>
/// Settings which apply to all mailboxes.
/// </summary>
public DataMailboxes MailboxSettings { get; init; } = new(x => x.MailboxSettings);
public DataMailboxes MailboxSettings { get; set; } = new(x => x.MailboxSettings);
/// <summary>
/// List of configured profiles.
/// </summary>
public List<Profile> Profiles { get; init; } = [];
public List<Profile> Profiles { get; set; } = [];
/// <summary>
/// List of configured chat templates.
/// </summary>
public List<ChatTemplate> ChatTemplates { get; init; } = [];
public List<ChatTemplate> ChatTemplates { get; set; } = [];
/// <summary>
/// List of enabled plugins.
@@ -161,74 +161,74 @@ public sealed class Data
/// </summary>
public uint NextDocumentAnalysisPolicyNum { get; set; } = 1;
public DataApp App { get; init; } = new(x => x.App);
public DataApp App { get; set; } = new(x => x.App);
public DataChat Chat { get; init; } = new(x => x.Chat);
public DataChat Chat { get; set; } = new(x => x.Chat);
public DataWorkspace Workspace { get; init; } = new();
public DataWorkspace Workspace { get; set; } = new();
public DataIconFinder IconFinder { get; init; } = new();
public DataIconFinder IconFinder { get; set; } = new();
public DataTranslation Translation { get; init; } = new();
public DataTranslation Translation { get; set; } = new();
public DataCoding Coding { get; init; } = new();
public DataCoding Coding { get; set; } = new();
public DataERI ERI { get; init; } = new();
public DataERI ERI { get; set; } = new();
public DataDocumentAnalysis DocumentAnalysis { get; init; } = new();
public DataDocumentAnalysis DocumentAnalysis { get; set; } = new();
/// <summary>
/// Gets the managed Batch Processing Assistant defaults.
/// </summary>
public DataBatchProcessing BatchProcessing { get; init; } = new(x => x.BatchProcessing);
public DataBatchProcessing BatchProcessing { get; set; } = new(x => x.BatchProcessing);
public DataMandatoryInformation MandatoryInformation { get; init; } = new();
public DataMandatoryInformation MandatoryInformation { get; set; } = new();
public DataTextSummarizer TextSummarizer { get; init; } = new();
public DataTextSummarizer TextSummarizer { get; set; } = new();
public DataSWOTAnalysis SWOTAnalysis { get; init; } = new();
public DataSWOTAnalysis SWOTAnalysis { get; set; } = new();
public DataTextContentCleaner TextContentCleaner { get; init; } = new();
public DataTextContentCleaner TextContentCleaner { get; set; } = new();
public DataAgentDataSourceSelection AgentDataSourceSelection { get; init; } = new(x => x.AgentDataSourceSelection);
public DataAgentDataSourceSelection AgentDataSourceSelection { get; set; } = new(x => x.AgentDataSourceSelection);
public DataAgentRetrievalContextValidation AgentRetrievalContextValidation { get; init; } = new(x => x.AgentRetrievalContextValidation);
public DataAgentRetrievalContextValidation AgentRetrievalContextValidation { get; set; } = new(x => x.AgentRetrievalContextValidation);
public DataAssistantPluginAudit AssistantPluginAudit { get; init; } = new(x => x.AssistantPluginAudit);
public DataAssistantPluginAudit AssistantPluginAudit { get; set; } = new(x => x.AssistantPluginAudit);
public DataAgenda Agenda { get; init; } = new();
public DataAgenda Agenda { get; set; } = new();
public DataGrammarSpelling GrammarSpelling { get; init; } = new();
public DataGrammarSpelling GrammarSpelling { get; set; } = new();
public DataRewriteImprove RewriteImprove { get; init; } = new();
public DataRewriteImprove RewriteImprove { get; set; } = new();
public DataPromptOptimizer PromptOptimizer { get; init; } = new();
public DataPromptOptimizer PromptOptimizer { get; set; } = new();
public DataEMail EMail { get; init; } = new();
public DataEMail EMail { get; set; } = new();
public DataSlideBuilder SlideBuilder { get; init; } = new(x => x.SlideBuilder);
public DataSlideBuilder SlideBuilder { get; set; } = new(x => x.SlideBuilder);
/// <summary>
/// Gets the managed Assistant Builder defaults.
/// </summary>
public DataAssistantBuilder AssistantBuilder { get; init; } = new(x => x.AssistantBuilder);
public DataAssistantBuilder AssistantBuilder { get; set; } = new(x => x.AssistantBuilder);
/// <summary>
/// Gets the managed Visual Briefing Assistant defaults.
/// </summary>
public DataVisualBriefing VisualBriefing { get; init; } = new(x => x.VisualBriefing);
public DataVisualBriefing VisualBriefing { get; set; } = new(x => x.VisualBriefing);
public DataLegalCheck LegalCheck { get; init; } = new();
public DataLegalCheck LegalCheck { get; set; } = new();
public DataSynonyms Synonyms { get; init; } = new();
public DataSynonyms Synonyms { get; set; } = new();
public DataMyTasks MyTasks { get; init; } = new();
public DataMyTasks MyTasks { get; set; } = new();
public DataJobPostings JobPostings { get; init; } = new();
public DataJobPostings JobPostings { get; set; } = new();
public DataBiasOfTheDay BiasOfTheDay { get; init; } = new();
public DataBiasOfTheDay BiasOfTheDay { get; set; } = new();
public DataI18N I18N { get; init; } = new();
public DataI18N I18N { get; set; } = new();
public DataTools Tools { get; init; } = new(x => x.Tools);
public DataTools Tools { get; set; } = new(x => x.Tools);
}
@@ -398,7 +398,7 @@ public sealed class DataApp(Expression<Func<Data, DataApp>>? configSelection = n
/// <summary>
/// Settings for indexing local data sources.
/// </summary>
public DataDataSourceIndexing DataSourceIndexing { get; init; } = new(x => x.App.DataSourceIndexing);
public DataDataSourceIndexing DataSourceIndexing { get; set; } = new(x => x.App.DataSourceIndexing);
/// <summary>
/// List of assistants that should be hidden from the UI.
@@ -5,11 +5,11 @@ namespace AIStudio.Settings.DataModel;
/// </summary>
public sealed class DataAssistantPluginEnterpriseApproval
{
public string PluginHash { get; init; } = string.Empty;
public string DisplayName { get; init; } = string.Empty;
public string Comment { get; init; } = string.Empty;
public string ApprovedBy { get; init; } = string.Empty;
public DateTimeOffset? ApprovedAtUtc { get; init; }
public string PluginHash { get; set; } = string.Empty;
public string DisplayName { get; set; } = string.Empty;
public string Comment { get; set; } = string.Empty;
public string ApprovedBy { get; set; } = string.Empty;
public DateTimeOffset? ApprovedAtUtc { get; set; }
/// <summary>
/// Whether the organization wants this assistant plugin to be enabled, instead of leaving that
@@ -21,7 +21,7 @@ public sealed class DataAssistantPluginEnterpriseApproval
/// colleague still has to switch it on. This field is how an organization makes that decision
/// instead.
/// </remarks>
public bool Activate { get; init; }
public bool Activate { get; set; }
/// <summary>
/// Whether the user may switch an assistant plugin the organization activated off again.
@@ -32,5 +32,5 @@ public sealed class DataAssistantPluginEnterpriseApproval
/// change. It has no meaning of its own while Activate is false, because there is nothing to
/// override then.
/// </remarks>
public bool AllowUserOverride { get; init; }
public bool AllowUserOverride { get; set; }
}
@@ -12,20 +12,20 @@ public sealed record DataDocumentAnalysisPolicy : ConfigurationBaseObject
private static readonly ILogger LOG = Program.LOGGER_FACTORY.CreateLogger<DataDocumentAnalysisPolicy>();
/// <inheritdoc />
public override string Id { get; init; } = string.Empty;
public override string Id { get; set; } = string.Empty;
/// <inheritdoc />
public override uint Num { get; init; }
public override uint Num { get; set; }
/// <inheritdoc />
public override string Name
{
get => this.PolicyName;
init => this.PolicyName = value;
set => this.PolicyName = value;
}
/// <inheritdoc />
public override bool IsEnterpriseConfiguration { get; init; }
public override bool IsEnterpriseConfiguration { get; set; }
/// <summary>
/// The name of the document analysis policy.
@@ -43,7 +43,7 @@ public sealed record DataDocumentAnalysisPolicy : ConfigurationBaseObject
public bool IsProtected { get; set; }
/// <inheritdoc />
public override Guid EnterpriseConfigurationPluginId { get; init; } = Guid.Empty;
public override Guid EnterpriseConfigurationPluginId { get; set; } = Guid.Empty;
/// <summary>
/// The rules for the document analysis policy.
@@ -5,25 +5,25 @@ public sealed record DataMandatoryInfoAcceptance
/// <summary>
/// The ID of the mandatory info that was accepted.
/// </summary>
public string InfoId { get; init; } = string.Empty;
public string InfoId { get; set; } = string.Empty;
/// <summary>
/// The accepted version string.
/// </summary>
public string AcceptedVersion { get; init; } = string.Empty;
public string AcceptedVersion { get; set; } = string.Empty;
/// <summary>
/// The accepted hash of the mandatory info content.
/// </summary>
public string AcceptedHash { get; init; } = string.Empty;
public string AcceptedHash { get; set; } = string.Empty;
/// <summary>
/// The UTC time of the acceptance.
/// </summary>
public DateTimeOffset AcceptedAtUtc { get; init; }
public DateTimeOffset AcceptedAtUtc { get; set; }
/// <summary>
/// The plugin that provided the accepted info at the time of acceptance.
/// </summary>
public Guid EnterpriseConfigurationPluginId { get; init; } = Guid.Empty;
public Guid EnterpriseConfigurationPluginId { get; set; } = Guid.Empty;
}
@@ -20,7 +20,7 @@ namespace AIStudio.Settings.DataModel;
/// <summary>
/// An external data source, accessed via an ERI server, cf. https://github.com/MindWorkAI/ERI.
/// </summary>
public readonly record struct DataSourceERI_V1 : IERIDataSource
public record struct DataSourceERI_V1: IERIDataSource
{
private static readonly ILogger<DataSourceERI_V1> LOGGER = Program.LOGGER_FACTORY.CreateLogger<DataSourceERI_V1>();
@@ -34,52 +34,52 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
}
/// <inheritdoc />
public uint Num { get; init; }
public uint Num { get; set; }
/// <inheritdoc />
public string Id { get; init; } = Guid.Empty.ToString();
public string Id { get; set; } = Guid.Empty.ToString();
/// <inheritdoc />
public string Name { get; init; } = string.Empty;
public string Name { get; set; } = string.Empty;
/// <inheritdoc />
public DataSourceType Type { get; init; } = DataSourceType.NONE;
public DataSourceType Type { get; set; } = DataSourceType.NONE;
/// <inheritdoc />
public string Hostname { get; init; } = string.Empty;
public string Hostname { get; set; } = string.Empty;
/// <inheritdoc />
public int Port { get; init; }
public int Port { get; set; }
/// <inheritdoc />
public AuthMethod AuthMethod { get; init; } = AuthMethod.NONE;
public AuthMethod AuthMethod { get; set; } = AuthMethod.NONE;
/// <inheritdoc />
public string Username { get; init; } = string.Empty;
public string Username { get; set; } = string.Empty;
/// <inheritdoc />
public DataSourceERIUsernamePasswordMode UsernamePasswordMode { get; init; } = DataSourceERIUsernamePasswordMode.USER_MANAGED;
public DataSourceERIUsernamePasswordMode UsernamePasswordMode { get; set; } = DataSourceERIUsernamePasswordMode.USER_MANAGED;
/// <inheritdoc />
public DataSourceSecurity SecurityPolicy { get; init; } = DataSourceSecurity.NOT_SPECIFIED;
public DataSourceSecurity SecurityPolicy { get; set; } = DataSourceSecurity.NOT_SPECIFIED;
/// <inheritdoc />
public OutboundDataRestriction OutboundDataRestriction { get; init; } = DataSourceOutboundDataExtensions.DEFAULT_OUTBOUND_DATA_RESTRICTION;
public OutboundDataRestriction OutboundDataRestriction { get; set; } = DataSourceOutboundDataExtensions.DEFAULT_OUTBOUND_DATA_RESTRICTION;
/// <inheritdoc />
public bool IsEnterpriseConfiguration { get; init; }
public bool IsEnterpriseConfiguration { get; set; }
/// <inheritdoc />
public Guid EnterpriseConfigurationPluginId { get; init; } = Guid.Empty;
public Guid EnterpriseConfigurationPluginId { get; set; } = Guid.Empty;
/// <inheritdoc />
public ERIVersion Version { get; init; } = ERIVersion.V1;
public ERIVersion Version { get; set; } = ERIVersion.V1;
/// <inheritdoc />
public string SelectedRetrievalId { get; init; } = string.Empty;
public string SelectedRetrievalId { get; set; } = string.Empty;
/// <inheritdoc />
public ushort MaxMatches { get; init; } = 10;
public ushort MaxMatches { get; set; } = 10;
/// <inheritdoc />
public async Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(IContent lastUserPrompt, ChatThread thread, CancellationToken token = default)
@@ -10,7 +10,7 @@ namespace AIStudio.Settings.DataModel;
/// <summary>
/// Represents a local directory as a data source.
/// </summary>
public readonly record struct DataSourceLocalDirectory : IInternalDataSource
public record struct DataSourceLocalDirectory: IInternalDataSource
{
// Selects what folder data sources indexed before they had file patterns, plus every other
// file whose content is readable text, e.g., a Terraform file or a script without an extension.
@@ -27,46 +27,46 @@ public readonly record struct DataSourceLocalDirectory : IInternalDataSource
}
/// <inheritdoc />
public uint Num { get; init; }
public uint Num { get; set; }
/// <inheritdoc />
public string Id { get; init; } = Guid.Empty.ToString();
public string Id { get; set; } = Guid.Empty.ToString();
/// <inheritdoc />
public string Name { get; init; } = string.Empty;
public string Name { get; set; } = string.Empty;
/// <summary>
/// The description of the data source. What kind of data does it contain?
/// What is the data source used for?
/// </summary>
public string Description { get; init; } = string.Empty;
public string Description { get; set; } = string.Empty;
/// <inheritdoc />
public DataSourceType Type { get; init; } = DataSourceType.NONE;
public DataSourceType Type { get; set; } = DataSourceType.NONE;
/// <inheritdoc />
public string EmbeddingId { get; init; } = Guid.Empty.ToString();
public string EmbeddingId { get; set; } = Guid.Empty.ToString();
/// <inheritdoc />
public int MaxChunkTokenLength { get; init; }
public int MaxChunkTokenLength { get; set; }
/// <inheritdoc />
public int ChunkOverlapTokenLength { get; init; } = DataSourceEmbeddingService.DEFAULT_CHUNK_OVERLAP_TOKEN_LENGTH;
public int ChunkOverlapTokenLength { get; set; } = DataSourceEmbeddingService.DEFAULT_CHUNK_OVERLAP_TOKEN_LENGTH;
/// <inheritdoc />
public ConfidenceLevel ConfidenceLevel { get; init; } = ConfidenceLevel.UNKNOWN;
public ConfidenceLevel ConfidenceLevel { get; set; } = ConfidenceLevel.UNKNOWN;
/// <inheritdoc />
public bool IsEnterpriseConfiguration { get; init; }
public bool IsEnterpriseConfiguration { get; set; }
/// <inheritdoc />
public Guid EnterpriseConfigurationPluginId { get; init; } = Guid.Empty;
public Guid EnterpriseConfigurationPluginId { get; set; } = Guid.Empty;
/// <inheritdoc />
public ushort MaxMatches { get; init; } = 10;
public ushort MaxMatches { get; set; } = 10;
/// <inheritdoc />
public OutboundDataRestriction OutboundDataRestriction { get; init; } = DataSourceOutboundDataExtensions.DEFAULT_OUTBOUND_DATA_RESTRICTION;
public OutboundDataRestriction OutboundDataRestriction { get; set; } = DataSourceOutboundDataExtensions.DEFAULT_OUTBOUND_DATA_RESTRICTION;
/// <inheritdoc />
public Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(IContent lastUserPrompt, ChatThread thread, CancellationToken token = default) =>
@@ -79,31 +79,31 @@ public readonly record struct DataSourceLocalDirectory : IInternalDataSource
/// <summary>
/// The path to the directory.
/// </summary>
public string Path { get; init; } = string.Empty;
public string Path { get; set; } = string.Empty;
/// <summary>
/// Semicolon-separated file-name patterns which decide which files below the path
/// are considered for indexing.
/// </summary>
public string FilePatterns { get; init; } = DEFAULT_FILE_PATTERNS;
public string FilePatterns { get; set; } = DEFAULT_FILE_PATTERNS;
/// <summary>
/// The files and folders below the path which are left out, even when a file pattern selects
/// them, cf. FileExclusions. Data sources from before this list existed get the default list,
/// so their build outputs and dependencies leave the index during the next run.
/// </summary>
public string ExcludePatterns { get; init; } = FileExclusions.DEFAULT_PATTERNS;
public string ExcludePatterns { get; set; } = FileExclusions.DEFAULT_PATTERNS;
/// <summary>
/// The largest file below the path which is indexed, in megabytes. A larger file which the
/// patterns select is not indexed, and the embedding page tells the user about it.
/// </summary>
public int MaxFileSizeMegabytes { get; init; } = FolderFileSelection.DEFAULT_MAX_FILE_SIZE_MEGABYTES;
public int MaxFileSizeMegabytes { get; set; } = FolderFileSelection.DEFAULT_MAX_FILE_SIZE_MEGABYTES;
/// <summary>
/// Whether files in folders below the path are considered for indexing.
/// </summary>
public bool IncludeSubdirectories { get; init; } = DEFAULT_INCLUDE_SUBDIRECTORIES;
public bool IncludeSubdirectories { get; set; } = DEFAULT_INCLUDE_SUBDIRECTORIES;
/// <summary>
/// Whether hidden files and the files in hidden folders below the path are considered for
@@ -114,7 +114,7 @@ public readonly record struct DataSourceLocalDirectory : IInternalDataSource
/// the hidden files it names, cf. FileNamePatterns.NamesHiddenFile. Hidden folders are entered
/// only while this is on.
/// </remarks>
public bool IncludeHiddenFilesAndFolders { get; init; } = DEFAULT_INCLUDE_HIDDEN_FILES_AND_FOLDERS;
public bool IncludeHiddenFilesAndFolders { get; set; } = DEFAULT_INCLUDE_HIDDEN_FILES_AND_FOLDERS;
/// <summary>
/// The patterns used at runtime. An invalid value can only come from malformed or hand-edited
@@ -8,53 +8,53 @@ namespace AIStudio.Settings.DataModel;
/// <summary>
/// Represents one local file as a data source.
/// </summary>
public readonly record struct DataSourceLocalFile : IInternalDataSource
public record struct DataSourceLocalFile: IInternalDataSource
{
public DataSourceLocalFile()
{
}
/// <inheritdoc />
public uint Num { get; init; }
public uint Num { get; set; }
/// <inheritdoc />
public string Id { get; init; } = Guid.Empty.ToString();
public string Id { get; set; } = Guid.Empty.ToString();
/// <inheritdoc />
public string Name { get; init; } = string.Empty;
public string Name { get; set; } = string.Empty;
/// <summary>
/// The description of the data source. What kind of data does it contain?
/// What is the data source used for?
/// </summary>
public string Description { get; init; } = string.Empty;
public string Description { get; set; } = string.Empty;
/// <inheritdoc />
public DataSourceType Type { get; init; } = DataSourceType.NONE;
public DataSourceType Type { get; set; } = DataSourceType.NONE;
/// <inheritdoc />
public string EmbeddingId { get; init; } = Guid.Empty.ToString();
public string EmbeddingId { get; set; } = Guid.Empty.ToString();
/// <inheritdoc />
public int MaxChunkTokenLength { get; init; }
public int MaxChunkTokenLength { get; set; }
/// <inheritdoc />
public int ChunkOverlapTokenLength { get; init; } = DataSourceEmbeddingService.DEFAULT_CHUNK_OVERLAP_TOKEN_LENGTH;
public int ChunkOverlapTokenLength { get; set; } = DataSourceEmbeddingService.DEFAULT_CHUNK_OVERLAP_TOKEN_LENGTH;
/// <inheritdoc />
public ConfidenceLevel ConfidenceLevel { get; init; } = ConfidenceLevel.UNKNOWN;
public ConfidenceLevel ConfidenceLevel { get; set; } = ConfidenceLevel.UNKNOWN;
/// <inheritdoc />
public bool IsEnterpriseConfiguration { get; init; }
public bool IsEnterpriseConfiguration { get; set; }
/// <inheritdoc />
public Guid EnterpriseConfigurationPluginId { get; init; } = Guid.Empty;
public Guid EnterpriseConfigurationPluginId { get; set; } = Guid.Empty;
/// <inheritdoc />
public ushort MaxMatches { get; init; } = 10;
public ushort MaxMatches { get; set; } = 10;
/// <inheritdoc />
public OutboundDataRestriction OutboundDataRestriction { get; init; } = DataSourceOutboundDataExtensions.DEFAULT_OUTBOUND_DATA_RESTRICTION;
public OutboundDataRestriction OutboundDataRestriction { get; set; } = DataSourceOutboundDataExtensions.DEFAULT_OUTBOUND_DATA_RESTRICTION;
/// <inheritdoc />
public Task<IReadOnlyList<IRetrievalContext>> RetrieveDataAsync(IContent lastUserPrompt, ChatThread thread, CancellationToken token = default) =>
@@ -67,5 +67,5 @@ public readonly record struct DataSourceLocalFile : IInternalDataSource
/// <summary>
/// The path to the file.
/// </summary>
public string FilePath { get; init; } = string.Empty;
public string FilePath { get; set; } = string.Empty;
}
@@ -13,70 +13,70 @@ namespace AIStudio.Settings.DataModel;
/// IDataSource: classic RAG, Semantic Search and the agents never see a mailbox. Only the mail
/// tools read from one.
/// </remarks>
public readonly record struct DataSourceMailbox : IIndexedDataSource, ISecretId
public record struct DataSourceMailbox: IIndexedDataSource, ISecretId
{
public DataSourceMailbox()
{
}
/// <inheritdoc />
public uint Num { get; init; }
public uint Num { get; set; }
/// <inheritdoc />
public string Id { get; init; } = Guid.Empty.ToString();
public string Id { get; set; } = Guid.Empty.ToString();
/// <inheritdoc />
public string Name { get; init; } = string.Empty;
public string Name { get; set; } = string.Empty;
/// <inheritdoc />
public DataSourceType Type { get; init; } = DataSourceType.MAILBOX;
public DataSourceType Type { get; set; } = DataSourceType.MAILBOX;
/// <inheritdoc />
public bool IsEnterpriseConfiguration { get; init; }
public bool IsEnterpriseConfiguration { get; set; }
/// <inheritdoc />
public Guid EnterpriseConfigurationPluginId { get; init; } = Guid.Empty;
public Guid EnterpriseConfigurationPluginId { get; set; } = Guid.Empty;
/// <inheritdoc />
public string EmbeddingId { get; init; } = Guid.Empty.ToString();
public string EmbeddingId { get; set; } = Guid.Empty.ToString();
/// <inheritdoc />
public int MaxChunkTokenLength { get; init; }
public int MaxChunkTokenLength { get; set; }
/// <inheritdoc />
public int ChunkOverlapTokenLength { get; init; } = DataSourceEmbeddingService.DEFAULT_CHUNK_OVERLAP_TOKEN_LENGTH;
public int ChunkOverlapTokenLength { get; set; } = DataSourceEmbeddingService.DEFAULT_CHUNK_OVERLAP_TOKEN_LENGTH;
/// <inheritdoc />
/// <remarks>
/// There is no default, the user has to choose one of the levels which IsAllowedMailboxConfidence
/// accepts. Until then, the level is NONE, and no provider may read the mailbox.
/// </remarks>
public ConfidenceLevel ConfidenceLevel { get; init; } = ConfidenceLevel.NONE;
public ConfidenceLevel ConfidenceLevel { get; set; } = ConfidenceLevel.NONE;
/// <summary>
/// The host name of the IMAP server, e.g., imap.example.org.
/// </summary>
public string Host { get; init; } = string.Empty;
public string Host { get; set; } = string.Empty;
/// <summary>
/// The port of the IMAP server. The default is the one for IMAP with TLS from the first byte on.
/// </summary>
public int Port { get; init; } = MailboxTransportSecurityExtensions.SSL_ON_CONNECT_PORT;
public int Port { get; set; } = MailboxTransportSecurityExtensions.SSL_ON_CONNECT_PORT;
/// <summary>
/// How the connection to the IMAP server is encrypted.
/// </summary>
public MailboxTransportSecurity TransportSecurity { get; init; } = MailboxTransportSecurity.SSL_ON_CONNECT;
public MailboxTransportSecurity TransportSecurity { get; set; } = MailboxTransportSecurity.SSL_ON_CONNECT;
/// <summary>
/// How AI Studio signs in to the IMAP server.
/// </summary>
public MailboxAuthMethod AuthMethod { get; init; } = MailboxAuthMethod.PASSWORD;
public MailboxAuthMethod AuthMethod { get; set; } = MailboxAuthMethod.PASSWORD;
/// <summary>
/// The username to sign in with, often the e-mail address.
/// </summary>
public string Username { get; init; } = string.Empty;
public string Username { get; set; } = string.Empty;
/// <summary>
/// The folder to which the synchronization and all mail tools are restricted, together with its subfolders.
@@ -86,7 +86,7 @@ public readonly record struct DataSourceMailbox : IIndexedDataSource, ISecretId
/// means the whole mailbox, apart from the trash and the junk folder. The sent mails and the
/// drafts may come along from outside of it, see IncludeSentAndDrafts.
/// </remarks>
public string RootFolder { get; init; } = string.Empty;
public string RootFolder { get; set; } = string.Empty;
/// <summary>
/// Whether the folders for sent mails and for drafts are synchronized as well, when they lie outside the root folder.
@@ -96,22 +96,22 @@ public readonly record struct DataSourceMailbox : IIndexedDataSource, ISecretId
/// marks as such count, without their subfolders. A mailbox stored before this setting existed
/// loads with it switched on, so that its next sync fetches them.
/// </remarks>
public bool IncludeSentAndDrafts { get; init; } = true;
public bool IncludeSentAndDrafts { get; set; } = true;
/// <summary>
/// How far back the index reaches. Flagged mails and drafts are indexed regardless of their age.
/// </summary>
public MailboxMaxAge MaxAge { get; init; } = MailboxMaxAge.LAST_12_MONTHS;
public MailboxMaxAge MaxAge { get; set; } = MailboxMaxAge.LAST_12_MONTHS;
/// <summary>
/// Whether the text of attached documents is indexed as well.
/// </summary>
public bool IndexAttachments { get; init; } = true;
public bool IndexAttachments { get; set; } = true;
/// <summary>
/// The size in megabytes up to which the text of an attachment is indexed. Of a larger one, only the name is.
/// </summary>
public int MaxAttachmentSizeMegabytes { get; init; } = 10;
public int MaxAttachmentSizeMegabytes { get; set; } = 10;
/// <summary>
/// Where a chat may still send data, once it has read from this mailbox.
@@ -119,12 +119,12 @@ public readonly record struct DataSourceMailbox : IIndexedDataSource, ISecretId
/// <remarks>
/// An organization may demand a stricter one, see DataMailboxes.MinimumOutboundDataRestriction.
/// </remarks>
public OutboundDataRestriction OutboundDataRestriction { get; init; } = OutboundDataRestriction.ONLY_CONFIGURED_SERVICES;
public OutboundDataRestriction OutboundDataRestriction { get; set; } = OutboundDataRestriction.ONLY_CONFIGURED_SERVICES;
/// <summary>
/// The maximum number of mails one search returns. Searched page by page, it is the size of a page.
/// </summary>
public ushort MaxMatches { get; init; } = 10;
public ushort MaxMatches { get; set; } = 10;
#region Implementation of ISecretId
@@ -13,12 +13,12 @@ public sealed class DataV1V3
/// The version of the settings file. Allows us to upgrade the settings
/// when a new version is available.
/// </summary>
public Version Version { get; init; } = Version.V3;
public Version Version { get; set; } = Version.V3;
/// <summary>
/// List of configured providers.
/// </summary>
public List<Provider> Providers { get; init; } = [];
public List<Provider> Providers { get; set; } = [];
/// <summary>
/// The next provider number to use.
@@ -6,22 +6,22 @@ public sealed class DataV4
/// The version of the settings file. Allows us to upgrade the settings
/// when a new version is available.
/// </summary>
public Version Version { get; init; }
public Version Version { get; set; }
/// <summary>
/// List of configured providers.
/// </summary>
public List<Provider> Providers { get; init; } = [];
public List<Provider> Providers { get; set; } = [];
/// <summary>
/// Settings concerning the LLM providers.
/// </summary>
public DataLLMProvidersV5 LLMProviders { get; init; } = new();
public DataLLMProvidersV5 LLMProviders { get; set; } = new();
/// <summary>
/// List of configured profiles.
/// </summary>
public List<Profile> Profiles { get; init; } = [];
public List<Profile> Profiles { get; set; } = [];
/// <summary>
/// The next provider number to use.
@@ -33,27 +33,27 @@ public sealed class DataV4
/// </summary>
public uint NextProfileNum { get; set; } = 1;
public DataApp App { get; init; } = new(x => x.App);
public DataApp App { get; set; } = new(x => x.App);
public DataChat Chat { get; init; } = new();
public DataChat Chat { get; set; } = new();
public DataWorkspace Workspace { get; init; } = new();
public DataWorkspace Workspace { get; set; } = new();
public DataIconFinder IconFinder { get; init; } = new();
public DataIconFinder IconFinder { get; set; } = new();
public DataTranslation Translation { get; init; } = new();
public DataTranslation Translation { get; set; } = new();
public DataCoding Coding { get; init; } = new();
public DataCoding Coding { get; set; } = new();
public DataTextSummarizer TextSummarizer { get; init; } = new();
public DataTextSummarizer TextSummarizer { get; set; } = new();
public DataTextContentCleaner TextContentCleaner { get; init; } = new();
public DataTextContentCleaner TextContentCleaner { get; set; } = new();
public DataAgenda Agenda { get; init; } = new();
public DataAgenda Agenda { get; set; } = new();
public DataGrammarSpelling GrammarSpelling { get; init; } = new();
public DataGrammarSpelling GrammarSpelling { get; set; } = new();
public DataRewriteImprove RewriteImprove { get; init; } = new();
public DataRewriteImprove RewriteImprove { get; set; } = new();
public DataEMail EMail { get; set; } = new();
@@ -8,27 +8,27 @@ public sealed class DataV5
/// The version of the settings file. Allows us to upgrade the settings
/// when a new version is available.
/// </summary>
public Version Version { get; init; } = Version.V5;
public Version Version { get; set; } = Version.V5;
/// <summary>
/// List of configured providers.
/// </summary>
public List<AIStudio.Settings.Provider> Providers { get; init; } = [];
public List<AIStudio.Settings.Provider> Providers { get; set; } = [];
/// <summary>
/// Settings concerning the LLM providers.
/// </summary>
public DataLLMProvidersV5 LLMProviders { get; init; } = new();
public DataLLMProvidersV5 LLMProviders { get; set; } = new();
/// <summary>
/// A collection of embedding providers configured.
/// </summary>
public List<EmbeddingProvider> EmbeddingProviders { get; init; } = [];
public List<EmbeddingProvider> EmbeddingProviders { get; set; } = [];
/// <summary>
/// A collection of speech providers configured.
/// </summary>
public List<TranscriptionProvider> TranscriptionProviders { get; init; } = [];
public List<TranscriptionProvider> TranscriptionProviders { get; set; } = [];
/// <summary>
/// A collection of data sources configured.
@@ -38,12 +38,12 @@ public sealed class DataV5
/// <summary>
/// List of configured profiles.
/// </summary>
public List<Profile> Profiles { get; init; } = [];
public List<Profile> Profiles { get; set; } = [];
/// <summary>
/// List of configured chat templates.
/// </summary>
public List<ChatTemplate> ChatTemplates { get; init; } = [];
public List<ChatTemplate> ChatTemplates { get; set; } = [];
/// <summary>
/// List of enabled plugins.
@@ -95,55 +95,55 @@ public sealed class DataV5
/// </summary>
public uint NextDocumentAnalysisPolicyNum { get; set; } = 1;
public DataApp App { get; init; } = new(x => x.App);
public DataApp App { get; set; } = new(x => x.App);
public DataChat Chat { get; init; } = new();
public DataChat Chat { get; set; } = new();
public DataWorkspace Workspace { get; init; } = new();
public DataWorkspace Workspace { get; set; } = new();
public DataIconFinder IconFinder { get; init; } = new();
public DataIconFinder IconFinder { get; set; } = new();
public DataTranslation Translation { get; init; } = new();
public DataTranslation Translation { get; set; } = new();
public DataCoding Coding { get; init; } = new();
public DataCoding Coding { get; set; } = new();
public DataERI ERI { get; init; } = new();
public DataERI ERI { get; set; } = new();
public DataDocumentAnalysis DocumentAnalysis { get; init; } = new();
public DataDocumentAnalysis DocumentAnalysis { get; set; } = new();
public DataMandatoryInformation MandatoryInformation { get; init; } = new();
public DataMandatoryInformation MandatoryInformation { get; set; } = new();
public DataTextSummarizer TextSummarizer { get; init; } = new();
public DataTextSummarizer TextSummarizer { get; set; } = new();
public DataTextContentCleaner TextContentCleaner { get; init; } = new();
public DataTextContentCleaner TextContentCleaner { get; set; } = new();
public DataAgentDataSourceSelection AgentDataSourceSelection { get; init; } = new();
public DataAgentDataSourceSelection AgentDataSourceSelection { get; set; } = new();
public DataAgentRetrievalContextValidation AgentRetrievalContextValidation { get; init; } = new();
public DataAgentRetrievalContextValidation AgentRetrievalContextValidation { get; set; } = new();
public DataAssistantPluginAudit AssistantPluginAudit { get; init; } = new(x => x.AssistantPluginAudit);
public DataAssistantPluginAudit AssistantPluginAudit { get; set; } = new(x => x.AssistantPluginAudit);
public DataAgenda Agenda { get; init; } = new();
public DataAgenda Agenda { get; set; } = new();
public DataGrammarSpelling GrammarSpelling { get; init; } = new();
public DataGrammarSpelling GrammarSpelling { get; set; } = new();
public DataRewriteImprove RewriteImprove { get; init; } = new();
public DataRewriteImprove RewriteImprove { get; set; } = new();
public DataPromptOptimizer PromptOptimizer { get; init; } = new();
public DataPromptOptimizer PromptOptimizer { get; set; } = new();
public DataEMail EMail { get; init; } = new();
public DataEMail EMail { get; set; } = new();
public DataSlideBuilder SlideBuilder { get; init; } = new();
public DataSlideBuilder SlideBuilder { get; set; } = new();
public DataLegalCheck LegalCheck { get; init; } = new();
public DataLegalCheck LegalCheck { get; set; } = new();
public DataSynonyms Synonyms { get; init; } = new();
public DataSynonyms Synonyms { get; set; } = new();
public DataMyTasks MyTasks { get; init; } = new();
public DataMyTasks MyTasks { get; set; } = new();
public DataJobPostings JobPostings { get; init; } = new();
public DataJobPostings JobPostings { get; set; } = new();
public DataBiasOfTheDay BiasOfTheDay { get; init; } = new();
public DataBiasOfTheDay BiasOfTheDay { get; set; } = new();
public DataI18N I18N { get; init; } = new();
public DataI18N I18N { get; set; } = new();
}