| 1 | using AgentForge.Abstractions; |
| 2 | using AgentForge.Plugin.Org.Web.Components; |
| 3 | using AgentForge.Plugin.Org.Web.Endpoints; |
| 4 | using AgentForge.Plugin.Org.Web.Pages; |
| 5 | using Microsoft.AspNetCore.Builder; |
| 6 | using Microsoft.Extensions.Configuration; |
| 7 | using Microsoft.Extensions.DependencyInjection; |
| 8 | |
| 9 | namespace AgentForge.Plugin.Org.Web; |
| 10 | |
| 11 | public sealed class OrgWebForgePlugin : IForgePlugin |
| 12 | { |
| 13 | public string Id => "org-web"; |
| 14 | |
| 15 | public string DisplayName => "Organizations and repository catalog"; |
| 16 | |
| 17 | public void ConfigureServices(IServiceCollection services, IConfiguration configuration) |
| 18 | { |
| 19 | services.AddScoped<IForgeMainPageCatalogBody, ForgeMainPageCatalogBody>(); |
| 20 | } |
| 21 | |
| 22 | public void MapEndpoints(WebApplication app) |
| 23 | { |
| 24 | var api = app.MapGroup("/api/v1"); |
| 25 | api.MapOrgEndpoints(); |
| 26 | api.MapOrgRepoGroupEndpoints(); |
| 27 | ForgeOrgViewEndpoints.Map(app); |
| 28 | } |
| 29 | |
| 30 | public void RegisterFeatures(ForgeFeatureRegistry registry) => registry.Add("orgs"); |
| 31 | |
| 32 | public void RegisterMcpTools(ForgeMcpToolRegistry registry) => |
| 33 | ForgeOrgMcpTools.Register(registry); |
| 34 | } |
| 35 | |
View only · write via MCP/CIDE