Skip to content

refactor(host)!: Rename Agent API namespace to board#59

Merged
qzhhhi merged 1 commit into
mainfrom
dev/rename
Jun 21, 2026
Merged

refactor(host)!: Rename Agent API namespace to board#59
qzhhhi merged 1 commit into
mainfrom
dev/rename

Conversation

@qzhhhi

@qzhhhi qzhhhi commented Jun 21, 2026

Copy link
Copy Markdown
Member
  • Move public SDK headers from librmcs/agent to librmcs/board
  • Rename librmcs::agent to librmcs::board across host code
  • Update internal includes to use the new board API

BREAKING CHANGE: Public host SDK includes and namespace references now use board instead of agent.

摘要

该拉取请求将主机代码库中的Agent API命名空间重命名为Board,包括移动公开SDK头文件位置和更新所有相关的命名空间引用。这是一个影响公开主机SDK接口和命名空间的破坏性变更。

受影响的主要文件

公开SDK头文件迁移

  • host/include/librmcs/board/c_board.hppCBoard类从librmcs::agent命名空间迁移至librmcs::board,同时更新头文件包含从librmcs/agent/common.hpp改为librmcs/board/common.hpp

  • host/include/librmcs/board/common.hppAdvancedOptions结构体和bind_advanced_options()模板函数从librmcs::agent迁移至librmcs::board命名空间

  • host/include/librmcs/board/rmcs_board_lite.hppRmcsBoardLite类及其嵌套类型(CallbackPacketBuilder)从librmcs::agent迁移至librmcs::board命名空间

  • host/include/librmcs/board/rmcs_board_pro.hppRmcsBoardPro类从librmcs::agent迁移至librmcs::board命名空间

内部实现文件更新

  • host/include/librmcs/protocol/handler.hppHandler构造函数参数类型从const agent::AdvancedOptions&更改为const board::AdvancedOptions&

  • host/src/protocol/handler.cpp:同步更新构造函数实现中的AdvancedOptions参数引用

  • host/src/transport/transport.hpp:类型别名ConnectionOptionsagent::AdvancedOptions改为board::AdvancedOptions

破坏性变更

所有引用以下类型或命名空间的客户端代码需要进行更新:

  • librmcs::agent::CBoardlibrmcs::board::CBoard
  • librmcs::agent::AdvancedOptionslibrmcs::board::AdvancedOptions
  • librmcs::agent::RmcsBoardLitelibrmcs::board::RmcsBoardLite
  • librmcs::agent::RmcsBoardProlibrmcs::board::RmcsBoardPro
  • 所有使用agent::AdvancedOptions作为函数参数的代码需要更新为board::AdvancedOptions

- Move public SDK headers from librmcs/agent to librmcs/board
- Rename librmcs::agent to librmcs::board across host code
- Update internal includes to use the new board API

BREAKING CHANGE: Public host SDK includes and namespace references now use board instead of agent.
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cff2ff7b-60cc-4e04-8b02-8599e5dd361e

📥 Commits

Reviewing files that changed from the base of the PR and between 2bd790a and f5ee9e9.

📒 Files selected for processing (7)
  • host/include/librmcs/board/c_board.hpp
  • host/include/librmcs/board/common.hpp
  • host/include/librmcs/board/rmcs_board_lite.hpp
  • host/include/librmcs/board/rmcs_board_pro.hpp
  • host/include/librmcs/protocol/handler.hpp
  • host/src/protocol/handler.cpp
  • host/src/transport/transport.hpp

Walkthrough

librmcs::agent 命名空间在所有 board 相关头文件(common.hppc_board.hpprmcs_board_lite.hpprmcs_board_pro.hpp)中统一重命名为 librmcs::board,并同步更新协议处理器(handler.hpp/handler.cpp)及传输层(transport.hpp)中对 AdvancedOptions 类型的引用,使其从 agent:: 切换为 board::

Changes

命名空间重命名:librmcs::agentlibrmcs::board

Layer / File(s) Summary
Board 公共头文件命名空间迁移
host/include/librmcs/board/common.hpp, host/include/librmcs/board/c_board.hpp, host/include/librmcs/board/rmcs_board_lite.hpp, host/include/librmcs/board/rmcs_board_pro.hpp
将四个 board 头文件的命名空间封装从 librmcs::agent 改为 librmcs::board,include 依赖由 librmcs/agent/common.hpp 替换为 librmcs/board/common.hpp,并更新文件首尾的命名空间块与关闭注释。AdvancedOptionsbind_advanced_optionsCBoardRmcsBoardLiteRmcsBoardPro 等公开类型的完全限定名随之变更。
协议处理器与传输层类型更新
host/include/librmcs/protocol/handler.hpp, host/src/protocol/handler.cpp, host/src/transport/transport.hpp
Handler 构造函数参数 options 的类型由 agent::AdvancedOptions 改为 board::AdvancedOptions(声明与实现同步更新),传输层 ConnectionOptions 的类型别名来源也由 agent::AdvancedOptions 更新为 board::AdvancedOptions

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Alliance-Algorithm/librmcs#23:同样修改了 handler.hpp/handler.cppHandler 构造函数的 API,新增了 serial_filter 参数用于 USB 设备过滤。
  • Alliance-Algorithm/librmcs#36:涉及相同的 AdvancedOptionsHandler 和 USB 传输层中的传递链路,新增了 dangerously_skip_version_checks 选项。
  • Alliance-Algorithm/librmcs#56:直接涉及 Handler/transportAdvancedOptions 类型的使用,与本 PR 将该类型从 agent:: 迁移至 board:: 的改动高度重叠。

Poem

🐇 小兔挥动小爪子,
agent 的旧牌子,
换成闪亮 board 新名字。
命名空间齐刷刷,
四个文件一起搬家!
✨ 改名虽小志气大,
代码整洁乐开花~

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Pull request title accurately describes the main change: renaming the Agent API namespace to board throughout the host codebase, which is the primary objective.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev/rename

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qzhhhi qzhhhi merged commit f707518 into main Jun 21, 2026
5 checks passed
@qzhhhi qzhhhi deleted the dev/rename branch June 21, 2026 04:30
@github-project-automation github-project-automation Bot moved this from Todo to Done in RMCS Slave SDK Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant