Plugin Definition & Versioning

PluginDefinition and PluginVersion — the two root entities of the Plugins module that define a plugin's identity, capabilities, and release history.

Every plugin in the SCRIPE ecosystem starts with a PluginDefinition — the immutable identity record. Versions are snapshotted releases of that definition. Together they form the foundation that installations, API keys, and data stores build upon.

PluginDefinition Entity

Core entity representing a registered plugin in the platform. Contains metadata (name, description, icon), configuration (manifest, tier, scope), and developer association. Supports both Tier 1 (embedded .NET assembly) and Tier 2 (external HTTP service) plugin architectures.

FieldTypeDescription
IdGuidPrimary key
KeystringUnique machine-readable identifier for this plugin (e.g. "my-plugin")
NamestringEnglish display name
NameArstringArabic display name
DescriptionstringEnglish description of the plugin's purpose and capabilities
DescriptionArstringArabic description
TierPluginTierExecution tier: Tier1 (embedded .NET assembly) or Tier2 (external HTTP service)
StatusPluginStatusLifecycle status: Draft, Active, Deprecated (default: Draft)
ScopePluginScopeDeployment scope: Tenant or Platform (default: Tenant)
DeveloperTenantIdGuid?Tenant that authored this plugin (null = built-in platform plugin)
ManifestJsonstringJSON manifest declaring capabilities, permissions, and configuration schema (default: "{}")
IconUrlstring?URL to the plugin icon image
ScreenshotsJsonstring?JSON array of screenshot URL objects
ColorHueint?HSL hue value for auto-generated theme color
ColorChromadouble?HSL chroma value for auto-generated theme color
WorkspaceKeystring?Optional workspace scoping key
AssemblyNamestring?Tier 1 only — .NET assembly name to load
EntryPointTypestring?Tier 1 only — fully qualified type name of the plugin entry point
BaseUrlstring?Tier 2 only — base URL of the external plugin HTTP service
FrontendUrlstring?Tier 2 only — URL serving the plugin's iframe UI
WebhookUrlstring?Tier 2 only — URL for receiving platform webhook deliveries

Entity Source

Plugins.Domain/Entities/PluginDefinition.csC#
public class PluginDefinition : AuditableEntity<Guid>
{
    public string Key { get; set; } = string.Empty;
    public string Name { get; set; } = string.Empty;
    public string NameAr { get; set; } = string.Empty;
    public string Description { get; set; } = string.Empty;
    public string DescriptionAr { get; set; } = string.Empty;
    public PluginTier Tier { get; set; }
    public PluginStatus Status { get; set; } = PluginStatus.Draft;
    public PluginScope Scope { get; set; } = PluginScope.Tenant;
    public Guid? DeveloperTenantId { get; set; }
    public string ManifestJson { get; set; } = "{}";
    public string? IconUrl { get; set; }
    public string? ScreenshotsJson { get; set; }
    public int? ColorHue { get; set; }
    public double? ColorChroma { get; set; }
    public string? WorkspaceKey { get; set; }

    // Tier 1 specific
    public string? AssemblyName { get; set; }
    public string? EntryPointType { get; set; }

    // Tier 2 specific
    public string? BaseUrl { get; set; }
    public string? FrontendUrl { get; set; }
    public string? WebhookUrl { get; set; }

    public virtual ICollection<PluginVersion> Versions { get; set; } = [];
    public virtual ICollection<PluginInstallation> Installations { get; set; } = [];
}

PluginVersion Entity

Represents a specific release version of a PluginDefinition. Tracks version number, bilingual release notes, manifest snapshot, and whether this is the latest active version. Each installation pins to a specific version at install time.

FieldTypeDescription
IdGuidPrimary key
PluginDefinitionIdGuidFK to the parent PluginDefinition
VersionstringSemantic version string (e.g. "1.2.0")
ReleaseNotesstring?English release notes for this version
ReleaseNotesArstring?Arabic release notes for this version
ManifestJsonstringSnapshot of the manifest at the time this version was published (default: "{}")
IsLatestboolWhether this is the latest active version for its definition
ReleasedAtDateTimeUTC timestamp when this version was released

Version Lifecycle

When a new version is published, it becomes IsLatest = true and the previous version is demoted to IsLatest = false. Existing installations remain pinned to their installed version until an admin explicitly runs the upgrade command.

Draft Definition
first release
Version 1.0.0 (IsLatest)
new version published
Version 2.0.0 Published
v1 demoted
Version 1.0.0 (IsLatest=false)
still pinned
Existing Installs Pinned to v1
upgrade command
Admin Upgrades Install → v2