退役 Agent 侧 ui.workflow.run 工作流工具
- 删除 ui_editor/workflow.rs 与 agent/runtime_tools/ui_workflow.rs 两个工作流实现模块 - agent_native_tools 去掉 ui.workflow.run 的工具描述与 schema 分支 - prompts/runtime/texts/native-tools.json 删除 ui.workflow.run.description 文案 - runtime_tools/policy、tool_policy_snapshot、parallel_ledger、project_gates 移除该工具的白名单与门禁引用 - action_execution 去掉 ui.workflow.run 分发分支,action_audit 删除整块工作流审计与枚举项 - runtime_protocol 的 verification 与 acceptance_graph 去掉工作流校验项 - tool_plan_handoff/content_validation 去掉 ui-design pages 校验分支 - ui_editor/mod.rs 去掉 workflow 模块声明
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
"preview.validate.description": "用真实浏览器验证桌面和移动预览并保存证据。",
|
||||
"image.inspect.description": "让视觉模型检查一至两张项目内图片。",
|
||||
"canvas.asset_generate.description": "通过已配置的 External Editor API 按项目需求生成图片或图集并登记到画布、素材库和项目 assets;可使用已登记资源作为参考。assetKind=icon-spritesheet 的 prompt 去除首尾空白后须为 1 到 200 个 Unicode 字符,保留内部换行并作为单条 iconDescriptions 原样提交,超限拒绝,不截断、不拆条,客户端不追加生图指令。assetKind=icon-spritesheet 时 sliceMode 必填且没有默认值:需求要求等分网格、固定槽位或指定行列数时用 grid 并提供来自需求本身的 gridX/gridY;自由排布、数量不定或只要求一张图集时用 connected-components,可用 sliceCount 约束素材张数;其它 assetKind 不得携带 sliceMode/gridX/gridY。",
|
||||
"ui.workflow.run.description": "先用 discover 从受控 game/ui-pages.json 或页面声明标记自动发现全部功能页面,再把已登记 ui-design 与每个页面的设计图桥接成独立 UI JSON State;可同时载入已登记图片、图标和项目字体,执行 Provider 结构识别、多树合并与分批组件绑定、回读阶段,并且只有所有页面已绑定且已应用到 game/ 后才允许 finalize。项目根目录由 Runtime 注入,模型不得传入宿主路径。",
|
||||
"cocos.editor.execute.description": "在当前项目对应的已打开 Cocos Creator 编辑器中执行一段有界代码;Runtime 自动绑定唯一匹配的 Creator 主进程,代码与结果都通过注入 payload 的本机 bridge 返回。",
|
||||
"unity.editor.execute.description": "在当前 Unity 项目已打开的 Windows x64 Mono Editor 中执行 C#。仅提交 code,宿主绑定项目身份;结果待核对时禁止自动重发。",
|
||||
"godot.editor.execute.description": "在当前 Godot 项目已打开的 Windows x64 标准编辑器中执行支持 return/await 的 GDScript 函数体。执行载荷仅有 code,重新聚焦可触发首次加载;结果待核对时禁止自动重发。",
|
||||
|
||||
@@ -676,161 +676,6 @@ fn agent_runtime_action_receipt_safe_detail_with_owner(
|
||||
"revisionAdvanceCount": value.get("revisionAdvanceCount").and_then(serde_json::Value::as_u64).unwrap_or(0),
|
||||
})).ok();
|
||||
}
|
||||
if observation.tool == "ui.workflow.run" {
|
||||
let value = serde_json::from_str::<serde_json::Value>(
|
||||
observation.detail.as_deref().unwrap_or_default(),
|
||||
)
|
||||
.ok()?;
|
||||
let operation = value.get("operation")?.as_str()?;
|
||||
let project_id = value.get("projectId")?.as_str()?;
|
||||
let source_asset_id = value.get("sourceAssetId")?.as_str()?;
|
||||
let completed = value.get("completed")?.as_bool()?;
|
||||
let revision_advance_count = value.get("revisionAdvanceCount")?.as_u64()?;
|
||||
if project_id.is_empty()
|
||||
|| source_asset_id.is_empty()
|
||||
|| !matches!(
|
||||
operation,
|
||||
"discover" | "prepare" | "recognize" | "status" | "finalize"
|
||||
)
|
||||
|| project_id.chars().any(char::is_control)
|
||||
|| source_asset_id.chars().any(char::is_control)
|
||||
{
|
||||
return None;
|
||||
}
|
||||
if operation == "discover" {
|
||||
let discovered_pages = value.get("discoveredPages")?.as_array()?;
|
||||
if discovered_pages.is_empty() || discovered_pages.len() > 32 {
|
||||
return None;
|
||||
}
|
||||
let safe_pages = discovered_pages
|
||||
.iter()
|
||||
.map(|page| {
|
||||
let page_id = page.get("pageId")?.as_str()?;
|
||||
let title = page.get("title")?.as_str()?;
|
||||
let description = page.get("description")?.as_str()?;
|
||||
let application_path = page.get("applicationPath")?.as_str()?;
|
||||
let required_design_asset_path =
|
||||
page.get("requiredDesignAssetPath")?.as_str()?;
|
||||
let discovered_from = page.get("discoveredFrom")?.as_str()?;
|
||||
if page_id.is_empty()
|
||||
|| title.is_empty()
|
||||
|| description.chars().any(char::is_control)
|
||||
|| application_path.is_empty()
|
||||
|| !application_path.starts_with("game/")
|
||||
|| required_design_asset_path.is_empty()
|
||||
|| discovered_from.is_empty()
|
||||
{
|
||||
return None;
|
||||
}
|
||||
Some(serde_json::json!({
|
||||
"pageId": agent_runtime_action_receipt_safe_text(root, page_id, 80, None)?,
|
||||
"title": agent_runtime_action_receipt_safe_text(root, title, 120, None)?,
|
||||
"description": agent_runtime_action_receipt_safe_text(root, description, 400, None)?,
|
||||
"applicationPath": agent_runtime_action_receipt_safe_text(root, application_path, 240, None)?,
|
||||
"requiredDesignAssetPath": agent_runtime_action_receipt_safe_text(root, required_design_asset_path, 240, None)?,
|
||||
"discoveredFrom": agent_runtime_action_receipt_safe_text(root, discovered_from, 240, None)?,
|
||||
}))
|
||||
})
|
||||
.collect::<Option<Vec<_>>>()?;
|
||||
return serde_json::to_string(&serde_json::json!({
|
||||
"operation": operation,
|
||||
"projectId": agent_runtime_action_receipt_safe_text(root, project_id, 160, None)?,
|
||||
"sourceAssetId": agent_runtime_action_receipt_safe_text(root, source_asset_id, 160, None)?,
|
||||
"completed": completed,
|
||||
"revisionAdvanceCount": revision_advance_count,
|
||||
"pages": [],
|
||||
"discoveredPages": safe_pages,
|
||||
"finalStageRoute": null,
|
||||
}))
|
||||
.ok();
|
||||
}
|
||||
let pages = value.get("pages")?.as_array()?;
|
||||
if pages.is_empty() || pages.len() > 32 {
|
||||
return None;
|
||||
}
|
||||
let mut safe_pages = Vec::with_capacity(pages.len());
|
||||
for page in pages {
|
||||
let page_id = page.get("pageId")?.as_str()?;
|
||||
let title = page.get("title")?.as_str()?;
|
||||
let design_asset_id = page.get("designAssetId")?.as_str()?;
|
||||
let ui_asset_id = page.get("uiAssetId")?.as_str()?;
|
||||
let revision = page.get("uiStateRevision")?.as_u64()?;
|
||||
let stage = page.get("stage")?.as_str()?;
|
||||
let marker = page.get("applicationMarker")?.as_str()?;
|
||||
let blockers = page.get("blockers")?.as_array()?;
|
||||
if page_id.is_empty()
|
||||
|| title.is_empty()
|
||||
|| design_asset_id.is_empty()
|
||||
|| ui_asset_id.is_empty()
|
||||
|| revision > 9_007_199_254_740_991
|
||||
|| marker.is_empty()
|
||||
|| !matches!(
|
||||
stage,
|
||||
"reference-ready"
|
||||
| "structure-ready"
|
||||
| "binding-ready"
|
||||
| "application-ready"
|
||||
| "completed"
|
||||
)
|
||||
|| blockers.len() > 32
|
||||
{
|
||||
return None;
|
||||
}
|
||||
let safe_blockers = blockers
|
||||
.iter()
|
||||
.map(|blocker| {
|
||||
let blocker = blocker.as_str()?;
|
||||
agent_runtime_action_receipt_safe_text(root, blocker, 240, None)
|
||||
.map(serde_json::Value::String)
|
||||
})
|
||||
.collect::<Option<Vec<_>>>()?;
|
||||
safe_pages.push(serde_json::json!({
|
||||
"pageId": agent_runtime_action_receipt_safe_text(root, page_id, 80, None)?,
|
||||
"title": agent_runtime_action_receipt_safe_text(root, title, 120, None)?,
|
||||
"designAssetId": agent_runtime_action_receipt_safe_text(root, design_asset_id, 160, None)?,
|
||||
"uiAssetId": agent_runtime_action_receipt_safe_text(root, ui_asset_id, 160, None)?,
|
||||
"uiStateRevision": revision,
|
||||
"stage": stage,
|
||||
"blockers": safe_blockers,
|
||||
"applicationMarker": agent_runtime_action_receipt_safe_text(root, marker, 240, None)?,
|
||||
}));
|
||||
}
|
||||
let final_stage_route = if completed {
|
||||
let route = value.get("finalStageRoute")?;
|
||||
let resource_id = route.get("resourceId")?.as_str()?;
|
||||
let initial_step = route.get("initialStep")?.as_str()?;
|
||||
let render_mode = route.get("renderMode")?.as_str()?;
|
||||
if resource_id.is_empty()
|
||||
|| initial_step != "asset-separation"
|
||||
|| render_mode != "final-preview"
|
||||
{
|
||||
return None;
|
||||
}
|
||||
Some(serde_json::json!({
|
||||
"resourceId": agent_runtime_action_receipt_safe_text(root, resource_id, 160, None)?,
|
||||
"initialStep": initial_step,
|
||||
"renderMode": render_mode,
|
||||
}))
|
||||
} else {
|
||||
if !value
|
||||
.get("finalStageRoute")
|
||||
.is_some_and(serde_json::Value::is_null)
|
||||
{
|
||||
return None;
|
||||
}
|
||||
None
|
||||
};
|
||||
return serde_json::to_string(&serde_json::json!({
|
||||
"operation": operation,
|
||||
"projectId": agent_runtime_action_receipt_safe_text(root, project_id, 160, None)?,
|
||||
"sourceAssetId": agent_runtime_action_receipt_safe_text(root, source_asset_id, 160, None)?,
|
||||
"completed": completed,
|
||||
"revisionAdvanceCount": revision_advance_count,
|
||||
"pages": safe_pages,
|
||||
"finalStageRoute": final_stage_route,
|
||||
}))
|
||||
.ok();
|
||||
}
|
||||
if observation.tool != "project.patchset" {
|
||||
return None;
|
||||
}
|
||||
@@ -1209,7 +1054,6 @@ pub(in crate::agent) fn agent_runtime_public_action_input_summary(
|
||||
| "preview.validate"
|
||||
| "image.inspect"
|
||||
| "canvas.asset_generate"
|
||||
| "ui.workflow.run"
|
||||
| "agent.message"
|
||||
| "agent.delegate"
|
||||
| "agent.schedule_ready"
|
||||
|
||||
@@ -436,9 +436,6 @@ pub(crate) async fn execute_game_creator_agent_runtime_tool_action_with_pending_
|
||||
)
|
||||
.await
|
||||
}
|
||||
"ui.workflow.run" => {
|
||||
observe_agent_runtime_ui_workflow(root, agent_id, run_id, task, &action.input).await
|
||||
}
|
||||
"blackboard.write" => {
|
||||
observe_agent_runtime_blackboard_write(root, agent_id, run_id, &action.input)
|
||||
}
|
||||
|
||||
@@ -103,7 +103,6 @@ pub(in crate::agent) fn game_creator_agent_runtime_tool_command_id(
|
||||
"preview.validate" => Some("preview.validate"),
|
||||
"image.inspect" => Some("image.inspect"),
|
||||
"canvas.asset_generate" => Some("canvas.asset_generate"),
|
||||
"ui.workflow.run" => Some("asset.register"),
|
||||
"blackboard.write" => Some("memory.write"),
|
||||
"agent.message" => Some("conversation.write"),
|
||||
"agent.delegate" => Some("agent.delegate"),
|
||||
|
||||
@@ -649,9 +649,6 @@ pub(crate) fn is_agent_runtime_project_mutation_observation(
|
||||
if observation.tool == "project.patchset" {
|
||||
return agent_runtime_patchset_advanced_project_revision(observation);
|
||||
}
|
||||
if observation.tool == "ui.workflow.run" {
|
||||
return agent_runtime_ui_workflow_observation_advances_project_revision(observation);
|
||||
}
|
||||
if observation.tool == "canvas.asset_import" {
|
||||
return observation
|
||||
.detail
|
||||
@@ -669,7 +666,6 @@ pub(crate) fn is_agent_runtime_project_mutation_observation(
|
||||
| "project.patchset"
|
||||
| "project.restore"
|
||||
| "canvas.asset_generate"
|
||||
| "ui.workflow.run"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -761,47 +757,14 @@ pub(crate) fn agent_runtime_observation_advances_project_revision(
|
||||
.and_then(|detail| serde_json::from_str::<serde_json::Value>(detail).ok())
|
||||
.and_then(|value| value.get("revisionAdvanceCount")?.as_u64())
|
||||
.is_some_and(|count| count > 0),
|
||||
"ui.workflow.run" => {
|
||||
agent_runtime_ui_workflow_observation_advances_project_revision(observation)
|
||||
}
|
||||
"memory.write" => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn agent_runtime_ui_workflow_observation_advances_project_revision(
|
||||
observation: &AgentRuntimeToolObservation,
|
||||
) -> bool {
|
||||
observation.tool == "ui.workflow.run"
|
||||
&& observation.status == "ok"
|
||||
&& observation
|
||||
.detail
|
||||
.as_deref()
|
||||
.and_then(|detail| serde_json::from_str::<serde_json::Value>(detail).ok())
|
||||
.and_then(|value| {
|
||||
value
|
||||
.get("revisionAdvanceCount")
|
||||
.and_then(serde_json::Value::as_u64)
|
||||
.map(|count| count > 0)
|
||||
})
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
fn agent_runtime_observation_project_revision_advance_count(
|
||||
observation: &AgentRuntimeToolObservation,
|
||||
) -> u64 {
|
||||
if observation.tool == "ui.workflow.run" && observation.status == "ok" {
|
||||
return observation
|
||||
.detail
|
||||
.as_deref()
|
||||
.and_then(|detail| serde_json::from_str::<serde_json::Value>(detail).ok())
|
||||
.and_then(|value| {
|
||||
value
|
||||
.get("revisionAdvanceCount")
|
||||
.and_then(serde_json::Value::as_u64)
|
||||
})
|
||||
.unwrap_or(0);
|
||||
}
|
||||
if let Some(count) = observation
|
||||
.detail
|
||||
.as_deref()
|
||||
@@ -821,19 +784,6 @@ fn agent_runtime_observation_project_revision_advance_count(
|
||||
}
|
||||
}
|
||||
|
||||
fn is_agent_runtime_ui_workflow_completed_observation(
|
||||
observation: &AgentRuntimeToolObservation,
|
||||
) -> bool {
|
||||
observation.tool == "ui.workflow.run"
|
||||
&& observation.status == "ok"
|
||||
&& observation
|
||||
.detail
|
||||
.as_deref()
|
||||
.and_then(|detail| serde_json::from_str::<serde_json::Value>(detail).ok())
|
||||
.and_then(|value| value.get("completed").and_then(serde_json::Value::as_bool))
|
||||
.unwrap_or(false)
|
||||
}
|
||||
|
||||
pub(in crate::agent) fn is_agent_runtime_static_smoke_observation(
|
||||
observation: &AgentRuntimeToolObservation,
|
||||
) -> bool {
|
||||
@@ -855,7 +805,6 @@ pub(in crate::agent) fn is_agent_runtime_project_verification_observation(
|
||||
|| (observation.tool == "command.exec"
|
||||
&& agent_runtime_command_exec_is_verification_eligible(observation))
|
||||
|| (observation.tool == "canvas.asset_generate" && observation.status == "ok")
|
||||
|| is_agent_runtime_ui_workflow_completed_observation(observation)
|
||||
|| is_agent_runtime_static_smoke_observation(observation)
|
||||
}
|
||||
|
||||
@@ -868,8 +817,6 @@ pub(in crate::agent) fn agent_runtime_project_verification_label(
|
||||
"command.exec"
|
||||
} else if observation.tool == "canvas.asset_generate" {
|
||||
"canvas.asset_generate"
|
||||
} else if observation.tool == "ui.workflow.run" {
|
||||
"ui.workflow.run"
|
||||
} else {
|
||||
"project.verify"
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ pub(crate) fn agent_runtime_executable_tools() -> Vec<&'static str> {
|
||||
"preview.validate",
|
||||
"image.inspect",
|
||||
"canvas.asset_generate",
|
||||
"ui.workflow.run",
|
||||
"blackboard.write",
|
||||
"agent.message",
|
||||
"agent.delegate",
|
||||
@@ -110,7 +109,6 @@ pub(crate) fn agent_runtime_acceptance_evidence_tools() -> BTreeSet<&'static str
|
||||
"image.inspect",
|
||||
"canvas.asset_generate",
|
||||
"canvas.asset_import",
|
||||
"ui.workflow.run",
|
||||
]
|
||||
.into_iter()
|
||||
.collect()
|
||||
|
||||
@@ -137,7 +137,6 @@ fn acceptance_evidence_tool_may_advance_project_revision(tool: &str) -> bool {
|
||||
| "project.patchset"
|
||||
| "canvas.asset_import"
|
||||
| "canvas.asset_generate"
|
||||
| "ui.workflow.run"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,6 @@ pub(in crate::agent) fn validate_agent_runtime_verification_gate(
|
||||
| "command.start"
|
||||
| "canvas.asset_generate"
|
||||
| "canvas.asset_import"
|
||||
| "ui.workflow.run"
|
||||
)
|
||||
}) {
|
||||
return Err("Agent Runtime verification gate 的修改工具无效".to_string());
|
||||
@@ -175,7 +174,6 @@ pub(in crate::agent) fn validate_agent_runtime_verification_gate(
|
||||
| "command.exec"
|
||||
| "preview.validate"
|
||||
| "canvas.asset_generate"
|
||||
| "ui.workflow.run"
|
||||
)
|
||||
}) {
|
||||
return Err("Agent Runtime verification gate 的验证工具无效".to_string());
|
||||
|
||||
@@ -19,7 +19,6 @@ mod process_ops;
|
||||
mod project_ops;
|
||||
mod run_status;
|
||||
mod task_ops;
|
||||
mod ui_workflow;
|
||||
|
||||
pub(in crate::agent) use action_history::*;
|
||||
pub(in crate::agent) use cocos_editor::*;
|
||||
@@ -39,7 +38,6 @@ pub(in crate::agent) use process_ops::*;
|
||||
pub(in crate::agent) use project_ops::*;
|
||||
pub(in crate::agent) use run_status::*;
|
||||
pub(in crate::agent) use task_ops::*;
|
||||
pub(in crate::agent) use ui_workflow::*;
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use delegation::observe_agent_runtime_agent_delegate_at_locked;
|
||||
|
||||
@@ -48,7 +48,6 @@ fn autonomous_design_foundation_command_is_allowed(command_id: &str) -> bool {
|
||||
| "canvas.asset_generate"
|
||||
| "canvas.asset_import"
|
||||
| "asset.register"
|
||||
| "ui.workflow.run"
|
||||
| "agent.audit"
|
||||
| "agent.action_history"
|
||||
| "agent.run_status"
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
use super::*;
|
||||
use crate::ui_editor::workflow::{run_ui_workflow_at_with_provider, UiWorkflowRunInput};
|
||||
use serde_json::Value;
|
||||
|
||||
pub(in crate::agent) async fn observe_agent_runtime_ui_workflow(
|
||||
root: &Path,
|
||||
agent_id: &str,
|
||||
run_id: &str,
|
||||
_task: &str,
|
||||
input: &Value,
|
||||
) -> AgentRuntimeToolObservation {
|
||||
let parsed = match serde_json::from_value::<UiWorkflowRunInput>(input.clone()) {
|
||||
Ok(parsed) => parsed,
|
||||
Err(error) => {
|
||||
return AgentRuntimeToolObservation {
|
||||
tool: "ui.workflow.run".to_string(),
|
||||
status: "rejected".to_string(),
|
||||
summary: format!("ui.workflow.run 输入无效:{error}"),
|
||||
detail: None,
|
||||
};
|
||||
}
|
||||
};
|
||||
let operation = parsed.operation;
|
||||
let revision_before = read_game_creator_agent_runtime_project_revision(root)
|
||||
.ok()
|
||||
.map(|snapshot| snapshot.revision);
|
||||
match run_ui_workflow_at_with_provider(root, parsed, Some((agent_id, run_id))).await {
|
||||
Ok(result) => {
|
||||
let completed = result.completed;
|
||||
let page_count = result.pages.len().max(result.discovered_pages.len());
|
||||
if result.revision_advance_count > 0 {
|
||||
// Runtime actions can update manifest/State several times inside a
|
||||
// single provider turn; publish the invalidation immediately so
|
||||
// the workbench refreshes intermediate artifacts before finalize.
|
||||
emit_game_creator_manifest_invalidated(root, "ui-workflow");
|
||||
}
|
||||
let detail = serde_json::to_string(&result).ok();
|
||||
AgentRuntimeToolObservation {
|
||||
tool: "ui.workflow.run".to_string(),
|
||||
status: "ok".to_string(),
|
||||
summary: if operation == crate::ui_editor::workflow::UiWorkflowOperation::Discover {
|
||||
format!("UI workflow 自动发现 {page_count} 个功能页面")
|
||||
} else if completed {
|
||||
format!("UI workflow 已完成 {page_count} 个页面并生成最终编辑阶段路由")
|
||||
} else {
|
||||
format!("UI workflow 已更新 {page_count} 个页面的持久阶段状态")
|
||||
},
|
||||
detail,
|
||||
}
|
||||
}
|
||||
Err(error) => {
|
||||
// Recognition can durably install a real structure before a later
|
||||
// provider-backed binding step fails. The client still needs that
|
||||
// intermediate State/manifest update even though this operation
|
||||
// truthfully reports an error.
|
||||
let revision_advanced = revision_before.is_some_and(|before| {
|
||||
read_game_creator_agent_runtime_project_revision(root)
|
||||
.ok()
|
||||
.is_some_and(|after| after.revision > before)
|
||||
});
|
||||
if revision_advanced {
|
||||
emit_game_creator_manifest_invalidated(root, "ui-workflow");
|
||||
}
|
||||
AgentRuntimeToolObservation {
|
||||
tool: "ui.workflow.run".to_string(),
|
||||
status: if operation == crate::ui_editor::workflow::UiWorkflowOperation::Finalize
|
||||
|| error.contains("拒绝伪造完成")
|
||||
{
|
||||
"rejected"
|
||||
} else {
|
||||
"error"
|
||||
}
|
||||
.to_string(),
|
||||
summary: redact_agent_runtime_project_paths(root, &error, 500),
|
||||
detail: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1065,9 +1065,6 @@ fn runtime_tool_description(tool: &str) -> &'static str {
|
||||
"canvas.asset_generate" => {
|
||||
prompt_text!("nativeTools.canvas.asset_generate.description")
|
||||
}
|
||||
"ui.workflow.run" => {
|
||||
prompt_text!("nativeTools.ui.workflow.run.description")
|
||||
}
|
||||
"cocos.editor.execute" => {
|
||||
prompt_text!("nativeTools.cocos.editor.execute.description")
|
||||
}
|
||||
@@ -1357,33 +1354,6 @@ fn runtime_tool_input_schema(tool: &str) -> Value {
|
||||
}
|
||||
})
|
||||
}
|
||||
"ui.workflow.run" => json!({
|
||||
"type": "object",
|
||||
"required": ["operation", "sourceAssetId", "pages"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"operation": { "type": "string", "enum": ["discover", "prepare", "recognize", "status", "finalize"] },
|
||||
"sourceAssetId": { "type": "string", "minLength": 1, "maxLength": 160 },
|
||||
"pages": {
|
||||
"type": "array",
|
||||
"maxItems": 32,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["pageId", "title", "description", "designAssetId", "spriteAssetIds", "fontAssetIds", "applicationPath"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"pageId": { "type": "string", "minLength": 1, "maxLength": 80, "pattern": "^[A-Za-z0-9._-]+$" },
|
||||
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
|
||||
"description": { "type": "string", "maxLength": 400 },
|
||||
"designAssetId": { "type": "string", "minLength": 1, "maxLength": 160 },
|
||||
"spriteAssetIds": { "type": "array", "maxItems": 32, "items": { "type": "string", "minLength": 1, "maxLength": 160 } },
|
||||
"fontAssetIds": { "type": "array", "maxItems": 16, "items": { "type": "string", "minLength": 1, "maxLength": 160 } },
|
||||
"applicationPath": { "type": ["string", "null"], "maxLength": 240 }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
"blackboard.write" => two_string_input_schema("title", "content"),
|
||||
"agent.message" => two_string_input_schema("agentId", "content"),
|
||||
"agent.delegate" => json!({
|
||||
|
||||
@@ -423,14 +423,6 @@ fn collect_native_tool_absolute_path_findings(
|
||||
findings,
|
||||
);
|
||||
}
|
||||
"ui.workflow.run" => {
|
||||
if let Some(pages) = input.get("pages").and_then(serde_json::Value::as_array) {
|
||||
for (index, page) in pages.iter().enumerate() {
|
||||
let pointer = format!("{input_pointer}/pages/{index}/applicationPath");
|
||||
collect_native_string_field(root, page, "applicationPath", &pointer, findings);
|
||||
}
|
||||
}
|
||||
}
|
||||
"task.create" => {
|
||||
collect_native_string_array_field(
|
||||
root,
|
||||
|
||||
@@ -7,4 +7,3 @@ pub mod resource;
|
||||
pub mod resource_bridge;
|
||||
pub mod state;
|
||||
mod utils;
|
||||
pub(crate) mod workflow;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user