Skip to content

Conversation

@sfmskywalker
Copy link
Member

No description provided.

…pdate `TempElsaFeature` to use `ConfigureElsa`."

This reverts commit e8a875e.
…ell feature configuration, and remove obsolete `CShells` dependency
…ew CShells package sources in `NuGet.Config`.
Integrates CShells to enhance modularity and extensibility.

- Adds CShells related projects to the solution.
- Updates NuGet configuration to include CShells preview feed.
- Creates initial app settings for CShells configuration.
- Adds CShells.AspNetCore project reference.
- Implements CShells extensions in the program file.
- Creates shell feature classes in Elsa.Common.
- Creates shell feature classes in Elsa.Expressions.
- Creates shell feature classes in Elsa.Workflows.Core.
- Creates shell feature classes in Elsa.Workflows.Management.
- Creates shell feature classes in Elsa.Workflows.Runtime.
- Creates shell feature classes in Elsa module.
Consolidated updates to CShells including a new `ResolverPipelineBuilder` for customizable resolver strategy pipelines. Improved assembly scanning, error handling in web routing, and streamlined shell feature dependencies for better clarity and functionality.
Introduced a feature registration infrastructure with `IInstalledFeatureProvider` and related implementations. Added shell-based feature configurations such as caching, SAS tokens, workflows management, and a FastEndpoints integration module to support dynamic API registration.
Refactored `ShellEndpointRouteBuilder` to simplify initialization and support a combined shell/global route prefix. Enhanced `ShellEndpointRegistrationHandler` to include global route prefix logic and improved feature discovery using pre-resolved descriptors. Updated `Program.cs` for consistent middleware setup.
…roved dependency management and simplified implementation
… features

Standardized `ShellFeature` attributes across `ElsaFeature`, `WorkflowRuntimeFeature`, and `WorkflowManagementFeature` by adding display names, descriptions, and improving dependency declarations. Updated `ElsaFeature` to register `IInstalledFeatureProvider` for feature bridging.
Added project references to CShells.FastEndpoints and related projects in multiple csproj files. Updated FastEndpoints package versions in `Directory.Packages.props` for compatibility with .NET 8/9/10. Removed obsolete folder references from Elsa.Caching.csproj and refined the namespace in CShells.AspNetCore.Abstractions.
…ed authentication and authorization support
Introduce `IShellServiceExclusionProvider` and `IShellServiceExclusionRegistry` to manage excluded service types per-shell. Implement ASP.NET Core-specific providers for authentication and authorization to enable shell-specific configurations. Refactor `DefaultShellHost` to use the new exclusion registry for service inheritance filtering.
Renamed and unified methods for shell authentication and authorization and added a new combined method `WithAuthenticationAndAuthorization`. Enhanced `AddShells` to automatically register a default configuration provider if none is specified. Updated usage in Elsa.ModularServer to utilize the new API.
Introduce `ElsaFastEndpointsConfigurator` to customize FastEndpoints serialization and value parsing for Elsa workflows. Register this functionality through the new `ElsaFastEndpointsFeature`, which integrates with the shell's dependency injection system using an `IFastEndpointsConfigurator` interface.
Enables path routing for shells to allow proper routing within each shell.

Configures the ElsaFastEndpoints feature to depend on the FastEndpoints feature.
This ensures that FastEndpoints is properly configured before Elsa's FastEndpoints configurations are applied.

Registers activity types within the WorkflowManagementFeature.
This ensures activities are available for workflow construction and execution.
Introduced interfaces and handlers for shell activation (`IShellActivatedHandler`) and deactivation (`IShellDeactivatingHandler`) to manage shell lifecycles. Added `ShellStartupHostedService` to coordinate shell activation on startup and deactivation on shutdown. Updated notification system to support new shell lifecycle events and renamed existing notification records for consistency.
Adds base classes and implementations for EF Core persistence, including database provider configuration and shell feature integration.

This change introduces a generic approach to configuring EF Core persistence for various Elsa modules, promoting code reuse and simplifying the process of supporting different database providers.

It includes:

- Base classes for database provider configurators and shell features.
- Implementations for Sqlite, SQL Server, MySql, PostgreSql, and Oracle.
- Shell features for Alterations, Identity, Labels, Management (Workflow Definitions and Instances), Runtime, and Tenants modules.
Introduce a feature configuration system with support for binding, auto-configuration, and validation using DataAnnotations, FluentValidation, and composite patterns. Includes new validators, binding logic, and extensions to simplify configuration tasks while ensuring robustness and flexibility.
Introduced new shell features to configure MySql, Oracle, PostgreSql, and Sqlite persistence for workflow definitions and runtime data. Updated `appsettings.json` to replace individual Sqlite features with a unified `SqliteWorkflowPersistence`. Made minor code cleanup in `FastEndpointsFeature`.
Added `IServiceCollection` configuration for MySql, Oracle, PostgreSql, and Sqlite shell features to set up persistence services.
…eatures

Deleted DatabaseProviderConfigurator classes and restructured persistence shell features by integrating direct configuration logic for MySql, Oracle, PostgreSql, Sqlite, and SqlServer. Simplified configuration by inheriting from abstract shell feature base classes and removed redundant code.
…ersistence

- Integrated `Microsoft.Extensions.DependencyInjection` to shell features for Sqlite persistence.
- Updated `appsettings.json` and project references to include a new 'Resilience' feature.
- Changed `ICommitStateHandler` service registration in `WorkflowRuntimeFeature` to use an implementation.
- Implemented new `ResilienceShellFeature` class to manage services related to resilience features.
- Added scoped and singleton service registrations for resilience strategies, exception detection, and activity invocation.
- Configured expression options for resilience handling in workflows.
…g, CSharp, Distributed Runtime, ElsaScript, Flowchart, HTTP, JavaScript, Key-Value, and Labels
@greptile-apps
Copy link

greptile-apps bot commented Feb 9, 2026

Too many files changed for review. (120 files found, 100 file limit)

public static string GetDefaultWorkflowsDirectory()
{
var entryAssemblyDir = Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!;
var directory = Path.Combine(entryAssemblyDir, "Workflows");
…ne' may silently drop its earlier arguments'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@sfmskywalker sfmskywalker requested a review from Copilot February 9, 2026 20:21
/// <summary>
/// A factory that instantiates an <see cref="IDistributedLockProvider"/>.
/// </summary>
public Func<IServiceProvider, IDistributedLockProvider> DistributedLockProvider { get; set; } = _ => new FileDistributedSynchronizationProvider(new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, "App_Data", "locks")));
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates CShells-based modular “shell features” into Elsa modules, introducing a new modular server host and a set of shell-discoverable features for workflows, persistence providers, API endpoints, and supporting infrastructure (caching, identity, multitenancy, etc.).

Changes:

  • Added many IShellFeature implementations across modules (runtime, management, persistence providers, identity, HTTP, scheduling, etc.) and introduced a new Elsa.ModularServer.Web app for shell-based hosting.
  • Added a shell-backed IInstalledFeatureProvider implementation and updated API feature endpoints to use it.
  • Updated NuGet configuration and central package versions to include CShells packages and new FastEndpoints version pinning per target framework.

Reviewed changes

Copilot reviewed 119 out of 120 changed files in this pull request and generated 20 comments.

Show a summary per file
File Description
src/modules/Elsa/ShellFeatures/ElsaFeature.cs Adds root “Elsa” shell feature and registers shell-backed installed feature provider.
src/modules/Elsa/Elsa.csproj Formatting-only changes to package/project references.
src/modules/Elsa.Workflows.Runtime/ShellFeatures/WorkflowRuntimeFeature.cs Introduces shell-based workflow runtime DI setup (dispatching, stores, tasks, locking) + caching hooks.
src/modules/Elsa.Workflows.Runtime/ShellFeatures/CachingWorkflowRuntimeFeature.cs Adds runtime caching decorators and cache invalidation handlers.
src/modules/Elsa.Workflows.Runtime.Distributed/ShellFeatures/DistributedRuntimeFeature.cs Adds distributed runtime implementations for runtime/queue worker.
src/modules/Elsa.Workflows.Management/Stores/CachingWorkflowDefinitionStore.cs Tweaks default parameter value for name uniqueness check.
src/modules/Elsa.Workflows.Management/ShellFeatures/WorkflowManagementFeature.cs Adds shell-based management feature setup including stores, materializers, caching, and options.
src/modules/Elsa.Workflows.Management/ShellFeatures/WorkflowInstancesFeature.cs Adds shell feature for workflow instance storage.
src/modules/Elsa.Workflows.Management/ShellFeatures/WorkflowDefinitionsFeature.cs Adds shell feature for workflow definition storage.
src/modules/Elsa.Workflows.Management/ShellFeatures/CachingWorkflowDefinitionsFeature.cs Adds shell feature for workflow definition caching decorators + eviction handler.
src/modules/Elsa.Workflows.Core/ShellFeatures/WorkflowsFeature.cs Adds core workflows shell feature wiring plus (currently) Flowchart registrations.
src/modules/Elsa.Workflows.Core/ShellFeatures/FlowchartFeature.cs Adds opt-in Flowchart activity support via shell feature.
src/modules/Elsa.Workflows.Core/ShellFeatures/CommitStrategiesFeature.cs Adds commit-strategy registry population via shell feature.
src/modules/Elsa.Workflows.Core/Elsa.Workflows.Core.csproj Adds a commented-out CShells package reference (currently disabled).
src/modules/Elsa.Workflows.Api/ShellFeatures/WorkflowsApiFeature.cs Adds workflows API shell feature with FastEndpoints discovery + auth policy wiring.
src/modules/Elsa.Workflows.Api/ShellFeatures/RealTimeWorkflowUpdatesFeature.cs Adds SignalR + workflow progress broadcast handler as shell feature.
src/modules/Elsa.Workflows.Api/Endpoints/WorkflowDefinitions/Execute/PostEndpoint.cs Improves cancellation support when reading JSON request body.
src/modules/Elsa.Workflows.Api/Endpoints/Features/List/Endpoint.cs Switches installed-features listing endpoint to IInstalledFeatureProvider.
src/modules/Elsa.Workflows.Api/Endpoints/Features/Get/Endpoint.cs Switches installed-feature lookup endpoint to IInstalledFeatureProvider.
src/modules/Elsa.Workflows.Api/Elsa.Workflows.Api.csproj Adds CShells FastEndpoints abstractions reference.
src/modules/Elsa.WorkflowProviders.BlobStorage/ShellFeatures/BlobStorageFeature.cs Adds shell feature to load workflows from blob storage with format handlers.
src/modules/Elsa.WorkflowProviders.BlobStorage.ElsaScript/ShellFeatures/ElsaScriptBlobStorageFeature.cs Adds ElsaScript format handler for blob-storage provider.
src/modules/Elsa.Tenants/ShellFeatures/TenantsFeature.cs Adds tenant runtime feature wiring for multitenancy.
src/modules/Elsa.Tenants/ShellFeatures/TenantManagementFeature.cs Adds tenant management feature + memory store default.
src/modules/Elsa.Tenants/ShellFeatures/TenantManagementEndpointsFeature.cs Adds tenant endpoints feature placeholder (assembly scanning).
src/modules/Elsa.Tenants.AspNetCore/ShellFeatures/MultitenantHttpRoutingFeature.cs Adds multi-tenant HTTP routing feature for resolving tenants.
src/modules/Elsa.Scheduling/ShellFeatures/SchedulingFeature.cs Adds scheduling feature (scheduler, cron parser, background tasks, validators).
src/modules/Elsa.SasTokens/ShellFeatures/SasTokensFeature.cs Adds SAS token feature wiring using DataProtection.
src/modules/Elsa.Resilience/ShellFeatures/ResilienceShellFeature.cs Adds resilience feature and FastEndpoints discovery hook.
src/modules/Elsa.Persistence.EFCore/Modules/Tenants/ShellFeature.cs Adds EFCore tenant persistence base feature class.
src/modules/Elsa.Persistence.EFCore/Modules/Runtime/WorkflowRuntimePersistenceShellFeature.cs Adds EFCore runtime persistence base feature class.
src/modules/Elsa.Persistence.EFCore/Modules/Management/WorkflowInstancePersistenceShellFeature.cs Adds EFCore workflow instance persistence base feature class.
src/modules/Elsa.Persistence.EFCore/Modules/Management/WorkflowDefinitionPersistenceShellFeature.cs Adds EFCore workflow definition persistence base feature class.
src/modules/Elsa.Persistence.EFCore/Modules/Labels/ShellFeature.cs Adds EFCore label persistence base feature class.
src/modules/Elsa.Persistence.EFCore/Modules/Identity/ShellFeature.cs Adds EFCore identity persistence base feature class.
src/modules/Elsa.Persistence.EFCore/Modules/Alterations/ShellFeature.cs Adds EFCore alterations persistence base feature class.
src/modules/Elsa.Persistence.EFCore.Sqlite/ShellFeatures/Tenants/SqliteTenantPersistenceShellFeature.cs Adds Sqlite tenant persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Sqlite/ShellFeatures/SqliteWorkflowPersistenceShellFeature.cs Adds aggregate Sqlite workflow persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Sqlite/ShellFeatures/Runtime/SqliteWorkflowRuntimePersistenceShellFeature.cs Adds Sqlite workflow runtime persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Sqlite/ShellFeatures/Management/SqliteWorkflowInstancePersistenceShellFeature.cs Adds Sqlite workflow instance persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Sqlite/ShellFeatures/Management/SqliteWorkflowDefinitionPersistenceShellFeature.cs Adds Sqlite workflow definition persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Sqlite/ShellFeatures/Labels/SqliteLabelPersistenceShellFeature.cs Adds Sqlite label persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Sqlite/ShellFeatures/Identity/SqliteIdentityPersistenceShellFeature.cs Adds Sqlite identity persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Sqlite/ShellFeatures/Alterations/SqliteAlterationsPersistenceShellFeature.cs Adds Sqlite alterations persistence shell feature.
src/modules/Elsa.Persistence.EFCore.SqlServer/ShellFeatures/Tenants/SqlServerTenantPersistenceShellFeature.cs Adds SqlServer tenant persistence shell feature.
src/modules/Elsa.Persistence.EFCore.SqlServer/ShellFeatures/Runtime/SqlServerWorkflowRuntimePersistenceShellFeature.cs Adds SqlServer workflow runtime persistence shell feature.
src/modules/Elsa.Persistence.EFCore.SqlServer/ShellFeatures/Management/SqlServerWorkflowInstancePersistenceShellFeature.cs Adds SqlServer workflow instance persistence shell feature.
src/modules/Elsa.Persistence.EFCore.SqlServer/ShellFeatures/Management/SqlServerWorkflowDefinitionPersistenceShellFeature.cs Adds SqlServer workflow definition persistence shell feature.
src/modules/Elsa.Persistence.EFCore.SqlServer/ShellFeatures/Labels/SqlServerLabelPersistenceShellFeature.cs Adds SqlServer label persistence shell feature.
src/modules/Elsa.Persistence.EFCore.SqlServer/ShellFeatures/Identity/SqlServerIdentityPersistenceShellFeature.cs Adds SqlServer identity persistence shell feature.
src/modules/Elsa.Persistence.EFCore.SqlServer/ShellFeatures/Alterations/SqlServerAlterationsPersistenceShellFeature.cs Adds SqlServer alterations persistence shell feature.
src/modules/Elsa.Persistence.EFCore.PostgreSql/ShellFeatures/Tenants/PostgreSqlTenantPersistenceShellFeature.cs Adds PostgreSql tenant persistence shell feature.
src/modules/Elsa.Persistence.EFCore.PostgreSql/ShellFeatures/Runtime/PostgreSqlWorkflowRuntimePersistenceShellFeature.cs Adds PostgreSql workflow runtime persistence shell feature.
src/modules/Elsa.Persistence.EFCore.PostgreSql/ShellFeatures/PostgreSqlWorkflowPersistenceShellFeature.cs Adds aggregate PostgreSql workflow persistence shell feature.
src/modules/Elsa.Persistence.EFCore.PostgreSql/ShellFeatures/Management/PostgreSqlWorkflowInstancePersistenceShellFeature.cs Adds PostgreSql workflow instance persistence shell feature.
src/modules/Elsa.Persistence.EFCore.PostgreSql/ShellFeatures/Management/PostgreSqlWorkflowDefinitionPersistenceShellFeature.cs Adds PostgreSql workflow definition persistence shell feature.
src/modules/Elsa.Persistence.EFCore.PostgreSql/ShellFeatures/Labels/PostgreSqlLabelPersistenceShellFeature.cs Adds PostgreSql label persistence shell feature.
src/modules/Elsa.Persistence.EFCore.PostgreSql/ShellFeatures/Identity/PostgreSqlIdentityPersistenceShellFeature.cs Adds PostgreSql identity persistence shell feature.
src/modules/Elsa.Persistence.EFCore.PostgreSql/ShellFeatures/Alterations/PostgreSqlAlterationsPersistenceShellFeature.cs Adds PostgreSql alterations persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Oracle/ShellFeatures/Tenants/OracleTenantPersistenceShellFeature.cs Adds Oracle tenant persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Oracle/ShellFeatures/Runtime/OracleWorkflowRuntimePersistenceShellFeature.cs Adds Oracle workflow runtime persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Oracle/ShellFeatures/OracleWorkflowPersistenceShellFeature.cs Adds aggregate Oracle workflow persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Oracle/ShellFeatures/Management/OracleWorkflowInstancePersistenceShellFeature.cs Adds Oracle workflow instance persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Oracle/ShellFeatures/Management/OracleWorkflowDefinitionPersistenceShellFeature.cs Adds Oracle workflow definition persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Oracle/ShellFeatures/Labels/OracleLabelPersistenceShellFeature.cs Adds Oracle label persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Oracle/ShellFeatures/Identity/OracleIdentityPersistenceShellFeature.cs Adds Oracle identity persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Oracle/ShellFeatures/Alterations/OracleAlterationsPersistenceShellFeature.cs Adds Oracle alterations persistence shell feature.
src/modules/Elsa.Persistence.EFCore.MySql/ShellFeatures/Tenants/MySqlTenantPersistenceShellFeature.cs Adds MySql tenant persistence shell feature.
src/modules/Elsa.Persistence.EFCore.MySql/ShellFeatures/Runtime/MySqlWorkflowRuntimePersistenceShellFeature.cs Adds MySql workflow runtime persistence shell feature.
src/modules/Elsa.Persistence.EFCore.MySql/ShellFeatures/MySqlWorkflowPersistenceShellFeature.cs Adds aggregate MySql workflow persistence shell feature.
src/modules/Elsa.Persistence.EFCore.MySql/ShellFeatures/Management/MySqlWorkflowInstancePersistenceShellFeature.cs Adds MySql workflow instance persistence shell feature.
src/modules/Elsa.Persistence.EFCore.MySql/ShellFeatures/Management/MySqlWorkflowDefinitionPersistenceShellFeature.cs Adds MySql workflow definition persistence shell feature.
src/modules/Elsa.Persistence.EFCore.MySql/ShellFeatures/Labels/MySqlLabelPersistenceShellFeature.cs Adds MySql label persistence shell feature.
src/modules/Elsa.Persistence.EFCore.MySql/ShellFeatures/Identity/MySqlIdentityPersistenceShellFeature.cs Adds MySql identity persistence shell feature.
src/modules/Elsa.Persistence.EFCore.MySql/ShellFeatures/Alterations/MySqlAlterationsPersistenceShellFeature.cs Adds MySql alterations persistence shell feature.
src/modules/Elsa.Persistence.EFCore.Common/PersistenceShellFeatureBase.cs Introduces base class for persistence shell features (DbContext factory, migrations, stores).
src/modules/Elsa.Labels/ShellFeatures/LabelsFeature.cs Adds labels feature with default in-memory stores + handlers.
src/modules/Elsa.KeyValues/ShellFeatures/KeyValueFeature.cs Adds key-value store feature (default memory store).
src/modules/Elsa.Identity/ShellFeatures/IdentityFeature.cs Adds identity feature wiring, stores, providers, and auth-related services.
src/modules/Elsa.Identity/ShellFeatures/DefaultAuthenticationFeature.cs Adds default JWT + API key auth feature and policies.
src/modules/Elsa.Identity/Elsa.Identity.csproj Adds CShells FastEndpoints abstractions dependency.
src/modules/Elsa.Http/ShellFeatures/HttpJavaScriptFeature.cs Adds HTTP JavaScript integration feature.
src/modules/Elsa.Http/ShellFeatures/HttpFeature.cs Adds HTTP activities/services feature with routing, parsers, auth, clients, aliases.
src/modules/Elsa.Http/ShellFeatures/HttpCacheFeature.cs Adds HTTP workflow caching feature.
src/modules/Elsa.Hosting.Management/ShellFeatures/ClusteringFeature.cs Adds clustering/heartbeat feature.
src/modules/Elsa.Expressions/ShellFeatures/ExpressionsFeature.cs Adds expressions feature (evaluator + type registry).
src/modules/Elsa.Expressions.Python/ShellFeatures/PythonFeature.cs Adds Python expressions feature.
src/modules/Elsa.Expressions.Liquid/ShellFeatures/LiquidFeature.cs Adds Liquid expressions feature.
src/modules/Elsa.Expressions.JavaScript/ShellFeatures/JavaScriptFeature.cs Adds JavaScript expressions feature plus type definitions + hosted services.
src/modules/Elsa.Expressions.JavaScript.Libraries/ShellFeatures/JavaScriptLibraryFeatures.cs Adds Lodash/Moment JS library shell features.
src/modules/Elsa.Expressions.CSharp/ShellFeatures/CSharpFeature.cs Adds C# expressions feature.
src/modules/Elsa.Dsl.ElsaScript/ShellFeatures/ElsaScriptFeature.cs Adds ElsaScript DSL feature (parser/compiler/materializer).
src/modules/Elsa.Common/ShellHandlers/ActivateShellTenants.cs Adds shell activation/deactivation handler to activate/deactivate tenants.
src/modules/Elsa.Common/ShellFeatures/SystemClockFeature.cs Adds system clock feature.
src/modules/Elsa.Common/ShellFeatures/StringCompressionFeature.cs Adds string compression feature (codecs + resolver).
src/modules/Elsa.Common/ShellFeatures/MultitenancyFeature.cs Adds multitenancy runtime feature wiring and shell lifecycle hooks.
src/modules/Elsa.Common/ShellFeatures/MediatorFeature.cs Adds mediator feature wiring.
src/modules/Elsa.Common/ShellFeatures/DefaultFormattersFeature.cs Adds default formatter registrations.
src/modules/Elsa.Common/Extensions/DependencyInjectionExtensions.cs Migrates DI helpers into extension(IServiceCollection ...) form.
src/modules/Elsa.Common/Elsa.Common.csproj Adds a commented-out CShells package reference (currently disabled).
src/modules/Elsa.Caching/ShellFeatures/MemoryCacheFeature.cs Adds memory cache feature and cache manager/signaler.
src/modules/Elsa.Alterations/ShellFeatures/AlterationsFeature.cs Adds alterations feature with stores and dispatching defaults.
src/common/Elsa.Features/Services/ShellInstalledFeatureProvider.cs Adds CShells-backed provider mapping shell features to Elsa feature descriptors.
src/common/Elsa.Features/Services/InstalledFeatureProvider.cs Adds legacy adapter provider delegating to existing installed feature registry.
src/common/Elsa.Features/Elsa.Features.csproj Adds CShells.Abstractions package reference.
src/common/Elsa.Features/Contracts/IInstalledFeatureProvider.cs Adds new read-only installed-feature provider abstraction.
src/common/Elsa.Api.Common/ShellFeatures/ElsaFastEndpointsFeature.cs Adds shell feature to register Elsa FastEndpoints configurator.
src/common/Elsa.Api.Common/FastEndpointConfigurators/ElsaFastEndpointsConfigurator.cs Adds Elsa-specific FastEndpoints JSON serialization/config behavior.
src/common/Elsa.Api.Common/Elsa.Api.Common.csproj Adds CShells ASP.NET Core + FastEndpoints abstractions dependencies.
src/apps/Elsa.Server.Web/Program.cs Removes an obsolete comment line.
src/apps/Elsa.ModularServer.Web/appsettings.json Adds default modular-server configuration (shells, features, settings).
src/apps/Elsa.ModularServer.Web/appsettings.Example.json Adds example multi-shell configuration.
src/apps/Elsa.ModularServer.Web/appsettings.Development.json Adds development logging configuration.
src/apps/Elsa.ModularServer.Web/Properties/launchSettings.json Adds launch profiles for modular server.
src/apps/Elsa.ModularServer.Web/Program.cs Adds modular server bootstrapping via CShells ASP.NET Core integration.
src/apps/Elsa.ModularServer.Web/FodyWeavers.xml Adds ConfigureAwait.Fody weaver config.
src/apps/Elsa.ModularServer.Web/Elsa.ModularServer.Web.csproj Adds new modular server web project and references to Elsa modules + CShells packages.
NuGet.Config Adds CShells preview feed and package source mapping.
Elsa.sln Adds new modular server project to solution.
Directory.Packages.props Adds CShells package versions and pins FastEndpoints versions per TFM.

Comment on lines +114 to +119
.AddScoped<IWorkflowInstanceStore, MemoryWorkflowInstanceStore>()
.AddScoped<IWorkflowDefinitionStore, MemoryWorkflowDefinitionStore>()
.AddSingleton<IWorkflowDefinitionCacheManager, WorkflowDefinitionCacheManager>()
.Decorate<IWorkflowDefinitionStore, CachingWorkflowDefinitionStore>()
.Decorate<IWorkflowDefinitionService, CachingWorkflowDefinitionService>()
.AddNotificationHandler<EvictWorkflowDefinitionServiceCache>();
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WorkflowManagementFeature currently wires up workflow-definition caching (cache manager + store/service decorators) directly, but there is also a dedicated CachingWorkflowDefinitionsFeature that configures the same caching services. If both features are enabled, this will double-decorate services and can break DI. Move the caching registrations out of WorkflowManagementFeature into CachingWorkflowDefinitionsFeature (or make WorkflowManagementFeature depend on it and remove the standalone feature).

Copilot uses AI. Check for mistakes.

/// <summary>
/// Adds and configures the Mediator feature.
/// </summary>
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class implements IShellFeature but is missing the [ShellFeature] attribute used elsewhere to mark discoverable shell features and satisfy DependsOn references (e.g., features depending on "Mediator"). Add a [ShellFeature] attribute to ensure it is discovered and its ID/metadata are available.

Suggested change
/// </summary>
/// </summary>
[ShellFeature("Mediator")]

Copilot uses AI. Check for mistakes.
using Microsoft.Extensions.DependencyInjection;

namespace Elsa.Common.ShellFeatures;

Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class implements IShellFeature but is missing the [ShellFeature] attribute used elsewhere to mark discoverable shell features and satisfy DependsOn references (e.g., WorkflowsFeature depends on "Multitenancy"). Add a [ShellFeature] attribute (and optional metadata) to ensure consistent discovery and dependency resolution.

Suggested change
[ShellFeature("Multitenancy")]

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +29
/// <summary>
/// Gets or sets the lifetime of the <see cref="IDbContextFactory{TContext}"/>. Defaults to <see cref="ServiceLifetime.Singleton"/>.
/// </summary>
public ServiceLifetime DbContextFactoryLifetime { get; set; } = ServiceLifetime.Scoped;

Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The XML doc says DbContextFactoryLifetime defaults to ServiceLifetime.Singleton, but the property is initialized to ServiceLifetime.Scoped. Update the documentation or the default value so they match; otherwise this is misleading for consumers configuring persistence features.

Copilot uses AI. Check for mistakes.
Comment on lines +137 to +140
services.Configure<RecurringTaskOptions>(options =>
{
options.Schedule.ConfigureTask<TriggerBookmarkQueueRecurringTask>(TimeSpan.FromSeconds(10));
});
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature configures TriggerBookmarkQueueRecurringTask on a 10s schedule here, but later also registers the same recurring task with a 1-minute interval. Having two conflicting schedules for the same task makes the effective interval unclear and may cause unexpected runtime behavior. Consolidate to a single configuration path (either configure via RecurringTaskOptions or via AddRecurringTask(interval), but not both).

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +47
public static string GetDefaultWorkflowsDirectory()
{
var entryAssemblyDir = Path.GetDirectoryName(Assembly.GetEntryAssembly()!.Location)!;
var directory = Path.Combine(entryAssemblyDir, "Workflows");
return directory;
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetDefaultWorkflowsDirectory uses Assembly.GetEntryAssembly() with null-forgiving operators. GetEntryAssembly() can return null (e.g., in some test/hosting scenarios), which would throw at runtime. Consider using AppContext.BaseDirectory as a fallback (or handle the null case explicitly) to make the default path reliable.

Copilot uses AI. Check for mistakes.
Comment on lines +184 to +188
.AddScoped(WorkflowResumer)
.AddScoped<WorkflowResumer>()
.AddScoped(BookmarkQueueWorker)
.AddScoped<BookmarkQueueWorker>()
.AddScoped<ITriggerInvoker, TriggerInvoker>()
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are duplicate registrations for WorkflowResumer and BookmarkQueueWorker (both via factory delegates and via concrete types). This makes service resolution order-dependent and can easily lead to multiple instances being created per scope. Keep a single registration pattern for each service (either only the delegate-based registration or only the concrete registrations) and remove the duplicates.

Copilot uses AI. Check for mistakes.
Comment on lines +176 to +180
// Flowchart
services.AddSerializationOptionsConfigurator<FlowchartSerializationOptionConfigurator>();

// Register FlowchartOptions
services.AddOptions<FlowchartOptions>();
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WorkflowsFeature registers Flowchart serialization/options directly, but there is also a separate FlowchartFeature that does the same work. This duplicates registrations and prevents Flowchart support from being truly opt-in. Consider removing the Flowchart-related registrations from WorkflowsFeature and letting FlowchartFeature own them (with consumers depending on "Flowchart" when needed).

Copilot uses AI. Check for mistakes.
Comment on lines +58 to +61
{
// Configure options with defaults
services.Configure<IdentityTokenOptions>(options => { options.SigningKey = "A really long signing key that should be replaced with something more secure."; });
services.Configure<ApiKeyOptions>(ApiKeyDefaults.AuthenticationScheme, options =>
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IdentityTokenOptions.SigningKey is being set to a hard-coded default signing key. If a host application forgets to override this, tokens can be forged across deployments that use the default key. Avoid setting a usable default signing key in code; instead, require configuration (fail fast when missing) or generate/load it securely (e.g., from user secrets / environment / KeyVault) and document the requirement.

Copilot uses AI. Check for mistakes.
Comment on lines 14 to 16
<ItemGroup>
<!-- <PackageReference Include="CShells.Abstractions" />-->
<PackageReference Include="Humanizer.Core" />
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a commented-out PackageReference to CShells.Abstractions left in the project file. Keeping commented package references tends to become stale and obscures the actual dependency graph (especially since CShells is now centrally versioned). Remove the commented line if it’s not needed, or re-enable it if this project should directly reference the package.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant