{"id":30064930,"url":"https://github.com/irodriguez13/sharpcore-kernel","last_synced_at":"2025-08-08T05:24:25.338Z","repository":{"id":304766410,"uuid":"1019847942","full_name":"IRodriguez13/SharpCore-Kernel","owner":"IRodriguez13","description":"WSL2 free SharpCore Microkernel  The modular and portable core of the SharpCore ecosystem. A microkernel-like runtime designed to handle dynamic instruction payloads through interchangeable communication protocols.  ","archived":false,"fork":false,"pushed_at":"2025-07-30T03:18:24.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"mainline","last_synced_at":"2025-07-30T05:42:05.816Z","etag":null,"topics":["grpc","ipc","json","linux-kernel","microkernel","microkernel-architecture","named-pipes","unix-socket","virtual-machine"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IRodriguez13.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}},"created_at":"2025-07-15T01:18:46.000Z","updated_at":"2025-07-30T03:18:27.000Z","dependencies_parsed_at":"2025-07-30T05:11:57.131Z","dependency_job_id":"d50a05ba-25dd-4c62-baa3-bfc36d72456b","html_url":"https://github.com/IRodriguez13/SharpCore-Kernel","commit_stats":null,"previous_names":["irodriguez13/sharpcore-kernel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IRodriguez13/SharpCore-Kernel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRodriguez13%2FSharpCore-Kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRodriguez13%2FSharpCore-Kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRodriguez13%2FSharpCore-Kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRodriguez13%2FSharpCore-Kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IRodriguez13","download_url":"https://codeload.github.com/IRodriguez13/SharpCore-Kernel/tar.gz/refs/heads/mainline","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IRodriguez13%2FSharpCore-Kernel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269367396,"owners_count":24405385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["grpc","ipc","json","linux-kernel","microkernel","microkernel-architecture","named-pipes","unix-socket","virtual-machine"],"created_at":"2025-08-08T05:24:24.163Z","updated_at":"2025-08-08T05:24:25.328Z","avatar_url":"https://github.com/IRodriguez13.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SharpCore Kernel Documentation Structure (English)\n\nThis document outlines the structure and purpose of the main files inside the **SharpCore Kernel** and its related modules: `Staging`, `Logging`, and `Core` logic. Each section explains the responsibility of each file or module to assist future contributors and users.\n\n---\n\n## 1. Kernel Core Modules\n\n### 📁 `Kernel_Init`\n\n#### `Program.cs`\n\n* **Role:** Entry point for standalone kernel execution.\n* **Description:** Launches the kernel manually without CLI or GUI.\n* **Use case:** Direct execution for testing or embedded systems.\n\n#### `SCKernel_init.cs`\n\n* **Role:** High-level kernel runner.\n* **Methods:**\n\n  * `Run(string payloadPath, string protocol, string adapter)`: Fetches the protocol handler, starts the bridge, sends JSON payload.\n\n---\n\n### 📁 `Kernel_Factory`\n\n#### `IProtocol.cs`\n\n* **Role:** Interface for  protocol creation.\n* **Implements:** CreateBridge();\n* **Implemented by:** ProtocolFactory.cs\n\n\n#### `ProtocolFactory.cs`\n\n* **Role:** Provides protocol handlers dynamically.\n* **Pattern:** Factory Pattern with `switch` or `map` lookup.\n* **Example protocols:** NamedPipe, gRPC, UnixSocket.\n\n---\n\n### 📁 `NamedPipes_utils`\n\n#### `IBridgeConnection.cs`\n\n* **Role:** Interface for any communication bridge.\n* **Methods:**\n\n  * `Start()` – Initiates the protocol listener.\n  * `Send(string)` – Sends a string to the connected target.\n\n#### `NamedPipeBridgeConnection.cs`\n\n* **Role:** Named Pipe implementation of `IBridgeConnection` and `IProtocol`.\n* **Responsibilities:**\n\n  * Handles IPC via named pipes.\n  * Deserializes payloads and manages staging.\n\n#### `PayloadMapping.cs`\n\n* **Role:** Optional helper to transform JSON to specific structures.\n* **Not always necessary** unless working with complex nested payloads.\n\n#### `FinishAdapterLayer.cs`\n\n* **Role:** Final entry point for mod adapters.\n* **Implements:** `IInstructionAdapter`\n* **Communicates with:** Java or other runtime.\n\n#### `Protocols/NamedPipeProtocol.cs`\n\n* **Role:** Named pipe handler.\n* **Returned by:** ProtocolFactory.\n* **Creates:** instances of `NamedPipeBridgeConnection`.\n\n---\n\n## 2. 📁 `Staging` Module\n\n#### `DTO/MSharpInstruction.cs`\n\n* **Role:** Payload structure.\n* **Properties:**\n\n  * `Tipo`, `Entidad`, and other mod-related fields.\n* **Serialized from JSON** inside the bridge.\n\n#### `StagingManager.cs`\n\n* **Role:** Core of the staging system.\n* **Functions:**\n\n  * `MSadd()`, `MScommit()`, `MSrevert()`\n* **Handles:** rollbacks, commits and validation flows.\n\n#### `IInstructionAdapter.cs`\n\n* **Role:** Interface to talk with external platforms.\n* **Implemented by:** FinishAdapterLayer (and others).\n\n#### `IInstructionValidator.cs`\n\n* **Role:** Validates the payload before staging.\n* **Called by:** Kernel before commit or revert.\n\n#### `InstructionProcessor.cs`\n\n* **Role:** Applies staging logic.\n* **Could call:** scripting runtimes, native APIs, etc.\n\n#### `ResultValidator.cs`\n\n* **Role:** Final check before committing.\n* **Optional, but can prevent runtime crashes.**\n\n---\n\n## 3. 📁 `Logging`\n\n#### `KernelLog.cs`\n\n* **Role:** Static logger used across core and CLI.\n* **Backend:** Serilog.\n* **Methods:**\n\n  * `Panic(string, Exception?)` – Logs to file and crashes.\n  * `Info(string)` – Info logs.\n  * `Warn(string)` – Warnings.\n  * `Debug(string)` – Verbose logs.\n\n#### 🔧 Suggested addition:\n\n* Expose `.Init(logPath)` method to dynamically set log directories depending on whether it's running from CLI or kernel.\n\n---\n\n#### License: GPL 3.0\n#### Contact: \n* `\u003civanrwcm25@gmail.com\u003e`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firodriguez13%2Fsharpcore-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firodriguez13%2Fsharpcore-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firodriguez13%2Fsharpcore-kernel/lists"}