refactor: 清理未使用代码并添加未来功能标记
Some checks failed
CI / Rust Check (push) Has been cancelled
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

style: 统一代码格式和注释风格

docs: 更新多个功能文档的完整度和状态

feat(runtime): 添加路径验证工具支持

fix(pipeline): 改进条件判断和变量解析逻辑

test(types): 为ID类型添加全面测试用例

chore: 更新依赖项和Cargo.lock文件

perf(mcp): 优化MCP协议传输和错误处理
This commit is contained in:
iven
2026-03-25 21:55:12 +08:00
parent aa6a9cbd84
commit bf6d81f9c6
109 changed files with 12271 additions and 815 deletions

View File

@@ -7,7 +7,6 @@
//! - Custom variables
use std::collections::HashMap;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use regex::Regex;
@@ -156,7 +155,26 @@ impl ExecutionContext {
match first {
"inputs" => self.resolve_from_map(&self.inputs, rest, path),
"steps" => self.resolve_from_map(&self.steps_output, rest, path),
"steps" => {
// Handle "output" as a special key for step outputs
// steps.step_id.output.field -> steps_output["step_id"].field
// steps.step_id.field -> steps_output["step_id"].field (also supported)
if rest.len() >= 2 && rest[1] == "output" {
// Skip "output" in the path: [step_id, "output", ...rest] -> [step_id, ...rest]
let step_id = rest[0];
let actual_rest = &rest[2..];
let step_value = self.steps_output.get(step_id)
.ok_or_else(|| StateError::VariableNotFound(step_id.to_string()))?;
if actual_rest.is_empty() {
Ok(step_value.clone())
} else {
self.resolve_from_value(step_value, actual_rest, path)
}
} else {
self.resolve_from_map(&self.steps_output, rest, path)
}
}
"vars" | "var" => self.resolve_from_map(&self.variables, rest, path),
"item" => {
if let Some(ctx) = &self.loop_context {