Files
Genarrative/apps/ai-game-creator-shell/src-tauri/src/agent/runtime_protocol.rs
T
AIGameCreator App d4075c3423
Project CI / Frontend tests (push) Failing after 3m43s
Project CI / Native shell tests (push) Failing after 3m36s
Project CI / Repository checks (push) Failing after 4m36s
Project CI / Backend tests (push) Successful in 8m36s
抽取通用多智能体运行时与可扩展Provider
新增纯 Rust agent-runtime-core,提供运行时契约、能力注册、Agent 目录、Profile、完成策略与零重放恢复
抽取中立 LLM Provider 协议与可扩展 Registry,并适配 OpenAI Responses、OpenAI Chat 和 Anthropic
将 AGC interaction、Provider 控制、Runner 生命周期、steering 与 tool-plan handoff 接入统一运行时边界
补充非游戏消费者、Provider 网络闭环、Runtime 恢复及 GUI Runner owner 测试
同步 Cargo/npm 门禁、Runtime 技术方案和项目共享记忆
2026-07-30 16:15:51 +08:00

117 lines
5.0 KiB
Rust

use super::*;
mod autonomous_completion;
#[cfg(test)]
mod autonomous_completion_contract_tests;
mod context_bundle;
mod context_window;
mod finalization;
mod json_sidecar;
mod models;
mod provider_control;
mod provider_retry;
mod real_e2e_checkpoint;
mod response_stream;
mod run_configuration;
mod steering;
mod verification;
pub(in crate::agent) use autonomous_completion::*;
pub(in crate::agent) use context_bundle::*;
pub(in crate::agent) use finalization::*;
pub(in crate::agent) use json_sidecar::*;
pub(in crate::agent) use models::*;
pub(in crate::agent) use provider_control::*;
pub(in crate::agent) use provider_retry::*;
pub(in crate::agent) use real_e2e_checkpoint::*;
pub(in crate::agent) use response_stream::*;
pub(in crate::agent) use run_configuration::*;
pub(in crate::agent) use steering::*;
pub(in crate::agent) use verification::*;
pub(crate) use autonomous_completion::autonomous_game_build_root_run_active_at;
pub(crate) use context_bundle::{
build_game_creator_agent_runtime_context_bundle,
continuation_from_game_creator_agent_runtime_context_bundle,
game_creator_agent_runtime_context_bundle_path, game_creator_agent_runtime_context_project_id,
persist_game_creator_agent_runtime_context, read_game_creator_agent_runtime_context_bundle,
read_game_creator_agent_runtime_context_bundle_for_idle_compaction,
write_game_creator_agent_runtime_context_bundle,
};
pub(crate) use context_window::{
sanitize_agent_runtime_context_observation, AgentRuntimeContextCheckpoint,
};
#[allow(unused_imports)]
pub(crate) use finalization::{
game_creator_agent_runtime_finalization_message_id,
game_creator_agent_runtime_finalization_path,
read_game_creator_agent_runtime_finalization_journal,
remove_game_creator_agent_runtime_finalization_journal,
};
pub(crate) use json_sidecar::{
agent_runtime_json_sidecar_backup_path, read_agent_runtime_json_sidecar_with_max_bytes,
remove_agent_runtime_json_sidecar_backup, write_agent_runtime_json_sidecar_with_max_bytes,
};
pub(crate) use models::{
AgentBackgroundFinalizationOutcome, AgentBackgroundTaskOutcome, AgentRuntimeContextBundle,
AgentRuntimeContextWindowTracker, AgentRuntimeContinuationContext,
AgentRuntimeFinalizationCheckpoint, AgentRuntimeFinalizationJournal, AgentRuntimePlanUpdate,
AgentRuntimePlanUpdateStep, AgentRuntimeProjectRevision,
AgentRuntimeProviderActionBatchPreparation, AgentRuntimeProviderRequestSnapshot,
AgentRuntimeToolAction, AgentRuntimeToolObservation, AgentRuntimeToolPlan,
AgentRuntimeVerificationGate, ParsedAgentRuntimeToolPlan,
AGENT_RUNTIME_LOCK_STALE_AFTER_SECONDS,
};
#[cfg(test)]
pub(crate) use provider_control::mark_game_creator_agent_runtime_provider_success_handoff_needs_reconciliation_for_test;
pub(crate) use provider_retry::{
game_creator_agent_runtime_provider_request_id,
game_creator_agent_runtime_transient_retry_backoff_ms,
};
pub(crate) use real_e2e_checkpoint::AgentRuntimeRealE2eAckPublishPhase;
pub(crate) use response_stream::{
game_creator_agent_runtime_response_stream_path,
read_game_creator_agent_runtime_response_stream_at,
};
pub(crate) use run_configuration::{
agent_runtime_run_profile_identity_at, bind_game_creator_agent_runtime_run_profile_at,
game_creator_agent_runtime_project_revision_path,
game_creator_agent_runtime_provider_transient_max_retries_at,
game_creator_agent_runtime_run_profile_binding_path,
read_game_creator_agent_runtime_run_profile_binding,
};
pub(crate) use steering::{
acquire_game_creator_agent_runtime_steer_project_write_lock_with_wait,
consume_game_creator_agent_runtime_steers, game_creator_agent_runtime_accepts_steer,
game_creator_agent_runtime_provider_request_count_for_roots,
game_creator_agent_runtime_steer_ledger_path,
interrupt_game_creator_agent_runtime_provider_request_at,
interrupt_game_creator_agent_runtime_provider_requests_for_roots,
render_game_creator_agent_runtime_steers_for_prompt, steer_game_creator_agent_runtime_task_at,
steer_game_creator_agent_runtime_task_for_profile_at,
validate_game_creator_agent_runtime_steer_notification_at,
};
pub(crate) use verification::{
game_creator_agent_runtime_verification_gate_path,
read_game_creator_agent_runtime_project_revision,
read_game_creator_agent_runtime_verification_gate,
write_game_creator_agent_runtime_project_revision,
write_game_creator_agent_runtime_verification_gate,
};
#[cfg(test)]
pub(crate) use provider_control::{
await_game_creator_agent_runtime_provider_request,
capture_game_creator_agent_runtime_provider_request_snapshot,
};
#[cfg(test)]
pub(crate) use provider_retry::append_game_creator_agent_runtime_provider_lifecycle_for_test;
#[cfg(test)]
pub(crate) use real_e2e_checkpoint::{
await_game_creator_agent_runtime_provider_request_with_control_hook_for_test,
await_game_creator_agent_runtime_provider_request_with_snapshot_for_test,
await_game_creator_agent_runtime_tool_plan_checkpoint_for_test,
publish_game_creator_agent_runtime_tool_plan_checkpoint_ack_for_test,
};