| 1 | namespace AgentForge.Abstractions; |
| 2 | |
| 3 | public enum ForgePluginDiscovery |
| 4 | { |
| 5 | Manual, |
| 6 | Auto, |
| 7 | } |
| 8 | |
| 9 | public sealed class ForgePluginManifest |
| 10 | { |
| 11 | public string ActiveBundle { get; set; } = "standard"; |
| 12 | |
| 13 | public ForgePluginHostSettings Host { get; set; } = new(); |
| 14 | |
| 15 | public ForgeImportManifestSettings Import { get; set; } = new(); |
| 16 | |
| 17 | public Dictionary<string, string[]> Bundles { get; set; } = new(StringComparer.OrdinalIgnoreCase) |
| 18 | { |
| 19 | ["standard"] = ["view-shell", "oauth-web", "oauth-github", "issue", "merge-request"], |
| 20 | ["minimal"] = [], |
| 21 | }; |
| 22 | |
| 23 | public Dictionary<string, ForgePluginEntry> Plugins { get; set; } = new(StringComparer.OrdinalIgnoreCase) |
| 24 | { |
| 25 | ["view-shell"] = new ForgePluginEntry { Assembly = "AgentForge.Plugin.ViewShell.dll" }, |
| 26 | }; |
| 27 | } |
| 28 | |
| 29 | public sealed class ForgePluginEntry |
| 30 | { |
| 31 | public string Assembly { get; set; } = ""; |
| 32 | |
| 33 | public string? Type { get; set; } |
| 34 | |
| 35 | /// <summary>Optional host override of <see cref="IForgePlugin.Tier"/> (FORGE-ADR-0031).</summary> |
| 36 | public string? Tier { get; set; } |
| 37 | |
| 38 | /// <summary>Import visibility override for this plugin (<c>inherit</c>, <c>forcePrivate</c>, <c>forcePublic</c>).</summary> |
| 39 | public string? VisibilityPolicy { get; set; } |
| 40 | |
| 41 | public bool? SyncVisibility { get; set; } |
| 42 | } |
| 43 | |
| 44 | public sealed class ForgeImportManifestSettings |
| 45 | { |
| 46 | /// <summary><c>forcePrivate</c>, <c>inherit</c>, or <c>forcePublic</c>. Source of truth: embedded/shipped TOML.</summary> |
| 47 | public string DefaultVisibilityPolicy { get; set; } = ""; |
| 48 | |
| 49 | public bool SyncVisibility { get; set; } |
| 50 | } |
| 51 | |
| 52 | /// <summary>Plugin host infra (<c>[plugins]</c> in forge.plugins.toml). Catalog entries remain <c>[plugins.{id}]</c>.</summary> |
| 53 | public sealed class ForgePluginHostSettings |
| 54 | { |
| 55 | public ForgePluginDiscovery? Discovery { get; set; } |
| 56 | |
| 57 | public ForgePluginAutoDiscoverySettings Auto { get; set; } = new(); |
| 58 | |
| 59 | /// <summary>Reserved for marketplace/registry (FORGE-ADR-0019).</summary> |
| 60 | public ForgePluginMarketplaceSettings Marketplace { get; set; } = new(); |
| 61 | } |
| 62 | |
| 63 | public sealed class ForgePluginAutoDiscoverySettings |
| 64 | { |
| 65 | public string[] Exclude { get; set; } = []; |
| 66 | |
| 67 | public bool RequireManifestEntry { get; set; } |
| 68 | } |
| 69 | |
| 70 | /// <summary>Placeholder for future registry/catalog config (<c>[plugins.marketplace]</c>).</summary> |
| 71 | public sealed class ForgePluginMarketplaceSettings |
| 72 | { |
| 73 | public string RegistryUrl { get; set; } = ""; |
| 74 | |
| 75 | public string CachePath { get; set; } = ""; |
| 76 | } |
| 77 | |