SuperAPI AI 工具集

contribute-adapter

智能体与模型

查看项目

更新于 10-16 07:24

技能介绍

用途:为 NVIDIA NeMo Fabric 新增或实质性变更第一方适配器,聚焦仓库集成,包括打包、发现元数据、目录、CI 接线和验证。适配器契约语义、描述符设计、配置映射、生命周期与一致性证据应参考公开的 nemo-fabric-build-adapter 技能;消费方若只是选用已有适配器,应改用 nemo-fabric-integrate。

主要能力与用法:Python 适配器放在 adapters/python/<name>/,包含 LICENSE 软链 ../../../LICENSE、README.md、<name>.fabric-adapter.json、包与锁文件、源码入口及聚焦测试;TypeScript 包放在 adapters/typescript/<name>/ 并接入 npm workspace。每个 Python 叶子适配器提供小的 base 安装、针对可安装目标包的 harness extra、以及 full extra;仅 Hermes 为 source-only 例外并省略 harness;仅当导入 NVIDIA NeMo Relay Python API 时添加 relay extra。增加一个根 extra 委托到匹配叶子适配器与 harness extra,Hermes 根 extra 委托到裸适配器。保持 nemo-fabric-runtime 为精确版本的无条件根依赖。将包加入根 adapter-test 依赖组、[tool.uv.sources]、justfile 的 python_projects、适用目录与 CI 枚举,描述符置于 share/nemo-fabric/adapters/<name>。更新 examples/code_review_agent/ 与 examples/harbor/calculator/;若提供编码 harness,再更新 examples/harbor/swebench/。重新生成锁文件并检查根与叶子 wheel 元数据。

限制与验证:需保持描述符声明、实现、测试、文档、目录与打包元数据同步,从最窄的真实能力集开始。instructions.system 需同步 config.system_instruction_modes、规划行为、直接适配器验证与目标原生组合;新描述符必须声明确切的 replace 与 append 支持。证据需含打包入口点子进程测试、每项声明能力的精确描述符断言、无凭据 fixture 覆盖 plan/doctor/run、元数据变更时的 wheel 检查,以及确定性 CI;带凭据的真实目标测试保持可选。常用校验命令:uv sync --group adapter-tests;uv run --no-sync pytest tests/adapters/test_<name>*.py;just test-python;just lock-python && just wheels;just schemas;cargo fmt --all -- --check && just test-rust;just docs;uv run pre-commit run --all-files --show-diff-on-failure;git diff --check。