| 1 | using Microsoft.AspNetCore.Builder; |
| 2 | using Microsoft.Extensions.Configuration; |
| 3 | using Microsoft.Extensions.DependencyInjection; |
| 4 | |
| 5 | namespace AgentForge.Abstractions; |
| 6 | |
| 7 | /// <summary>Forge host extension — routes, MCP tools, migrations.</summary> |
| 8 | public interface IForgePlugin |
| 9 | { |
| 10 | string Id { get; } |
| 11 | |
| 12 | string DisplayName { get; } |
| 13 | |
| 14 | /// <summary>Picker/analyzer tier: core | extended | zoo (FORGE-ADR-0031). Host TOML may override.</summary> |
| 15 | string Tier => "core"; |
| 16 | |
| 17 | void ConfigureServices(IServiceCollection services, IConfiguration configuration); |
| 18 | |
| 19 | void MapEndpoints(WebApplication app); |
| 20 | |
| 21 | /// <summary>Apply plugin-owned schema patches/migrations after kernel bootstrap.</summary> |
| 22 | void ApplyMigrations(IForgeMigrationContext context) { } |
| 23 | |
| 24 | /// <summary>Plugin MCP tools via <see cref="ForgeMcpToolRegistry.Add(ForgeMcpToolDescriptor, ForgeMcpToolHandler)"/>.</summary> |
| 25 | void RegisterMcpTools(ForgeMcpToolRegistry registry) { } |
| 26 | |
| 27 | /// <summary>Feature flags for agents (e.g. human_view).</summary> |
| 28 | void RegisterFeatures(ForgeFeatureRegistry registry) { } |
| 29 | |
| 30 | /// <summary>DOI slash/command catalog (FORGE-ADR-0015 §3).</summary> |
| 31 | void RegisterCommands(ForgeCommandRegistry registry) { } |
| 32 | |
| 33 | /// <summary>Human-layer repo tabs and view routes (FORGE-ADR-0015 §2).</summary> |
| 34 | void RegisterViewContributors(ForgeViewContributorRegistry registry) { } |
| 35 | |
| 36 | /// <summary>Login-page OAuth provider buttons (oauth-github, oauth-oidc, …).</summary> |
| 37 | void RegisterOAuthLoginContributors(ForgeOAuthLoginContributorRegistry registry) { } |
| 38 | |
| 39 | /// <summary>Repo home tab bodies (issues list, MR list) — FORGE-ADR-0015 Phase B.</summary> |
| 40 | void RegisterRepoTabBodies(ForgeRepoTabBodyRegistry registry) { } |
| 41 | } |
| 42 | |