namespace GiteaMcp.Config; /// /// Gitea 后端连接配置,通过 env / appsettings 注入。 /// 生产环境敏感字段(AdminPat)必须通过 .env.shared 注入,不要写进代码。 /// public class GiteaOptions { public const string SectionName = "Gitea"; /// Gitea 根 URL,例如 https://git.zhengchentao.win(末尾无斜杠) public string BaseUrl { get; set; } = "https://git.zhengchentao.win"; /// /// Gitea Admin PAT(只读权限:read:repository / read:issue / read:user / read:organization / read:package)。 /// 生产环境从 env Gitea__AdminPat 注入,本地开发用 dotnet user-secrets。 /// 绝对不要 hardcode。 /// public string AdminPat { get; set; } = string.Empty; /// /// 黑名单:逗号分隔的 owner/repo,格式如 "zhengchen.tao/secret-repo,org/internal"。 /// 黑名单内的 repo 不会出现在任何 Tool 的返回值里。默认空(全开放)。 /// public string RepoBlacklist { get; set; } = string.Empty; /// list_repos 的默认 limit(不传时使用) public int DefaultLimit { get; set; } = 50; /// read_file 的默认最大字节数(1MB) public int MaxFileBytes { get; set; } = 1 * 1024 * 1024; }