# 第三方组件与资产声明

本文件记录 `moon-ort` 引用或随源码分发的第三方组件。ONNX Runtime v1.30.0 的 C API 头文件已放入 `native/vendor/onnxruntime/v1.30.0/`。共享库仍由调用方自行提供，不进入仓库。

| 组件 | 用途 | 许可证 | 分发策略 | 当前状态 |
|---|---|---|---|---|
| ONNX Runtime C API 头文件 v1.30.0 | 编译包内 C shim | MIT | 随源码分发头文件，不分发共享库 | 已纳入。来源与 SHA-256 见下表，与 `SOURCE.md` 一致 |
| ONNX Runtime 共享库 | 运行时动态加载 | MIT | 调用方提供匹配的 1.30.0 共享库 | 不随仓库或包分发 |

随包头文件来自 tag `v1.30.0`，上游仓库为 <https://github.com/microsoft/onnxruntime>。`onnxruntime_c_api.h` 以引号路径包含另外两份头文件，因此这三份一起放入仓库。

| 文件 | URL | SHA-256 |
|---|---|---|
| `onnxruntime_c_api.h` | https://raw.githubusercontent.com/microsoft/onnxruntime/v1.30.0/include/onnxruntime/core/session/onnxruntime_c_api.h | `e035e30c27e74c8c00e0f483e576e12b4067d17f12e9237fd6eff8b346c9b381` |
| `onnxruntime_error_code.h` | https://raw.githubusercontent.com/microsoft/onnxruntime/v1.30.0/include/onnxruntime/core/session/onnxruntime_error_code.h | `5ce3b054e798eced8d14f5b86e98692fd33470463f96194ce0700a2d53dd8721` |
| `onnxruntime_ep_c_api.h` | https://raw.githubusercontent.com/microsoft/onnxruntime/v1.30.0/include/onnxruntime/core/session/onnxruntime_ep_c_api.h | `e6c986c9e98583f8113b2c6bc3864814883b806d501cf24da4d239c45753e235` |

同目录 `LICENSE` 的上游 URL 是 https://raw.githubusercontent.com/microsoft/onnxruntime/v1.30.0/LICENSE ，SHA-256 为 `2f07c72751aed99790b8a4869cf2311df85a860b22ded05fa22803587a48922c`。复测命令写在 `native/vendor/onnxruntime/v1.30.0/SOURCE.md`。

微型 ONNX 测试模型由仓库中的脚本生成；再生方式、输入模型和校验值见 `testdata/README.md` 与 `testdata/SHA256SUMS`。

## 只在开发机上使用的 Python 工具

这些包不写入 `moon.mod`，不放进源码树，也不进入 MoonCakes 包。

| 项目 | 版本 | 链接 | 许可证 | 参考范围 |
|---|---|---|---|---|
| ONNX | `1.17.0`，由 `testdata/requirements.txt` 固定 | https://github.com/onnx/onnx | Apache-2.0 | `testdata/generate_models.py` 生成微型夹具 |
| NumPy | 由 `tools/reference/requirements.txt` 固定 | https://numpy.org | BSD-3-Clause | ONNX 生成依赖与输出对照工具 |
| protobuf | ONNX 的传递依赖 | https://github.com/protocolbuffers/protobuf | BSD-3-Clause | ONNX 模型序列化 |
| ONNX Runtime Python | `1.30.0`，由 `tools/reference/requirements.txt` 固定 | https://github.com/microsoft/onnxruntime | MIT | `tools/reference/ort_diff.py` 的开发期输出对照 |
