继续收敛 MCP 与交付复核错误正文
保留 Direct Tools MCP 启动、Skill 资源和运行失败正文 保留交付封口复核底层原因并同步验证记录
This commit is contained in:
@@ -1152,8 +1152,9 @@ impl ExecutionAdapter {
|
||||
self.interrupt("收尾仍有未结算操作,交付尚未完成。").await;
|
||||
HostOutcome::Report(self.report())
|
||||
}
|
||||
Err(_) => {
|
||||
self.interrupt("交付复核失败,已停止本轮并保留证据。").await;
|
||||
Err(error) => {
|
||||
let message = format!("交付复核失败:{error};已停止本轮并保留证据。");
|
||||
self.interrupt(&message).await;
|
||||
HostOutcome::Report(self.report())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,11 +80,17 @@ pub(crate) fn run_direct_tools_mcp_if_requested(args: &[String]) -> Option<i32>
|
||||
.build()
|
||||
{
|
||||
Ok(runtime) => runtime,
|
||||
Err(_) => return Some(1),
|
||||
Err(error) => {
|
||||
eprintln!("AGC Direct Tools MCP 运行时初始化失败:{error}");
|
||||
return Some(1);
|
||||
}
|
||||
};
|
||||
Some(match runtime.block_on(run_direct_tools_mcp_stdio()) {
|
||||
Ok(()) => 0,
|
||||
Err(_) => 1,
|
||||
Err(error) => {
|
||||
eprintln!("AGC Direct Tools MCP 运行失败:{error}");
|
||||
1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1467,13 +1473,17 @@ async fn handle_direct_tools_mcp_request(root: &Path, request: Value) -> Option<
|
||||
.and_then(Value::as_str)
|
||||
.unwrap_or_default();
|
||||
if uri == "agc://skills/index" {
|
||||
let text = render_agc_skill_pack_index()
|
||||
.map_err(|_| ())
|
||||
.unwrap_or_else(|_| "AGC Skill 索引暂不可用".to_string());
|
||||
return Some(mcp_success(
|
||||
id,
|
||||
json!({ "contents": [{ "uri": uri, "mimeType": "text/plain", "text": text }] }),
|
||||
));
|
||||
return match render_agc_skill_pack_index() {
|
||||
Ok(text) => Some(mcp_success(
|
||||
id,
|
||||
json!({ "contents": [{ "uri": uri, "mimeType": "text/plain", "text": text }] }),
|
||||
)),
|
||||
Err(error) => Some(mcp_error(
|
||||
id,
|
||||
-32603,
|
||||
&format!("AGC Skill 索引读取失败:{error}"),
|
||||
)),
|
||||
};
|
||||
}
|
||||
if let Some(resource) = uri.strip_prefix("agc://skills/") {
|
||||
return match read_agc_skill_resource(resource) {
|
||||
@@ -1484,7 +1494,11 @@ async fn handle_direct_tools_mcp_request(root: &Path, request: Value) -> Option<
|
||||
))
|
||||
}
|
||||
Ok(_) => Some(mcp_error(id, -32000, "AGC Skill 资源超过响应大小上限")),
|
||||
Err(_) => Some(mcp_error(id, -32602, "未知或未审核的 AGC Skill 资源")),
|
||||
Err(error) => Some(mcp_error(
|
||||
id,
|
||||
-32603,
|
||||
&format!("AGC Skill 资源读取失败:{error}"),
|
||||
)),
|
||||
};
|
||||
}
|
||||
if uri != "agc://conversation/codex-responses" {
|
||||
|
||||
@@ -71,3 +71,4 @@ DirectProject 回合失败在确认不是客户端内部不可归类故障时,
|
||||
- 进入项目时预览活体核验的 IPC 失败原来只按“没有可复用预览”处理;现在保留安全正文并写入工作区状态,同时不误停未知活体。
|
||||
- 继续真实客户端启动和旁路扫描又发现三处仍会损失事实:旧历史通用中断文案遇到换行/多空格时未命中“正文缺失”标记,非 2xx 响应正文读取失败被 `unwrap_or_default()` 抹掉,CC sidecar 的 stderr 排空超时/读取任务失败也被当成“没有 stderr”。现分别改为折叠空白识别、保留“响应正文读取失败:底层原因”和保留 stderr 排空阶段/底层原因;不改变状态码、重试和脱敏边界。
|
||||
- 第二轮 Agent/CC 旁路扫描继续发现执行许可/执行会话/MCP 本地读取/编辑器 worker/Cocos worker 的 JoinError,以及 MCP future panic,会被固定成“任务未返回/异常/需要核对”;现把 join/panic 正文并入既有 ToolFailure / MCP 错误载荷,保留 `needs-reconciliation` 的不可自动重放语义。Native 定向测试:Direct MCP 33 项、Direct Tool Bridge 41 项、CC 14 项均通过。
|
||||
- 最新漏扫又补出 Direct Tools MCP 启动/运行退出码、Skill `resources/read` 索引与资源读取、交付 `finish_sealing` 错误三处固定句;现在分别写入 stderr、MCP 错误正文和交付复核底层原因,避免只剩退出码或“暂不可用/复核失败”。
|
||||
|
||||
Reference in New Issue
Block a user