{"id":46869346,"url":"https://github.com/flowsynx/plugin-core","last_synced_at":"2026-03-10T19:34:34.541Z","repository":{"id":286596312,"uuid":"960512772","full_name":"flowsynx/plugin-core","owner":"flowsynx","description":"Plugin interface for create new plugin for FlowSynx engine","archived":false,"fork":false,"pushed_at":"2025-12-06T11:19:08.000Z","size":98,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-16T08:46:04.435Z","etag":null,"topics":["flowsynx","plugin-core","plugin-designer"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flowsynx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-04T15:04:23.000Z","updated_at":"2025-12-05T21:14:34.000Z","dependencies_parsed_at":"2025-04-07T11:34:50.062Z","dependency_job_id":"62900f63-03eb-4601-bfe6-476bd977d689","html_url":"https://github.com/flowsynx/plugin-core","commit_stats":null,"previous_names":["flowsynx/plugin-core","genoflow/plugin-core"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/flowsynx/plugin-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowsynx%2Fplugin-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowsynx%2Fplugin-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowsynx%2Fplugin-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowsynx%2Fplugin-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flowsynx","download_url":"https://codeload.github.com/flowsynx/plugin-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flowsynx%2Fplugin-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30350179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flowsynx","plugin-core","plugin-designer"],"created_at":"2026-03-10T19:34:34.020Z","updated_at":"2026-03-10T19:34:34.491Z","avatar_url":"https://github.com/flowsynx.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# FlowSynx PluginCore\n\n**FlowSynx PluginCore** is a lightweight, extensible plugin execution framework designed for modular application architecture. \nIt supports structured error handling, versioning, logging, and flexible plugin execution with parameter and specification support.\n\n---\n\n## ✨ Features\n\n- 🔌 **Plugin Interface**: Define reusable plugins with metadata, specifications, and execution logic.\n- ⚙️ **Execution Parameters**: Pass dynamic parameters and retrieve results using a standardized dictionary.\n- 📋 **Specifications Model**: Configure plugins with reusable specifications.\n- 🪵 **Plugin Logging**: Built-in logger interface with multiple severity levels.\n- 🧪 **Versioning System**: Compare and manage plugin versions (`Major.Minor.Patch`).\n- ❗ **Custom Error Handling**: Structured exceptions and codes via `FlowSynxException` and `ErrorMessage`.\n- 🏷️ **Required Attributes**: Decorate required specification fields with `RequiredMemberAttribute`.\n\n---\n\n## 🧩 Core Concepts\n\n### ✅ IPlugin Interface\n\nThe heart of the framework, the `IPlugin` interface, enforces a contract for plugin implementation:\n\n```csharp\npublic interface IPlugin\n{\n    PluginMetadata Metadata { get; }\n    PluginSpecifications? Specifications { get; set; }\n    Type SpecificationsType { get; }\n    Task Initialize(IPluginLogger logger);\n    Task\u003cobject?\u003e ExecuteAsync(PluginParameters parameters, CancellationToken cancellationToken);\n}\n```\n\n- Metadata: Descriptive data like name, description, author, etc.\n- Specifications: Custom configuration for plugin behavior.\n- SpecificationsType: Strongly typed representation of specifications (with validation).\n- Initialize: Called before execution, typically for setup or validation.\n- ExecuteAsync: The main execution method, receiving input parameters and returning results.\n\n\n## ⚙️ Plugin Metadata \u0026 Specifications\nA case-insensitive dictionary allowing plugins to define required and optional configuration options. Supports deep cloning and dynamic usage:\n\n```csharp\npublic class PluginSpecifications : Dictionary\u003cstring, object?\u003e, ICloneable\n```\n\nSupports `[RequiredMember]` attribute for validation:\n\n```csharp\n[RequiredMember]\npublic string RequiredSetting { get; set; }\n```\n\n### Create simple specifications\n```csharp\npublic class MyPluginSpecs : PluginSpecifications\n{\n    [RequiredMember]\n    public string RequiredSetting { get; set; } = \"default\";\n}\n```\n\n\n## 📦 Parameters and Cloning\n`PluginParameters` provides a flexible, case-insensitive dictionary to pass runtime data to plugins:\n\n```csharp\npublic class PluginParameters : Dictionary\u003cstring, object?\u003e, ICloneable\n```\nUse `.Clone()` for safe state reuse.\n\n\n## 🛠 Logging\nPlugins receive a logging abstraction to emit structured logs:\n```csharp\npublic interface IPluginLogger\n{\n    void Log(PluginLoggerLevel level, string message);\n}\n```\n\n### Log Levels\nUse the logger with severity levels or extension methods:\n```csharp\npublic enum PluginLoggerLevel\n{\n    Debug,\n    Information,\n    Warning,\n    Error\n}\n```\n\n#### Logger Extensions\n```csharp\nlogger.LogInfo(\"Started processing...\");\nlogger.LogError(\"An error occurred.\");\n```\n\n## 🧭 Categories Support\nTo organize plugins by type or domain, use the `PluginNamespace` enum:\n\n```csharp\npublic enum PluginCategory\n{\n    AI,\n    Api,\n    Authentication,\n    BusinessIntelligence,\n    Blockchain,\n    Cloud,\n    Communication,\n    Data,\n    Database,\n    DevOps,\n    Finance,\n    ML,\n    Monitoring,\n    Logging,\n    Networking,\n    ProjectWorkflow,\n    ResourcePlanning,\n    Security,\n    Storage,\n    Testing,\n    Web\n}\n```\n\n## 🧪 Example Plugin\n```csharp\npublic class SampleGreetingPlugin : IPlugin\n{\n    public PluginMetadata Metadata =\u003e new()\n    {\n        Id = Guid.Parse(\"fc58122d-6444-4c5b-ab3d-8cff62283a08\"),\n        Name = \"MyPlugin\",\n        Description = \"This is a test plugin.\",\n        Version = new PluginVersion(1, 0, 0),\n        Namespace = PluginNamespace.Api,\n        CompanyName = \"FlowSynx\",\n        Authors = new List\u003cstring\u003e { \"FlowSynx\" },\n        Copyright = \"© FlowSynx. All rights reserved.\",\n        Tags = new List\u003cstring\u003e() { \"MyCompany\", \"TestPlugin\" }\n    };\n\n    public PluginSpecifications? Specifications { get; set; }\n\n    public Type SpecificationsType =\u003e typeof(GreetingSpecs);\n\n    public Task Initialize(IPluginLogger logger)\n    {\n        logger.LogInfo(\"Initializing GreetingPlugin...\");\n        return Task.CompletedTask;\n    }\n\n    public Task\u003cobject?\u003e ExecuteAsync(PluginParameters parameters, CancellationToken cancellationToken)\n    {\n        string name = parameters.TryGetValue(\"name\", out var value) ? value?.ToString() ?? \"World\" : \"World\";\n        return Task.FromResult\u003cobject?\u003e($\"Hello, {name}!\");\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowsynx%2Fplugin-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowsynx%2Fplugin-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowsynx%2Fplugin-core/lists"}