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.
| Field | Type | Description |
|---|---|---|
| Id | Guid | Primary key |
| Key | string | Unique machine-readable identifier for this plugin (e.g. "my-plugin") |
| Name | string | English display name |
| NameAr | string | Arabic display name |
| Description | string | English description of the plugin's purpose and capabilities |
| DescriptionAr | string | Arabic description |
| Tier | PluginTier | Execution tier: Tier1 (embedded .NET assembly) or Tier2 (external HTTP service) |
| Status | PluginStatus | Lifecycle status: Draft, Active, Deprecated (default: Draft) |
| Scope | PluginScope | Deployment scope: Tenant or Platform (default: Tenant) |
| DeveloperTenantId | Guid? | Tenant that authored this plugin (null = built-in platform plugin) |
| ManifestJson | string | JSON manifest declaring capabilities, permissions, and configuration schema (default: "{}") |
| IconUrl | string? | URL to the plugin icon image |
| ScreenshotsJson | string? | JSON array of screenshot URL objects |
| ColorHue | int? | HSL hue value for auto-generated theme color |
| ColorChroma | double? | HSL chroma value for auto-generated theme color |
| WorkspaceKey | string? | Optional workspace scoping key |
| AssemblyName | string? | Tier 1 only — .NET assembly name to load |
| EntryPointType | string? | Tier 1 only — fully qualified type name of the plugin entry point |
| BaseUrl | string? | Tier 2 only — base URL of the external plugin HTTP service |
| FrontendUrl | string? | Tier 2 only — URL serving the plugin's iframe UI |
| WebhookUrl | string? | Tier 2 only — URL for receiving platform webhook deliveries |
Entity Source
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.
| Field | Type | Description |
|---|---|---|
| Id | Guid | Primary key |
| PluginDefinitionId | Guid | FK to the parent PluginDefinition |
| Version | string | Semantic version string (e.g. "1.2.0") |
| ReleaseNotes | string? | English release notes for this version |
| ReleaseNotesAr | string? | Arabic release notes for this version |
| ManifestJson | string | Snapshot of the manifest at the time this version was published (default: "{}") |
| IsLatest | bool | Whether this is the latest active version for its definition |
| ReleasedAt | DateTime | UTC 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.