SuperAPI AI 工具集

evaluate-new-port

编程与开发

查看项目

更新于 10-16 06:47

技能介绍

用途:本地审计 vcpkg 端口,适合评审新增或大幅更新的端口、核对声明许可证与实际安装内容、排查未在 vcpkg.json 中建模的第三方捆绑代码或可选依赖,以及在真实本地安装后查找打包与评审问题。

主要能力:读取 ports/{port-name}/vcpkg.json 与 portfile.cmake,提取许可证(含按特性声明的许可证与显式 null)、homepage、features、dependencies、supports,以及构建辅助函数、特性到构建选项映射、可选组件开关、平台守卫和捆绑/补丁/裁剪逻辑;执行干净安装后检查 buildtrees/{port-name}/src 源码树与 packages/{port-name}{target-triplet} 安装内容;识别 third_party、vendor、extern、deps、subprojects 等捆绑目录,以及 find_package、option、WITH/ENABLE_ 等未受控可选依赖;对比 share/{port-name}/copyright 与声明的许可证元数据;最后输出含 Port Summary、Declared Metadata、Build Invocation Summary、Install Result、Vendored Dependencies、Optional Dependency Risks、License / Installed Content Findings、Other Port Review Suggestions、Recommended Follow-ups 的 markdown 报告。

必要用法:从仓库根目录运行仓库内 vcpkg。清理状态用 .\vcpkg.exe x-ci-clean(Windows)或 ./vcpkg x-ci-clean(Linux/macOS);安装用 .\vcpkg.exe install {port-name} 或 ./vcpkg install {port-name}。若安装提示当前平台或 triplet 不受支持,应停止审计并按 supports、平台守卫或致命错误文本建议更合适平台。若命中二进制缓存需强制重建,直接卸载并重装该端口,而不是 x-ci-clean 后使用 install --no-binarycaching。

限制:仅基于实际安装目录得出结论,审计须基于本次运行创建的包目录;报告模板见 references/report-template.md;其他平台与定价信息暂未提供。