firmwareloop 0.0.9__tar.gz → 0.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/PKG-INFO +69 -18
  2. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/README.md +68 -17
  3. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/firmwareloop.egg-info/PKG-INFO +69 -18
  4. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/pyproject.toml +1 -1
  5. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/__init__.py +1 -1
  6. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/fw_mcp_server.py +6 -6
  7. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/setup-agent-mcp.ps1 +24 -3
  8. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/LICENSE +0 -0
  9. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/firmwareloop.egg-info/SOURCES.txt +0 -0
  10. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/firmwareloop.egg-info/dependency_links.txt +0 -0
  11. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/firmwareloop.egg-info/entry_points.txt +0 -0
  12. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/firmwareloop.egg-info/requires.txt +0 -0
  13. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/firmwareloop.egg-info/top_level.txt +0 -0
  14. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/setup.cfg +0 -0
  15. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/acceptance-scenario.ps1 +0 -0
  16. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/build.ps1 +0 -0
  17. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/can.ps1 +0 -0
  18. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/check-qoder-mcp.ps1 +0 -0
  19. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/common/build-backends.psm1 +0 -0
  20. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/common/fw.psm1 +0 -0
  21. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/common/uart_probe.py +0 -0
  22. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/doctor.ps1 +0 -0
  23. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/flash.ps1 +0 -0
  24. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/instrument_cli.py +0 -0
  25. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/lib/__init__.py +0 -0
  26. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/lib/instruments.py +0 -0
  27. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/logic_capture.ps1 +0 -0
  28. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/logic_decode.ps1 +0 -0
  29. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/reset.ps1 +0 -0
  30. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/test-backends.ps1 +0 -0
  31. {firmwareloop-0.0.9 → firmwareloop-0.0.10}/tools/test.ps1 +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: firmwareloop
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: AI Agent Firmware Development and Lab Automation Platform (Dual-Tier MCP Server)
5
5
  Author-email: WeilinZhang <19523330249@163.com>
6
6
  License: MIT
@@ -104,41 +104,92 @@ FirmwareLoop 为 AI Agent 暴露了开箱即用的 MCP 工具,涵盖 5 大核
104
104
 
105
105
  ---
106
106
 
107
- ## 双层 MCP 架构与接入模式
107
+ ## 极速起步(3 步搞定)
108
108
 
109
- FirmwareLoop 提供开箱即用的**双层 MCP 架构**:
110
- 1. **上层工作流 MCP (`fwloop` / `firmwareloop`)**:面向工程构建(Keil/CMake/Make 等 7 大后端)、pytest 12项自动化 HIL 测试、安全测量与全链路验收。
111
- 2. **下层硬件驱动 MCP (`agentic-hil`)**:面向物理探针(ST-LINK / J-Link)、JTAG/SWD 固件刷写、芯片复位、串口会话与符号级断点调试。
109
+ 无论你使用 **Google Antigravity**、**Claude Code**、**Qoder** 还是 **Cursor**,只需以下 3 步即可开始 AI 驱动的单片机自动化开发:
112
110
 
113
- ### 接入模式一:电脑全局安装(首选推荐,一次安装,所有工程通用)
111
+ ### 第一步:全局安装核心 CLI 工具
112
+
113
+ 从 PyPI 官方源安装(全电脑仅需执行一次):
114
114
 
115
- 1. 全局安装 CLI 工具到系统(直接从 PyPI 官方源下载):
116
115
  ```bash
117
116
  uv tool install firmwareloop
118
117
  uv tool install agentic-hil
119
118
  ```
120
119
 
121
- 2. 全局注册到 Claude Code CLI(全局级,一次配置全电脑工程通用):
120
+ ---
121
+
122
+ ### 第二步:全局注册到各大 AI Agent
123
+
124
+ 按你日常使用的 Agent 执行对应的注册命令(全电脑仅需配置一次):
125
+
126
+ 1. **Google Antigravity / Gemini CLI(全自动配置,推荐)**:
127
+ ```bash
128
+ fwloop setup
129
+ ```
130
+ > **说明**:该命令会自动将双层 MCP 写入 Antigravity 全局配置(`~/.gemini/config/mcp_config.json`),并全自动将全套技能包同步到全局 Skill 目录。
131
+
132
+ 2. **Claude Code CLI**:
122
133
  ```bash
123
134
  claude mcp add --scope user fwloop -- fwloop
124
135
  claude mcp add --scope user agentic-hil -- agentic-hil mcp-stdio
125
136
  ```
126
137
 
127
- 3. 注册到 Qoder IDE(支持以下三种方式):
128
- - **GUI 方式**:按快捷键 `Ctrl + Shift + ,`(Mac: `Cmd + Shift + ,`)进入「MCP」->「我的服务」-> 点击「+ 添加」粘贴配置。
129
- - **工作区方式**:项目根目录放置 `.mcp.json`,Qoder 会自动发现并加载。
130
- - **CLI 方式**:
138
+ 3. **Qoder IDE**:
131
139
  ```bash
132
140
  qoder.cmd mcp add --global fwloop -- fwloop
133
141
  ```
134
142
 
135
- > **效果**:在电脑任意目录、任意 STM32 / Keil 独立工程下打开 Agent,Agent 均可直接调起 MCP,无需在每个工程中重复配置。
143
+ 4. **Cursor / 其他 IDE**(在工程根目录的 `.mcp.json` 中并联配置):
144
+ ```json
145
+ {
146
+ "mcpServers": {
147
+ "fwloop": {
148
+ "command": "fwloop"
149
+ },
150
+ "agentic-hil": {
151
+ "command": "agentic-hil",
152
+ "args": ["mcp-stdio"]
153
+ }
154
+ }
155
+ }
156
+ ```
157
+
158
+ ---
159
+
160
+ ### 第三步:在你的单片机工程中开启自动化
161
+
162
+ 进入你的任意单片机工程根目录(如 STM32 Keil / CMake / IAR / PlatformIO 项目):
163
+
164
+ 1. 一键生成智能体规范、MCP 描述与台架模板:
165
+ ```bash
166
+ fwloop init
167
+ ```
168
+
169
+ 2. 接入真实硬件(配置串口与探针):
170
+ 根据提示打开工程目录下的 `lab/lab.yaml`,填入你的串口号(如 `COM5`)、目标芯片型号(如 `STM32F103C8`)与编译器类型(如 `keil` 或 `cmake`)。
171
+
172
+ 3. 打开 AI Agent 对话框,直接用自然语言调度:
173
+ - “*执行 `fw_doctor()` 检查我的硬件和编译器连接状态*”
174
+ - “*帮我编译当前单片机代码,并刷入开发板运行*”
175
+ - “*运行 HIL 自动化测试,抓取串口 Log 并验证开机状态*”
176
+
177
+ ---
178
+
179
+ ### 核心命令职责速查
180
+
181
+ | 命令 | 适用级别 | 核心作用 | 使用时机 |
182
+ |---|---|---|---|
183
+ | **`fwloop setup`** | **系统全局级** | 给各大 Agent(Antigravity / Claude Code)配置全局 MCP 与同步技能包 | **全电脑只需跑 1 次** |
184
+ | **`fwloop init`** | **工程项目级** | 在当前单片机代码目录下生成 `AGENTS.md`、`GEMINI.md`、`CLAUDE.md` 与台架配置 | **每个新单片机项目跑 1 次** |
185
+ | **`fwloop doctor`** | **环境诊断** | 检查编译器(Keil/GCC)、Python 环境、串口与探针连接健康度 | 随时排查环境时使用 |
186
+ | **`fwloop update`** | **自动更新** | 一键自动拉取最新代码并热重载依赖 | 升级工具版本时使用 |
136
187
 
137
188
  ---
138
189
 
139
- ### 接入模式二:免克隆即时运行(零安装,按需从 PyPI 即拉即用)
190
+ ### 进阶:免克隆即时运行模式(Zero-Clone Mode)
140
191
 
141
- 如果不想全局安装,可直接配置 Agent 通过 `uvx` 临时拉取运行:
192
+ 如果不想使用全局安装,也可配置 Agent 通过 `uvx` 临时拉取即时运行:
142
193
 
143
194
  1. Claude Code CLI 注册:
144
195
  ```bash
@@ -146,7 +197,7 @@ claude mcp add fwloop -- uvx firmwareloop
146
197
  claude mcp add agentic-hil -- uvx agentic-hil mcp-stdio
147
198
  ```
148
199
 
149
- 2. Qoder / Cursor / Antigravity(在工程 `.mcp.json` 中配置):
200
+ 2. 工程 `.mcp.json` 配置:
150
201
  ```json
151
202
  {
152
203
  "mcpServers": {
@@ -277,7 +328,7 @@ claude mcp remove --scope user agentic-hil
277
328
  ├── demo-firmware/ 示例固件(CMake;宿主编译模拟 MCU,闭环验证载体)
278
329
  ├── demo-make/ 示例固件(Make;构建测试载体)
279
330
  ├── docs/ DEPENDENCY_MATRIX / REUSE_PLAN / V0.0.2_GAP_VERIFICATION
280
- ├── pyproject.toml 标准 Python 包配置与 CLI 入口声明 (v0.0.9)
331
+ ├── pyproject.toml 标准 Python 包配置与 CLI 入口声明 (v0.0.10)
281
332
  ├── .mcp.example.json 双层 MCP 配置模板(firmwareloop + agentic-hil)
282
333
  ├── AGENTS.md 通用智能体规范(Antigravity / Qoder / Cursor 等)
283
334
  ├── CLAUDE.md Claude Code CLI 指南
@@ -287,7 +338,7 @@ claude mcp remove --scope user agentic-hil
287
338
 
288
339
  ---
289
340
 
290
- ## 能力验证状态(v0.0.9)
341
+ ## 能力验证状态(v0.0.10)
291
342
 
292
343
  > 状态定义:`Implemented`(已实现)/ `Simulator Validated`(模拟验证)/
293
344
  > `Real Hardware Validated`(真机验证)/ `Experimental` / `Not Implemented`
@@ -76,41 +76,92 @@ FirmwareLoop 为 AI Agent 暴露了开箱即用的 MCP 工具,涵盖 5 大核
76
76
 
77
77
  ---
78
78
 
79
- ## 双层 MCP 架构与接入模式
79
+ ## 极速起步(3 步搞定)
80
80
 
81
- FirmwareLoop 提供开箱即用的**双层 MCP 架构**:
82
- 1. **上层工作流 MCP (`fwloop` / `firmwareloop`)**:面向工程构建(Keil/CMake/Make 等 7 大后端)、pytest 12项自动化 HIL 测试、安全测量与全链路验收。
83
- 2. **下层硬件驱动 MCP (`agentic-hil`)**:面向物理探针(ST-LINK / J-Link)、JTAG/SWD 固件刷写、芯片复位、串口会话与符号级断点调试。
81
+ 无论你使用 **Google Antigravity**、**Claude Code**、**Qoder** 还是 **Cursor**,只需以下 3 步即可开始 AI 驱动的单片机自动化开发:
84
82
 
85
- ### 接入模式一:电脑全局安装(首选推荐,一次安装,所有工程通用)
83
+ ### 第一步:全局安装核心 CLI 工具
84
+
85
+ 从 PyPI 官方源安装(全电脑仅需执行一次):
86
86
 
87
- 1. 全局安装 CLI 工具到系统(直接从 PyPI 官方源下载):
88
87
  ```bash
89
88
  uv tool install firmwareloop
90
89
  uv tool install agentic-hil
91
90
  ```
92
91
 
93
- 2. 全局注册到 Claude Code CLI(全局级,一次配置全电脑工程通用):
92
+ ---
93
+
94
+ ### 第二步:全局注册到各大 AI Agent
95
+
96
+ 按你日常使用的 Agent 执行对应的注册命令(全电脑仅需配置一次):
97
+
98
+ 1. **Google Antigravity / Gemini CLI(全自动配置,推荐)**:
99
+ ```bash
100
+ fwloop setup
101
+ ```
102
+ > **说明**:该命令会自动将双层 MCP 写入 Antigravity 全局配置(`~/.gemini/config/mcp_config.json`),并全自动将全套技能包同步到全局 Skill 目录。
103
+
104
+ 2. **Claude Code CLI**:
94
105
  ```bash
95
106
  claude mcp add --scope user fwloop -- fwloop
96
107
  claude mcp add --scope user agentic-hil -- agentic-hil mcp-stdio
97
108
  ```
98
109
 
99
- 3. 注册到 Qoder IDE(支持以下三种方式):
100
- - **GUI 方式**:按快捷键 `Ctrl + Shift + ,`(Mac: `Cmd + Shift + ,`)进入「MCP」->「我的服务」-> 点击「+ 添加」粘贴配置。
101
- - **工作区方式**:项目根目录放置 `.mcp.json`,Qoder 会自动发现并加载。
102
- - **CLI 方式**:
110
+ 3. **Qoder IDE**:
103
111
  ```bash
104
112
  qoder.cmd mcp add --global fwloop -- fwloop
105
113
  ```
106
114
 
107
- > **效果**:在电脑任意目录、任意 STM32 / Keil 独立工程下打开 Agent,Agent 均可直接调起 MCP,无需在每个工程中重复配置。
115
+ 4. **Cursor / 其他 IDE**(在工程根目录的 `.mcp.json` 中并联配置):
116
+ ```json
117
+ {
118
+ "mcpServers": {
119
+ "fwloop": {
120
+ "command": "fwloop"
121
+ },
122
+ "agentic-hil": {
123
+ "command": "agentic-hil",
124
+ "args": ["mcp-stdio"]
125
+ }
126
+ }
127
+ }
128
+ ```
129
+
130
+ ---
131
+
132
+ ### 第三步:在你的单片机工程中开启自动化
133
+
134
+ 进入你的任意单片机工程根目录(如 STM32 Keil / CMake / IAR / PlatformIO 项目):
135
+
136
+ 1. 一键生成智能体规范、MCP 描述与台架模板:
137
+ ```bash
138
+ fwloop init
139
+ ```
140
+
141
+ 2. 接入真实硬件(配置串口与探针):
142
+ 根据提示打开工程目录下的 `lab/lab.yaml`,填入你的串口号(如 `COM5`)、目标芯片型号(如 `STM32F103C8`)与编译器类型(如 `keil` 或 `cmake`)。
143
+
144
+ 3. 打开 AI Agent 对话框,直接用自然语言调度:
145
+ - “*执行 `fw_doctor()` 检查我的硬件和编译器连接状态*”
146
+ - “*帮我编译当前单片机代码,并刷入开发板运行*”
147
+ - “*运行 HIL 自动化测试,抓取串口 Log 并验证开机状态*”
148
+
149
+ ---
150
+
151
+ ### 核心命令职责速查
152
+
153
+ | 命令 | 适用级别 | 核心作用 | 使用时机 |
154
+ |---|---|---|---|
155
+ | **`fwloop setup`** | **系统全局级** | 给各大 Agent(Antigravity / Claude Code)配置全局 MCP 与同步技能包 | **全电脑只需跑 1 次** |
156
+ | **`fwloop init`** | **工程项目级** | 在当前单片机代码目录下生成 `AGENTS.md`、`GEMINI.md`、`CLAUDE.md` 与台架配置 | **每个新单片机项目跑 1 次** |
157
+ | **`fwloop doctor`** | **环境诊断** | 检查编译器(Keil/GCC)、Python 环境、串口与探针连接健康度 | 随时排查环境时使用 |
158
+ | **`fwloop update`** | **自动更新** | 一键自动拉取最新代码并热重载依赖 | 升级工具版本时使用 |
108
159
 
109
160
  ---
110
161
 
111
- ### 接入模式二:免克隆即时运行(零安装,按需从 PyPI 即拉即用)
162
+ ### 进阶:免克隆即时运行模式(Zero-Clone Mode)
112
163
 
113
- 如果不想全局安装,可直接配置 Agent 通过 `uvx` 临时拉取运行:
164
+ 如果不想使用全局安装,也可配置 Agent 通过 `uvx` 临时拉取即时运行:
114
165
 
115
166
  1. Claude Code CLI 注册:
116
167
  ```bash
@@ -118,7 +169,7 @@ claude mcp add fwloop -- uvx firmwareloop
118
169
  claude mcp add agentic-hil -- uvx agentic-hil mcp-stdio
119
170
  ```
120
171
 
121
- 2. Qoder / Cursor / Antigravity(在工程 `.mcp.json` 中配置):
172
+ 2. 工程 `.mcp.json` 配置:
122
173
  ```json
123
174
  {
124
175
  "mcpServers": {
@@ -249,7 +300,7 @@ claude mcp remove --scope user agentic-hil
249
300
  ├── demo-firmware/ 示例固件(CMake;宿主编译模拟 MCU,闭环验证载体)
250
301
  ├── demo-make/ 示例固件(Make;构建测试载体)
251
302
  ├── docs/ DEPENDENCY_MATRIX / REUSE_PLAN / V0.0.2_GAP_VERIFICATION
252
- ├── pyproject.toml 标准 Python 包配置与 CLI 入口声明 (v0.0.9)
303
+ ├── pyproject.toml 标准 Python 包配置与 CLI 入口声明 (v0.0.10)
253
304
  ├── .mcp.example.json 双层 MCP 配置模板(firmwareloop + agentic-hil)
254
305
  ├── AGENTS.md 通用智能体规范(Antigravity / Qoder / Cursor 等)
255
306
  ├── CLAUDE.md Claude Code CLI 指南
@@ -259,7 +310,7 @@ claude mcp remove --scope user agentic-hil
259
310
 
260
311
  ---
261
312
 
262
- ## 能力验证状态(v0.0.9)
313
+ ## 能力验证状态(v0.0.10)
263
314
 
264
315
  > 状态定义:`Implemented`(已实现)/ `Simulator Validated`(模拟验证)/
265
316
  > `Real Hardware Validated`(真机验证)/ `Experimental` / `Not Implemented`
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: firmwareloop
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: AI Agent Firmware Development and Lab Automation Platform (Dual-Tier MCP Server)
5
5
  Author-email: WeilinZhang <19523330249@163.com>
6
6
  License: MIT
@@ -104,41 +104,92 @@ FirmwareLoop 为 AI Agent 暴露了开箱即用的 MCP 工具,涵盖 5 大核
104
104
 
105
105
  ---
106
106
 
107
- ## 双层 MCP 架构与接入模式
107
+ ## 极速起步(3 步搞定)
108
108
 
109
- FirmwareLoop 提供开箱即用的**双层 MCP 架构**:
110
- 1. **上层工作流 MCP (`fwloop` / `firmwareloop`)**:面向工程构建(Keil/CMake/Make 等 7 大后端)、pytest 12项自动化 HIL 测试、安全测量与全链路验收。
111
- 2. **下层硬件驱动 MCP (`agentic-hil`)**:面向物理探针(ST-LINK / J-Link)、JTAG/SWD 固件刷写、芯片复位、串口会话与符号级断点调试。
109
+ 无论你使用 **Google Antigravity**、**Claude Code**、**Qoder** 还是 **Cursor**,只需以下 3 步即可开始 AI 驱动的单片机自动化开发:
112
110
 
113
- ### 接入模式一:电脑全局安装(首选推荐,一次安装,所有工程通用)
111
+ ### 第一步:全局安装核心 CLI 工具
112
+
113
+ 从 PyPI 官方源安装(全电脑仅需执行一次):
114
114
 
115
- 1. 全局安装 CLI 工具到系统(直接从 PyPI 官方源下载):
116
115
  ```bash
117
116
  uv tool install firmwareloop
118
117
  uv tool install agentic-hil
119
118
  ```
120
119
 
121
- 2. 全局注册到 Claude Code CLI(全局级,一次配置全电脑工程通用):
120
+ ---
121
+
122
+ ### 第二步:全局注册到各大 AI Agent
123
+
124
+ 按你日常使用的 Agent 执行对应的注册命令(全电脑仅需配置一次):
125
+
126
+ 1. **Google Antigravity / Gemini CLI(全自动配置,推荐)**:
127
+ ```bash
128
+ fwloop setup
129
+ ```
130
+ > **说明**:该命令会自动将双层 MCP 写入 Antigravity 全局配置(`~/.gemini/config/mcp_config.json`),并全自动将全套技能包同步到全局 Skill 目录。
131
+
132
+ 2. **Claude Code CLI**:
122
133
  ```bash
123
134
  claude mcp add --scope user fwloop -- fwloop
124
135
  claude mcp add --scope user agentic-hil -- agentic-hil mcp-stdio
125
136
  ```
126
137
 
127
- 3. 注册到 Qoder IDE(支持以下三种方式):
128
- - **GUI 方式**:按快捷键 `Ctrl + Shift + ,`(Mac: `Cmd + Shift + ,`)进入「MCP」->「我的服务」-> 点击「+ 添加」粘贴配置。
129
- - **工作区方式**:项目根目录放置 `.mcp.json`,Qoder 会自动发现并加载。
130
- - **CLI 方式**:
138
+ 3. **Qoder IDE**:
131
139
  ```bash
132
140
  qoder.cmd mcp add --global fwloop -- fwloop
133
141
  ```
134
142
 
135
- > **效果**:在电脑任意目录、任意 STM32 / Keil 独立工程下打开 Agent,Agent 均可直接调起 MCP,无需在每个工程中重复配置。
143
+ 4. **Cursor / 其他 IDE**(在工程根目录的 `.mcp.json` 中并联配置):
144
+ ```json
145
+ {
146
+ "mcpServers": {
147
+ "fwloop": {
148
+ "command": "fwloop"
149
+ },
150
+ "agentic-hil": {
151
+ "command": "agentic-hil",
152
+ "args": ["mcp-stdio"]
153
+ }
154
+ }
155
+ }
156
+ ```
157
+
158
+ ---
159
+
160
+ ### 第三步:在你的单片机工程中开启自动化
161
+
162
+ 进入你的任意单片机工程根目录(如 STM32 Keil / CMake / IAR / PlatformIO 项目):
163
+
164
+ 1. 一键生成智能体规范、MCP 描述与台架模板:
165
+ ```bash
166
+ fwloop init
167
+ ```
168
+
169
+ 2. 接入真实硬件(配置串口与探针):
170
+ 根据提示打开工程目录下的 `lab/lab.yaml`,填入你的串口号(如 `COM5`)、目标芯片型号(如 `STM32F103C8`)与编译器类型(如 `keil` 或 `cmake`)。
171
+
172
+ 3. 打开 AI Agent 对话框,直接用自然语言调度:
173
+ - “*执行 `fw_doctor()` 检查我的硬件和编译器连接状态*”
174
+ - “*帮我编译当前单片机代码,并刷入开发板运行*”
175
+ - “*运行 HIL 自动化测试,抓取串口 Log 并验证开机状态*”
176
+
177
+ ---
178
+
179
+ ### 核心命令职责速查
180
+
181
+ | 命令 | 适用级别 | 核心作用 | 使用时机 |
182
+ |---|---|---|---|
183
+ | **`fwloop setup`** | **系统全局级** | 给各大 Agent(Antigravity / Claude Code)配置全局 MCP 与同步技能包 | **全电脑只需跑 1 次** |
184
+ | **`fwloop init`** | **工程项目级** | 在当前单片机代码目录下生成 `AGENTS.md`、`GEMINI.md`、`CLAUDE.md` 与台架配置 | **每个新单片机项目跑 1 次** |
185
+ | **`fwloop doctor`** | **环境诊断** | 检查编译器(Keil/GCC)、Python 环境、串口与探针连接健康度 | 随时排查环境时使用 |
186
+ | **`fwloop update`** | **自动更新** | 一键自动拉取最新代码并热重载依赖 | 升级工具版本时使用 |
136
187
 
137
188
  ---
138
189
 
139
- ### 接入模式二:免克隆即时运行(零安装,按需从 PyPI 即拉即用)
190
+ ### 进阶:免克隆即时运行模式(Zero-Clone Mode)
140
191
 
141
- 如果不想全局安装,可直接配置 Agent 通过 `uvx` 临时拉取运行:
192
+ 如果不想使用全局安装,也可配置 Agent 通过 `uvx` 临时拉取即时运行:
142
193
 
143
194
  1. Claude Code CLI 注册:
144
195
  ```bash
@@ -146,7 +197,7 @@ claude mcp add fwloop -- uvx firmwareloop
146
197
  claude mcp add agentic-hil -- uvx agentic-hil mcp-stdio
147
198
  ```
148
199
 
149
- 2. Qoder / Cursor / Antigravity(在工程 `.mcp.json` 中配置):
200
+ 2. 工程 `.mcp.json` 配置:
150
201
  ```json
151
202
  {
152
203
  "mcpServers": {
@@ -277,7 +328,7 @@ claude mcp remove --scope user agentic-hil
277
328
  ├── demo-firmware/ 示例固件(CMake;宿主编译模拟 MCU,闭环验证载体)
278
329
  ├── demo-make/ 示例固件(Make;构建测试载体)
279
330
  ├── docs/ DEPENDENCY_MATRIX / REUSE_PLAN / V0.0.2_GAP_VERIFICATION
280
- ├── pyproject.toml 标准 Python 包配置与 CLI 入口声明 (v0.0.9)
331
+ ├── pyproject.toml 标准 Python 包配置与 CLI 入口声明 (v0.0.10)
281
332
  ├── .mcp.example.json 双层 MCP 配置模板(firmwareloop + agentic-hil)
282
333
  ├── AGENTS.md 通用智能体规范(Antigravity / Qoder / Cursor 等)
283
334
  ├── CLAUDE.md Claude Code CLI 指南
@@ -287,7 +338,7 @@ claude mcp remove --scope user agentic-hil
287
338
 
288
339
  ---
289
340
 
290
- ## 能力验证状态(v0.0.9)
341
+ ## 能力验证状态(v0.0.10)
291
342
 
292
343
  > 状态定义:`Implemented`(已实现)/ `Simulator Validated`(模拟验证)/
293
344
  > `Real Hardware Validated`(真机验证)/ `Experimental` / `Not Implemented`
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "firmwareloop"
7
- version = "0.0.9"
7
+ version = "0.0.10"
8
8
  description = "AI Agent Firmware Development and Lab Automation Platform (Dual-Tier MCP Server)"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -2,4 +2,4 @@
2
2
  FirmwareLoop - AI Agent Firmware Development and Lab Automation Platform.
3
3
  """
4
4
 
5
- __version__ = "0.0.9"
5
+ __version__ = "0.0.10"
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  """
3
- fw_mcp_server.py - FirmwareLoop High-Level Workflow & Device MCP Server (v0.0.9).
3
+ fw_mcp_server.py - FirmwareLoop High-Level Workflow & Device MCP Server (v0.0.10).
4
4
 
5
5
  Exposes high-level firmware engineering and hardware management tools to AI Coding
6
6
  Agents (Antigravity CLI, Claude Code CLI, Qoder IDE, Cursor) via the Model Context
@@ -1160,7 +1160,7 @@ def process_request(req: Dict[str, Any]) -> Optional[Dict[str, Any]]:
1160
1160
  },
1161
1161
  "serverInfo": {
1162
1162
  "name": "firmwareloop",
1163
- "version": "0.0.9"
1163
+ "version": "0.0.10"
1164
1164
  }
1165
1165
  }
1166
1166
  }
@@ -1252,7 +1252,7 @@ def process_request(req: Dict[str, Any]) -> Optional[Dict[str, Any]]:
1252
1252
  def handle_cli_update() -> int:
1253
1253
  """Handle `firmwareloop update` command."""
1254
1254
  print("============================================================")
1255
- print(" FirmwareLoop Auto-Updater (v0.0.9)")
1255
+ print(" FirmwareLoop Auto-Updater (v0.0.10)")
1256
1256
  print("============================================================")
1257
1257
 
1258
1258
  is_git_repo = os.path.exists(os.path.join(REPO_ROOT, ".git"))
@@ -1326,7 +1326,7 @@ def handle_cli_setup() -> int:
1326
1326
  def handle_cli_init() -> int:
1327
1327
  """Handle `firmwareloop init` command."""
1328
1328
  print("============================================================")
1329
- print(" FirmwareLoop Multi-Agent Project Initializer (v0.0.9)")
1329
+ print(" FirmwareLoop Multi-Agent Project Initializer (v0.0.10)")
1330
1330
  print("============================================================")
1331
1331
  cwd = os.getcwd()
1332
1332
  print(f"[*] Initializing multi-agent guidelines & bench config in:\n {cwd}\n")
@@ -1347,7 +1347,7 @@ def handle_cli_init() -> int:
1347
1347
 
1348
1348
 
1349
1349
  def print_cli_help() -> None:
1350
- print("""FirmwareLoop (fwloop) — AI Agent Firmware Engineering & Lab Automation Platform (v0.0.9)
1350
+ print("""FirmwareLoop (fwloop) — AI Agent Firmware Engineering & Lab Automation Platform (v0.0.10)
1351
1351
 
1352
1352
  Usage:
1353
1353
  fwloop [command] (or: firmwareloop [command])
@@ -1378,7 +1378,7 @@ def main() -> None:
1378
1378
  elif cmd in ["setup", "register"]:
1379
1379
  sys.exit(handle_cli_setup())
1380
1380
  elif cmd in ["version", "-v", "--version"]:
1381
- print("FirmwareLoop v0.0.9")
1381
+ print("FirmwareLoop v0.0.10")
1382
1382
  sys.exit(0)
1383
1383
  elif cmd in ["help", "-h", "--help"]:
1384
1384
  print_cli_help()
@@ -75,7 +75,28 @@ $report.agents.qoder = [ordered]@{
75
75
  }
76
76
  }
77
77
 
78
- # 3. Antigravity CLI / Gemini Code & Claude Code Global Skills
78
+ # 3. Antigravity CLI / Gemini 全局 MCP 配置与 Skills
79
+ $antigravityConfigDir = Join-Path $env:USERPROFILE '.gemini\config'
80
+ $antigravityMcpConfigFile = Join-Path $antigravityConfigDir 'mcp_config.json'
81
+ if (Test-Path -LiteralPath $antigravityConfigDir) {
82
+ try {
83
+ $existingJson = if (Test-Path -LiteralPath $antigravityMcpConfigFile) {
84
+ Get-Content -LiteralPath $antigravityMcpConfigFile -Raw -Encoding UTF8 | ConvertFrom-Json
85
+ } else {
86
+ [pscustomobject]@{ mcpServers = [pscustomobject]@{} }
87
+ }
88
+ if (-not $existingJson.PSObject.Properties['mcpServers']) {
89
+ $existingJson | Add-Member -MemberType NoteProperty -Name 'mcpServers' -Value ([pscustomobject]@{})
90
+ }
91
+ $existingJson.mcpServers | Add-Member -MemberType NoteProperty -Name 'firmwareloop' -Value ([pscustomobject]@{ command = "fwloop" }) -Force
92
+ $existingJson.mcpServers | Add-Member -MemberType NoteProperty -Name 'agentic-hil' -Value ([pscustomobject]@{ command = "agentic-hil"; args = @("mcp-stdio") }) -Force
93
+ $updatedJsonStr = ConvertTo-Json -InputObject $existingJson -Depth 10
94
+ [System.IO.File]::WriteAllText($antigravityMcpConfigFile, $updatedJsonStr, [System.Text.Encoding]::UTF8)
95
+ } catch {
96
+ # ignore non-fatal config write error
97
+ }
98
+ }
99
+
79
100
  $antigravitySkillsRoot = Join-Path $env:USERPROFILE '.gemini\antigravity-cli\skills'
80
101
  $claudeSkillsRoot = Join-Path $env:USERPROFILE '.claude\skills'
81
102
 
@@ -104,10 +125,10 @@ if (Test-Path -LiteralPath $sourceSkillsDir) {
104
125
  }
105
126
 
106
127
  $report.agents.antigravity = [ordered]@{
107
- mcp_config_path = (Join-Path $repoRoot '.mcp.json')
128
+ mcp_config_path = $antigravityMcpConfigFile
108
129
  global_skills_installed = ($installedSkills.Count -gt 0)
109
130
  installed_skills = $installedSkills
110
- note = "Antigravity automatically discovers project-level .mcp.json and global skills."
131
+ note = "Antigravity global mcp_config.json and skills configured."
111
132
  }
112
133
 
113
134
  # Optional: write project-level .mcp.json
File without changes
File without changes