Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 2026-09-14 Pipeline 编排与部署预检验收修复(RFC-0057)

- 增加八类原生作者操作、128 动作/4 MiB 有界请求和 `fix-deps` 预览/原地修复;写入失败保留原文件,普通扇出保持已有默认 key,歧义目标和非法请求返回结构化错误。
- Studio 图修改统一调用原生操作,提供默认绑定重置、独立依赖编辑及单次撤销。校验、运行和保存支持一次应用合法表单;修复使用页内审阅,应用前复核草稿和工具版本。
- 预检无需执行 Demo,结果随方案或运行设置改变而过期。已有部署文件可显式关联,预检/运行/保存使用相同候选配置,保留无关模型覆盖和输出池;原始 JSON 路径变更提供明确的部署意图选择。
- 增加短写、请求边界、默认扇出、双文件冲突、部署一致性及真实浏览器回归。RFC 仍分阶段实施,未宣称模型效果或真实开发者体验指标已验收。

## 2026-09-14 投产前框架兼容入口与配置收口(第一批瘦身落地,RFC-0056)

- **旧入口与兼容别名清理**:
Expand Down
1 change: 1 addition & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
| 需要了解什么 | 入口 |
| --- | --- |
| 尚待完成的开发者试用与生产验收 | [方案开发者验收计划](plans/solution_developer_acceptance.md) |
| 降低方案编排心智负担的实施顺序与验收 | [RFC-0057:Pipeline 编排体验](rfcs/0057-pipeline-composition-experience.md)(In Implementation) |
| 架构与接口为何这样设计 | [RFC 索引](rfcs/README.md),优先列出进行中的 RFC |
| 用户可感知的版本变化 | [Changelog](CHANGELOG.md) |
| 特定 RFC 当时的验证证据 | [评审与验收归档](rfcs/reviews/README.md) |
Expand Down
545 changes: 545 additions & 0 deletions doc/rfcs/0057-pipeline-composition-experience.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/rfcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
| **RFC-0051** | 开发者任务路径、测试生成与修复诊断 | `In Implementation` | `v10.x` | 流程编排层、能力节点层、模型执行层 / Tooling / Docs | [0051-developer-task-experience.md](0051-developer-task-experience.md) |
| **RFC-0052** | 面向基础 C++ 开发者的 Node 作者接口重构 | `In Implementation` | 投产前 / Catalog v3 | 流程编排层、能力节点层 / Tooling / Docs | [0052-function-oriented-node-authoring.md](0052-function-oriented-node-authoring.md) |
| **RFC-0054** | Control 作者接口与不可变配置快照 | `In Implementation` | 投产前 | 能力节点层 / Tooling / Docs | [0054-controlled-configuration-snapshots.md](0054-controlled-configuration-snapshots.md) |
| **RFC-0057** | 降低 Pipeline 编排认知负担的实施方案 | `In Implementation` | 投产前 | 流程编排层 / Integration Tooling / Docs | [0057-pipeline-composition-experience.md](0057-pipeline-composition-experience.md) |

RFC-0054 是接续 RFC-0052 与已交付 RFC-0053、RFC-0055 的实施规格。`Proposed` 表示设计方案已形成,其中拟议 API、迁移与验证尚未实施,不作为当前 SDK 功能说明。

Expand Down
4 changes: 3 additions & 1 deletion src/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ add_executable(alg_show alg_show.cpp)
target_link_libraries(alg_show PRIVATE
edgeflow_internal_headers nlohmann_json::nlohmann_json)

add_executable(alg_pipeline_tool alg_pipeline_tool.cpp)
add_executable(alg_pipeline_tool
alg_pipeline_tool.cpp
pipeline_authoring.cpp)
target_link_libraries(alg_pipeline_tool PRIVATE
edgeflow_internal_headers llm_edgeflow::internal_runtime)
77 changes: 76 additions & 1 deletion src/tools/alg_pipeline_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "core/pipeline_validator.h"
#include "edgeflow/operator/interface.h"
#include "nlohmann/json.hpp"
#include "tools/pipeline_authoring.h"

namespace {

Expand Down Expand Up @@ -182,7 +183,9 @@ void Usage() {
<< " alg_pipeline_tool validate FILE|--stdin [--explain]\n"
<< " alg_pipeline_tool plan FILE|--stdin [--explain]\n";
std::cerr
<< " alg_pipeline_tool resolve-conf FILE [--root DIR] [--depth N]\n";
<< " alg_pipeline_tool resolve-conf FILE [--root DIR] [--depth N]\n"
<< " alg_pipeline_tool edit --stdin\n"
<< " alg_pipeline_tool fix-deps FILE [--in-place]\n";
}

} // namespace
Expand Down Expand Up @@ -359,6 +362,78 @@ int main(int argc, char** argv) {
return report.ok ? 0 : 1;
}

if (command == "edit") {
if (argc != 3 || std::string(argv[2]) != "--stdin") {
Usage();
return 2;
}
std::string input_str;
char buffer[65536];
while (std::cin.read(buffer, sizeof(buffer)) || std::cin.gcount() > 0) {
input_str.append(buffer, std::cin.gcount());
if (input_str.size() > 4 * 1024 * 1024) {
nlohmann::json err_res = {
{"schema_version", 1},
{"ok", false},
{"diagnostics",
{{{"code", "AUTHORING_ERROR"},
{"path", "/"},
{"message", "REQUEST_TOO_LARGE: 请求输入大小超过单次上限 4 MiB"},
{"severity", "error"}}}}};
std::cout << err_res.dump(2) << std::endl;
return 1;
}
}
nlohmann::json request;
try {
request = nlohmann::json::parse(input_str);
} catch (const std::exception& e) {
std::cout << Error("JSON_READ", e.what()).dump(2) << std::endl;
return 1;
}
try {
auto result = llm_edgeflow::PipelineAuthoring::ApplyRequest(request);
std::cout << result.ToJson().dump(2) << std::endl;
return result.ok ? 0 : 1;
} catch (const std::exception& error) {
std::cout << Error("AUTHORING_ERROR", error.what()).dump(2) << std::endl;
return 1;
} catch (...) {
std::cout << Error("AUTHORING_ERROR", "未知编排工具错误").dump(2)
<< std::endl;
return 1;
}
}

if (command == "fix-deps") {
if (argc < 3 || argc > 4) {
Usage();
return 2;
}
std::string file = argv[2];
bool in_place = false;
if (argc == 4) {
if (std::string(argv[3]) == "--in-place") {
in_place = true;
} else {
Usage();
return 2;
}
}
try {
auto result = llm_edgeflow::PipelineAuthoring::FixDeps(file, in_place);
std::cout << result.ToJson().dump(2) << std::endl;
return result.ok ? 0 : 1;
} catch (const std::exception& error) {
std::cout << Error("AUTHORING_ERROR", error.what()).dump(2) << std::endl;
return 1;
} catch (...) {
std::cout << Error("AUTHORING_ERROR", "未知编排工具错误").dump(2)
<< std::endl;
return 1;
}
}

Usage();
return 2;
}
Loading
Loading