diff --git a/apps/ai-game-creator-shell/src/App.tsx b/apps/ai-game-creator-shell/src/App.tsx index 604816870..79dce0eca 100644 --- a/apps/ai-game-creator-shell/src/App.tsx +++ b/apps/ai-game-creator-shell/src/App.tsx @@ -34,7 +34,6 @@ import { CONVERSATION_VISIBLE_STEP, createLocalProjectId, PROJECT_SUPERVISOR_AGENT_ID, - PROJECT_SUPERVISOR_PLAN_SOURCE, seedManifest, } from './app/constants'; import { useEscapeToClose } from './app/dialogs'; @@ -6085,27 +6084,10 @@ export function App({ return; } const runtimeAtSubmission = projectSupervisorRuntimeRef.current; - // 做方案入口独立成链。首次提交时本项目还没有任何 Supervisor run,只能靠首页 - // 带下来的 startMode 判断;之后由 plan 根 run 自己的 source 接管,做游戏与 - // 做素材两条链路不受影响。 - const planningEntry = - workspaceProjectKind === 'web' && - (runtimeAtSubmission?.source === PROJECT_SUPERVISOR_PLAN_SOURCE || - (planningStartMode && !runtimeAtSubmission)); - if ( - planningEntry && - runtimeAtSubmission && - runtimeAtSubmission.source === PROJECT_SUPERVISOR_PLAN_SOURCE && - !isAgentRuntimeTerminalState(runtimeAtSubmission) - ) { - setProjectSupervisorRuntimeError('请先完成当前立项策划步骤'); - return; - } const submissionRoute = resolveProjectSupervisorRuntimeSubmission({ workspaceProjectKind, orchestrationMode, supervisorChatOnly, - planningEntry, }); const submission = await submitProjectSupervisorRuntimeTask({ invoke, diff --git a/apps/ai-game-creator-shell/src/app/constants.ts b/apps/ai-game-creator-shell/src/app/constants.ts index 0a936c1fa..81313f345 100644 --- a/apps/ai-game-creator-shell/src/app/constants.ts +++ b/apps/ai-game-creator-shell/src/app/constants.ts @@ -16,15 +16,6 @@ export const CONVERSATION_INITIAL_VISIBLE_COUNT = 20; export const CONVERSATION_VISIBLE_STEP = 20; export const AGENT_CHAT_SCROLL_BOTTOM_THRESHOLD = 48; export const PROJECT_SUPERVISOR_AGENT_ID = 'project-supervisor'; -/** - * 立项策划链路的 run `source`。 - * - * 这是全前端唯一的字面量出处:`AgentRuntimeState.source` 在类型上只是 `string`, - * 改名不会有任何编译期提示,所以判据必须收敛到这一个常量上。`as const` 让它同时 - * 能充当 `ProjectSupervisorRuntimeSubmission['source']` 的成员。 - */ -export const PROJECT_SUPERVISOR_PLAN_SOURCE = - 'project-supervisor-plan' as const; export const launcherNotifications: Array<{ label: string; detail: string; diff --git a/apps/ai-game-creator-shell/src/features/agent-runtime/model.ts b/apps/ai-game-creator-shell/src/features/agent-runtime/model.ts index 040cc7160..386cefa8b 100644 --- a/apps/ai-game-creator-shell/src/features/agent-runtime/model.ts +++ b/apps/ai-game-creator-shell/src/features/agent-runtime/model.ts @@ -2,11 +2,7 @@ import type { GameCreationAppManifest, GameCreationAppTaskState, } from '../../../../../packages/shared/src/contracts/gameCreationApp'; -import { - PROJECT_SUPERVISOR_AGENT_ID, - PROJECT_SUPERVISOR_PLAN_SOURCE, - seedManifest, -} from '../../app/constants'; +import { PROJECT_SUPERVISOR_AGENT_ID, seedManifest } from '../../app/constants'; import type { AgentConversationSessionListResult, AgentConversationSessionRecord, @@ -31,28 +27,18 @@ const AGENT_RUNTIME_MESSAGE_CORRELATION_PATTERN = /^[0-9a-f]{32}$/; export type ProjectSupervisorRuntimeSubmission = { runProfile: 'standard' | 'autonomous-game-build'; - source: 'project-supervisor-gui' | typeof PROJECT_SUPERVISOR_PLAN_SOURCE; + source: 'project-supervisor-gui'; }; export function resolveProjectSupervisorRuntimeSubmission({ workspaceProjectKind, orchestrationMode, supervisorChatOnly, - planningEntry = false, }: { workspaceProjectKind: 'web' | 'godot' | 'cocos'; orchestrationMode: 'single-supervisor' | 'professional-dag'; supervisorChatOnly: boolean; - planningEntry?: boolean; }): ProjectSupervisorRuntimeSubmission { - // 立项策划入口独立成链:命中时固定 standard + plan source,不参与下面按 - // godot / chat / DAG 的分流,也不改动做游戏与做素材的既有路由。 - if (planningEntry && workspaceProjectKind === 'web') { - return { - runProfile: 'standard', - source: PROJECT_SUPERVISOR_PLAN_SOURCE, - }; - } if (workspaceProjectKind === 'godot' || supervisorChatOnly) { return { runProfile: 'standard', @@ -809,33 +795,11 @@ export function agentRuntimeNeedsUserInput( } export const AGENT_RUNTIME_USER_INPUT_REQUEST_TOOL = 'user.input_request'; -export const AGENT_RUNTIME_PLAN_SUBMIT_GDD_TOOL = 'plan.submit_gdd'; - -// 有两个 pending 动作不是「等待批准的动作」,而是某张专用卡的载体:Runtime 把内容停在 -// pending 上,真正的交互面是另一个组件。 -// -// - `user.input_request`:子 Agent 以 needs-user-input 终态退出后,Runtime 在 parent-wake -// 屏障处按信封原文构造这个 pending(`ensure_static_delegate_user_input_wait_at_locked`), -// 同一份问题再投影成 `userInputRequest`,交互面是问答卡。 -// - `plan.submit_gdd`:策划子 Agent 提交 Fast GDD 后,`planning/pending.json` 的 -// 的批准 / 修改 / 退回。 -// -// 两者都没有「确认 / 拒绝」语义:`user.input_request` 从来不在 -// `GAME_CREATION_APP_COMMANDS` 的 confirm 集合里;`plan.submit_gdd` 更是被运行时策略明确 -// 拒绝转成通用确认 pending(「Runtime-owned create-only 提交」),点确认必然失败。 -// -// 通用待确认卡按 `tool` + `inputSummary` 渲染,套到它们身上就是把同一个请求画两遍——标题 -// 是原始工具名,副标题是 `questionCount=… · questionsSha256=…` 这种给日志看的取证摘要, -// 还会把真正该看的那张卡压在下面。所以这里统一把通用确认面判掉。 -const AGENT_RUNTIME_DEDICATED_CARD_TOOLS = new Set([ - AGENT_RUNTIME_USER_INPUT_REQUEST_TOOL, - AGENT_RUNTIME_PLAN_SUBMIT_GDD_TOOL, -]); export function agentRuntimePendingActionHasDedicatedCard( action: AgentRuntimePendingToolActionSummary | null | undefined, ) { - return Boolean(action && AGENT_RUNTIME_DEDICATED_CARD_TOOLS.has(action.tool)); + return action?.tool === AGENT_RUNTIME_USER_INPUT_REQUEST_TOOL; } export function matchingAgentRuntimeForSteer( @@ -1558,9 +1522,6 @@ export function projectSupervisorCollaboratingAgentRuntimes( } export function projectProfessionalAgentLabel(agentId: string) { - if (agentId === 'project-planning') { - return '立项策划 Agent'; - } if (agentId === 'design-foundation') { return '玩法策划 Agent'; } diff --git a/docs/project-memory/plans/【实施计划】退役策划Agent V1V2解耦清理-2026-09-15.md b/docs/project-memory/plans/【实施计划】退役策划Agent V1V2解耦清理-2026-09-15.md index d5249606c..6b6b92655 100644 --- a/docs/project-memory/plans/【实施计划】退役策划Agent V1V2解耦清理-2026-09-15.md +++ b/docs/project-memory/plans/【实施计划】退役策划Agent V1V2解耦清理-2026-09-15.md @@ -8,7 +8,7 @@ ## 一句话交付结果 -删除退役策划 V1/V2 和 Supervisor 产品运行链路的现役前端残留,让当前 Design Agent 独立运行、做游戏走 DirectCodex 并恢复仓库编译,同时不主动清理 16 Agent DAG。 +删除退役策划 V1/V2 及其耦合的 Supervisor 产品残留,让当前 Design Agent 独立运行、做游戏走 DirectCodex 并恢复仓库编译;保留通用 Supervisor 和做游戏 16 Agent DAG。 ## 验收判据 @@ -29,7 +29,7 @@ 明确不修改: - `directCodex` 主链路和当前 Design Agent。 -- 16 Agent DAG、`supervisor-swarm` 测试和通用 Runtime 编排;只处理删除 Supervisor 产品入口后直接造成的编译错误。 +- 16 Agent DAG、`supervisor-swarm` 测试和通用 Runtime 编排;只处理删除策划耦合后直接造成的编译错误。 - 当前 Design Agent Rust runtime、Design Agent 资源包和 Design Agent IPC 协议。 - 公开 API、SpacetimeDB schema、迁移和历史持久化数据格式。 @@ -43,7 +43,7 @@ ### 提交二:删除 App 旧 V2 会话控制流 -- 删除 Supervisor 产品入口、恢复、轮询和聊天提交链路。 +- 删除仅服务旧策划的 Supervisor 产品入口、恢复、轮询和聊天提交分支。 - 删除旧 V2 session/GDD 状态和 helper。 - 删除项目打开、消息发送、问询回答、审批和旧流式事件分支。 - 将“做方案”只连接到当前 Design Agent hydrate/continue/decide 路径,将“做游戏/做素材”只连接到 DirectCodex。 diff --git a/docs/project-memory/plans/【里程碑】退役策划Agent V1V2解耦清理-2026-09-15.md b/docs/project-memory/plans/【里程碑】退役策划Agent V1V2解耦清理-2026-09-15.md index c216493db..ccc9a2dd9 100644 --- a/docs/project-memory/plans/【里程碑】退役策划Agent V1V2解耦清理-2026-09-15.md +++ b/docs/project-memory/plans/【里程碑】退役策划Agent V1V2解耦清理-2026-09-15.md @@ -9,12 +9,12 @@ ## 目标 -移除旧版策划 Agent V1、V2 以及已退役 Supervisor 产品运行链路的前端会话、审批、数据适配、测试契约和确定失效的展示残留,使“做方案”只使用当前 Design Agent、做游戏只使用 DirectCodex;删除过程中产生的编译失败和过时测试同步修复。 +移除旧版策划 Agent V1、V2 的前端会话、审批、数据适配、测试契约和确定失效的展示残留;仅在删除策划链路时遇到已退役 Supervisor 功能耦合时一并删除该耦合,使“做方案”只使用当前 Design Agent、做游戏只使用 DirectCodex。 ## 范围 - 解除当前 Design Agent 与旧 `planningV2` / `PlanGdd` 状态命名和控制流的耦合。 -- 删除 Supervisor 作为产品入口、会话恢复、Runtime 轮询和聊天提交链路。 +- 删除仅服务旧策划的 Supervisor 产品入口、会话恢复、Runtime 轮询和聊天提交分支;保留通用 Supervisor 与做游戏 DAG。 - 删除旧 V2 会话 hydrate、start、continue、审批和用户问询分支。 - 删除旧 V2 TypeScript 会话适配层、旧 GDD 前端类型、测试 mock、旧事件契约和专属样式。 - 清理确定没有现役调用方的旧策划身份说明、测试 fixture 和文档当前入口。 @@ -22,7 +22,7 @@ ## 不在范围内 -- 不主动扫描、重构或整体删除做游戏 Agent 的 16 Agent DAG;仅保留其底层代码和测试到编译所需程度。 +- 不主动扫描、重构或整体删除做游戏 Agent 的 16 Agent DAG;只有策划删除直接造成编译或测试失败时才做最小修复。 - 不删除 DirectCodex 或当前 Design Agent;必要时保留被两者复用的中性聊天表现组件。 - 不为旧项目新增兼容层、迁移器、墓碑注释或退役行为测试。 - 不修改 SpacetimeDB schema、公开 API、持久化迁移和现役 Design Agent 协议。