Files
Genarrative/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_tools.rs
T
kdletters 54d0fb75ea 接入 Godot 编辑器插件与受控执行链路
新增 GDExtension 自动引导、GDScript 执行和实例隔离缓存
接入 AGC 插件开关、Runner、Agent 工具与权限审计
完善执行回执确认、不确定状态阻断及卸载恢复
补齐 Windows 分发资源、定向测试与实机验收文档
2026-09-20 16:35:04 +08:00

115 lines
4.0 KiB
Rust

use super::*;
mod action_history;
mod cocos_editor;
mod command_ops;
mod context;
mod delegation;
mod delivery;
mod editor_execute;
mod file_ops;
mod goal_contract;
mod helpers;
mod isolated_joins;
mod media;
pub(in crate::agent) use media::design_foundation_ui_page_output_path_is_valid;
mod policy;
mod preview;
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::*;
pub(in crate::agent) use command_ops::*;
pub(in crate::agent) use context::*;
pub(in crate::agent) use delegation::*;
pub(in crate::agent) use delivery::*;
pub(in crate::agent) use editor_execute::*;
pub(in crate::agent) use file_ops::*;
pub(in crate::agent) use goal_contract::*;
pub(in crate::agent) use helpers::*;
pub(in crate::agent) use isolated_joins::*;
pub(in crate::agent) use media::*;
pub(in crate::agent) use policy::*;
pub(in crate::agent) use preview::*;
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;
#[cfg(test)]
pub(crate) use delivery::{
build_static_delegate_result_for_child_at, wake_waiting_static_delegate_parent_run_for_test_at,
};
#[cfg(test)]
pub(crate) use media::validate_agent_runtime_canvas_replacement_authorization_at;
pub(crate) use action_history::{
is_valid_agent_runtime_action_id, observe_agent_runtime_action_history,
};
pub(crate) use command_ops::{
observe_agent_runtime_limited_command, observe_agent_runtime_project_verify,
};
pub(crate) use delegation::{
observe_agent_runtime_agent_delegate, observe_agent_runtime_agent_message,
observe_agent_runtime_agent_spawn_isolated,
};
pub(crate) use delivery::{
agent_runtime_delegation_id, dispatch_isolated_agent_join_at,
game_creator_agent_runtime_terminal_status, publish_game_creator_agent_delegate_result,
reconcile_game_creator_agent_delegate_receipts_at,
};
#[allow(unused_imports)]
pub(crate) use isolated_joins::{
mark_isolated_join_claim_observed_at, render_isolated_join_status_batch,
};
#[cfg(test)]
pub(crate) use media::observe_agent_runtime_platform_art_asset_generation_after_dispatch_for_test;
#[allow(unused_imports)]
pub(crate) use media::{
AGENT_RUNTIME_UI_DESIGN_INSPECTION_KIND, AGENT_RUNTIME_UI_PROTOTYPE_LEGACY_VALIDATION_PROFILE,
AGENT_RUNTIME_UI_PROTOTYPE_PATH, AGENT_RUNTIME_UI_PROTOTYPE_VALIDATION_PROFILE,
};
pub(crate) use policy::{
fail_closed_agent_runtime_confirmation_for_run,
game_creator_agent_runtime_tool_policy_block_after_lock,
game_creator_agent_runtime_tool_policy_rule_for_run,
};
pub(crate) use preview::{
observe_agent_runtime_preview_start, observe_agent_runtime_preview_validate,
};
#[allow(unused_imports)]
pub(crate) use project_ops::{
observe_agent_runtime_project_git_commit_locked_with_audit,
observe_agent_runtime_project_patchset_with_audit,
};
pub(crate) use run_status::observe_agent_runtime_run_status;
/// Validation tools are retained for compatibility with older provider turns,
/// but a relaxed autonomous game-build run must not let an accidental call
/// reintroduce the legacy verification/preview gates. Resolve the profile
/// from durable run metadata and report a terminal no-op observation before
/// any tool-specific parsing or side effects occur.
pub(crate) fn relaxed_autonomous_validation_skip_observation(
root: &Path,
agent_id: &str,
run_id: &str,
tool: &str,
) -> Option<AgentRuntimeToolObservation> {
autonomous_relaxed_run_at(root, agent_id, run_id)
.ok()
.filter(|relaxed| *relaxed)
.map(|_| AgentRuntimeToolObservation {
tool: tool.to_string(),
status: "ok".to_string(),
summary: format!("{tool} 在 relaxed autonomous lane 中跳过,未执行平台验证"),
detail: Some("relaxedAutonomous=true · skipped=true".to_string()),
})
}