Files
Genarrative/server-rs/crates/platform-agent/src/lib.rs
T
kdletters d2254d1e8c
Project CI / Repository checks (push) Successful in 2m16s
Project CI / Frontend tests (push) Successful in 6m37s
Project CI / Backend tests (push) Failing after 7m45s
Project CI / Native shell tests (push) Failing after 7m6s
抽取多 Agent 编排 crate 并支持运行中自主扩图 (#207)
## 概要

- 抽取通用 `agent-runtime-orchestration` crate,承接多 Agent DAG 的构图校验、ready/wave、下游闭包和全量/返工选择。
- 保留 `platform-agent` 的游戏领域任务与语义路由,避免把 Runtime、Provider、ToolHost 和持久化职责下沉到公共编排层。
- 增加 `GraphProposal` / `TaskProposal` / `GraphEdge` / `GraphLimits`,允许宿主在执行中安全应用 LLM 提出的新增节点和边。
- 扩图采用候选图原子校验:未知 Agent/端点、重复边、自依赖、环及节点/边/深度/扇出预算都会拒绝,失败时原图保持不变;新增节点默认为 `Pending`。

## 验证

- `npm run agent-runtime-orchestration:check`(15 项通过)
- `cargo test --manifest-path server-rs/crates/platform-agent/Cargo.toml`(19 项通过)
- `npm run agc:skill-pack:check`
- `npm run check:encoding`
- `git diff --check`

前端 typecheck 本轮未执行:当前工作树未安装 `node_modules/tsc`,命令会报 `tsc is not recognized`。

Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/207
2026-08-31 10:51:11 +08:00

46 lines
1.8 KiB
Rust

#[cfg(feature = "legacy-creative-agent")]
pub mod apimart_gpt5_adapter;
#[cfg(feature = "legacy-creative-agent")]
pub mod callbacks;
pub mod error;
#[cfg(feature = "legacy-creative-agent")]
pub mod function_agent;
pub mod game_creation;
#[cfg(feature = "legacy-creative-agent")]
pub mod langchain_adapter;
#[cfg(feature = "legacy-creative-agent")]
pub mod output_parser;
#[cfg(feature = "legacy-creative-agent")]
pub mod puzzle_phase1_agent;
#[cfg(feature = "legacy-creative-agent")]
pub mod tool_registry;
#[cfg(feature = "legacy-creative-agent")]
pub use apimart_gpt5_adapter::{
CREATIVE_AGENT_GPT5_MODEL, Gpt5ResponsesAgentClient, build_gpt5_multimodal_request,
};
#[cfg(feature = "legacy-creative-agent")]
pub use callbacks::{
CreativeAgentCallbackEvent, CreativeAgentCallbackKind, CreativeAgentCallbacks,
};
pub use error::PlatformAgentError;
#[cfg(feature = "legacy-creative-agent")]
pub use function_agent::FunctionAgentLimits;
pub use game_creation::{
GAME_CREATION_AGENT_GROUPS, GameCreationAgentGroup, GameCreationAgentPassPlan,
GameCreationAgentRepairRoute, GameCreationTask, GameCreationTaskGraph, GameCreationTaskStatus,
build_game_creation_seed_task_graph, extract_game_creation_evaluator_issues,
extract_game_creation_evaluator_repair_routes, plan_game_creation_agent_pass,
route_game_creation_repair_issues, select_ready_game_creation_tasks,
validate_game_creation_task_agents,
};
#[cfg(feature = "legacy-creative-agent")]
pub use langchain_adapter::LangChainRustAdapter;
#[cfg(feature = "legacy-creative-agent")]
pub use puzzle_phase1_agent::{
CreativeAgentExecutor, MockLangChainRustAgentExecutor, PuzzlePhase1AgentInput,
PuzzlePhase1AgentOutput,
};
#[cfg(feature = "legacy-creative-agent")]
pub use tool_registry::{CreativeAgentTool, CreativeAgentToolRegistry, ToolExecutionBudget};