diff --git a/.claude/settings.local.json b/.claude/settings.local.json
new file mode 100644
index 0000000..760813e
--- /dev/null
+++ b/.claude/settings.local.json
@@ -0,0 +1,14 @@
+{
+ "permissions": {
+ "allow": [
+ "Bash(git commit -m ':*)",
+ "Bash(/bin/bash -lc 'DOTNET_CLI_HOME=/tmp NUGET_PACKAGES=/tmp/nuget-packages dotnet build FlyshotReplacement.sln -v minimal 2>&1')",
+ "Bash(/bin/bash -lc 'DOTNET_CLI_HOME=/tmp NUGET_PACKAGES=/tmp/nuget-packages dotnet test tests/Flyshot.Server.IntegrationTests/Flyshot.Server.IntegrationTests.csproj -v minimal 2>&1')",
+ "Bash(/bin/bash -lc 'DOTNET_CLI_HOME=/tmp NUGET_PACKAGES=/tmp/nuget-packages dotnet test FlyshotReplacement.sln --no-build -v minimal 2>&1')",
+ "Bash(DOTNET_CLI_HOME=/tmp NUGET_PACKAGES=/tmp/nuget-packages dotnet build FlyshotReplacement.sln --no-restore -v minimal)",
+ "Bash(DOTNET_CLI_HOME=/tmp NUGET_PACKAGES=/tmp/nuget-packages dotnet test tests/Flyshot.Server.IntegrationTests/Flyshot.Server.IntegrationTests.csproj --no-build -v minimal)",
+ "Bash(python -c \"import json; json.load\\(open\\('.vscode/launch.json'\\)\\); json.load\\(open\\('.vscode/tasks.json'\\)\\); print\\('JSON valid.'\\)\")",
+ "Bash(python -c \"import json; json.load\\(open\\('.vscode/launch.json', encoding='utf-8'\\)\\); json.load\\(open\\('.vscode/tasks.json', encoding='utf-8'\\)\\); print\\('JSON valid.'\\)\")"
+ ]
+ }
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..3793b36
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,67 @@
+{
+ // VS Code 启动与调试配置
+ // 依赖 C# 扩展(OmniSharp 或 C# Dev Kit)提供 coreclr 调试器。
+ // 文档:https://code.visualstudio.com/docs/csharp/debugger-settings
+ "version": "0.2.0",
+ "configurations": [
+ {
+ // 标准调试启动:编译并启动 Host,命中断点,浏览器自动打开首页
+ "name": ".NET Core Launch (Host)",
+ "type": "coreclr",
+ "request": "launch",
+ "program": "dotnet",
+ "args": [
+ "run",
+ "--project",
+ "${workspaceFolder}/src/Flyshot.Server.Host/Flyshot.Server.Host.csproj",
+ "--no-launch-profile"
+ ],
+ "cwd": "${workspaceFolder}",
+ "env": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "ASPNETCORE_URLS": "http://localhost:5190"
+ },
+ "stopAtEntry": false,
+ "console": "internalConsole",
+ "preLaunchTask": "build",
+ "serverReadyAction": {
+ "action": "openExternally",
+ "pattern": "\\bNow listening on:\\s+(https?://\\S+)",
+ "uriFormat": "%s"
+ }
+ },
+ {
+ // 热重载调试启动:自动编译、自动重启、断点保留;迭代 Web / 控制器层时首选
+ "name": ".NET Core Watch (Host)",
+ "type": "coreclr",
+ "request": "launch",
+ "program": "dotnet",
+ "args": [
+ "watch",
+ "run",
+ "--project",
+ "${workspaceFolder}/src/Flyshot.Server.Host/Flyshot.Server.Host.csproj",
+ "--no-launch-profile"
+ ],
+ "cwd": "${workspaceFolder}",
+ "env": {
+ "ASPNETCORE_ENVIRONMENT": "Development",
+ "ASPNETCORE_URLS": "http://localhost:5190"
+ },
+ "stopAtEntry": false,
+ "console": "integratedTerminal",
+ "serverReadyAction": {
+ "action": "openExternally",
+ "pattern": "\\bNow listening on:\\s+(https?://\\S+)",
+ "uriFormat": "%s"
+ }
+ },
+ {
+ // 附加到正在运行的 dotnet 进程(如已手动 `dotnet run` 或 Windows Service 模式)
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach",
+ "processId": "${command:pickProcess}"
+ }
+ ]
+}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
new file mode 100644
index 0000000..140df5e
--- /dev/null
+++ b/.vscode/tasks.json
@@ -0,0 +1,160 @@
+{
+ // VS Code 任务配置
+ // 文档:https://code.visualstudio.com/docs/editor/tasks
+ "version": "2.0.0",
+ "tasks": [
+ {
+ // 构建整个解决方案,是 launch.json 启动前的默认 preLaunchTask
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/FlyshotReplacement.sln",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary",
+ "-v",
+ "minimal"
+ ],
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ },
+ "problemMatcher": "$msCompile",
+ "presentation": {
+ "reveal": "silent",
+ "clear": true
+ }
+ },
+ {
+ // 仅构建宿主项目,迭代 Web 层时比整解决方案快
+ "label": "build-host",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/src/Flyshot.Server.Host/Flyshot.Server.Host.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary",
+ "-v",
+ "minimal"
+ ],
+ "group": "build",
+ "problemMatcher": "$msCompile"
+ },
+ {
+ // 还原 NuGet 包,新增引用或克隆后第一次打开时使用
+ "label": "restore",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "restore",
+ "${workspaceFolder}/FlyshotReplacement.sln"
+ ],
+ "problemMatcher": []
+ },
+ {
+ // 清理所有项目的 bin/obj
+ "label": "clean",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "clean",
+ "${workspaceFolder}/FlyshotReplacement.sln"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ // 跑全部测试(领域 + 集成)
+ "label": "test",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "test",
+ "${workspaceFolder}/FlyshotReplacement.sln",
+ "--no-restore",
+ "-v",
+ "minimal"
+ ],
+ "group": {
+ "kind": "test",
+ "isDefault": true
+ },
+ "problemMatcher": "$msCompile"
+ },
+ {
+ // 仅跑领域 / 算法层测试,迭代规划逻辑时使用
+ "label": "test-core",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "test",
+ "${workspaceFolder}/tests/Flyshot.Core.Tests/Flyshot.Core.Tests.csproj",
+ "-v",
+ "minimal"
+ ],
+ "group": "test",
+ "problemMatcher": "$msCompile"
+ },
+ {
+ // 仅跑宿主集成测试,迭代 HTTP / 控制器层时使用
+ "label": "test-integration",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "test",
+ "${workspaceFolder}/tests/Flyshot.Server.IntegrationTests/Flyshot.Server.IntegrationTests.csproj",
+ "-v",
+ "minimal"
+ ],
+ "group": "test",
+ "problemMatcher": "$msCompile"
+ },
+ {
+ // 启动宿主,供 launch.json 的 watch 配置作为前置任务
+ "label": "watch",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "watch",
+ "run",
+ "--project",
+ "${workspaceFolder}/src/Flyshot.Server.Host/Flyshot.Server.Host.csproj",
+ "--launch-profile",
+ "http"
+ ],
+ "isBackground": true,
+ "problemMatcher": {
+ "owner": "dotnet-watch",
+ "pattern": [
+ {
+ "regexp": "^.*$",
+ "file": 1,
+ "location": 2,
+ "message": 3
+ }
+ ],
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": "^.*Watch run started.*$",
+ "endsPattern": "^.*Application started.*$"
+ }
+ }
+ },
+ {
+ // Release 配置发布到 publish/,用于现场部署包打包
+ "label": "publish",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/src/Flyshot.Server.Host/Flyshot.Server.Host.csproj",
+ "-c",
+ "Release",
+ "-o",
+ "${workspaceFolder}/publish"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
diff --git a/README.md b/README.md
index 20464a4..c29e2d0 100644
--- a/README.md
+++ b/README.md
@@ -37,6 +37,7 @@
- [x] 完成 ICSP 轨迹导出结果与旧系统对齐
- [x] 将 `ExecuteTrajectory` / `ExecuteFlyShotTraj` 接入 FANUC 运行时链路
- [x] 落地 Web 状态页
+- [x] 落地浏览器内 OpenAPI 自动驱动的接口调试页(`/debug`),与 `Swagger:Enabled` 同步可见
- [x] 固化 `10010 / 10012 / 60015` FANUC 基础协议帧编解码,确认 `10010` 状态帧为 90B
- [x] 使用本地 TCP/UDP 模拟器覆盖命令通道、状态通道和 J519 基础收发
- [x] 补齐 `Get/SetSpeedRatio`、`Get/SetTCP`、`Get/SetIO` 真机命令体与响应解析
@@ -47,13 +48,14 @@
1. 配置与测试基线
- [x] 修正 `ConfigCompatibilityTests` 当前样本路径漂移:`Rvbust/EOL10_EAU_0/RobotConfig.json` 不再包含 `001`,应改用稳定样本或更新断言。
- [x] 将 `RobotConfig.json` 中的 `use_do`、`io_keep_cycles`、`acc_limit`、`jerk_limit`、`adapt_icsp_try_num` 全部贯通到规划和执行链路。
- - [ ] 为新 HTTP API 补一份当前现场调用顺序文档,替代旧 `ControllerClient` 工作流。
+ - [ ] 为新 HTTP API 补一份当前现场调用顺序文档,替代旧 `ControllerClient` 工作流(`/debug` 页已提供交互式覆盖,仍需补静态文档说明现场调用顺序)。
2. 轨迹规划
- [x] 补齐 ICSP 最终 `global_scale > 1.0` 失败判定,避免未收敛轨迹被当作有效结果执行。
- [x] 将 self-adapt-icsp 的补点次数改为使用配置中的 `adapt_icsp_try_num`。
- [ ] 如果现场仍需要 `method="doubles"`,实现 `TrajectoryDoubleS` 等价规划;否则在 HTTP 文档中明确标为不支持。
- [ ] 把已完成对齐的旧系统轨迹样本固化为 golden tests,防止后续重构破坏轨迹一致性。
+ - [ ] 补齐 `save_traj` / `SaveTrajInfo` 的规划结果导出,将稠密关节轨迹、笛卡尔轨迹和 ShotEvents 写入可诊断 artifacts。
3. FANUC TCP 10012 命令通道
- [x] 补齐 `GetSpeedRatio` / `SetSpeedRatio` 真机命令体与响应解析。
diff --git a/TrajectoryStore/FANUC_LR_Mate_200iD_trajectories.json b/TrajectoryStore/FANUC_LR_Mate_200iD_trajectories.json
index 998e6ab..82febce 100644
--- a/TrajectoryStore/FANUC_LR_Mate_200iD_trajectories.json
+++ b/TrajectoryStore/FANUC_LR_Mate_200iD_trajectories.json
@@ -1,11 +1,11 @@
-{
- "robot": {
- "use_do": false,
- "io_addr": [],
- "io_keep_cycles": 2,
- "acc_limit": 1,
- "jerk_limit": 1,
- "adapt_icsp_try_num": 5
- },
- "flying_shots": {}
+{
+ "robot": {
+ "use_do": false,
+ "io_addr": [],
+ "io_keep_cycles": 2,
+ "acc_limit": 1,
+ "jerk_limit": 1,
+ "adapt_icsp_try_num": 5
+ },
+ "flying_shots": {}
}
\ No newline at end of file
diff --git a/src/Flyshot.Server.Host/Controllers/DebugConsoleController.cs b/src/Flyshot.Server.Host/Controllers/DebugConsoleController.cs
new file mode 100644
index 0000000..d0e226f
--- /dev/null
+++ b/src/Flyshot.Server.Host/Controllers/DebugConsoleController.cs
@@ -0,0 +1,1207 @@
+using Flyshot.Server.Host;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Options;
+
+namespace Flyshot.Server.Host.Controllers;
+
+///