清理旧策划前端测试工厂残留
删除无消费者的 planningResponseStream、createPlanGddStateView 工厂及导出 移除失效的 PlanGddStateViewV1 类型引用 同步现役文档中的旧策划测试退役边界
This commit is contained in:
@@ -375,45 +375,6 @@ function mockRoleAgentReply() {
|
||||
return roleAgentMockReply;
|
||||
}
|
||||
|
||||
function planningResponseStream({
|
||||
runId,
|
||||
sequence,
|
||||
accumulatedText,
|
||||
status = 'streaming',
|
||||
appliedSteerCursor = 0,
|
||||
responseRevision = 0,
|
||||
loopIteration = 1,
|
||||
overrides = {},
|
||||
}: {
|
||||
runId: string;
|
||||
sequence: number;
|
||||
accumulatedText: string;
|
||||
status?: 'streaming' | 'ready' | 'committed' | 'discarded' | 'failed';
|
||||
appliedSteerCursor?: number;
|
||||
responseRevision?: number;
|
||||
loopIteration?: number;
|
||||
overrides?: Record<string, unknown>;
|
||||
}) {
|
||||
return {
|
||||
schemaVersion: 'game-creator-runtime-response-stream.v1',
|
||||
agentId: 'planning-agent-v2',
|
||||
taskId: 'planning-agent-v2',
|
||||
sessionId: 'planning-session-active',
|
||||
runId,
|
||||
requestKind: 'final-reply',
|
||||
requestSlot: `final-reply-loop-${loopIteration}-revision-${responseRevision}`,
|
||||
appliedSteerCursor,
|
||||
responseRevision,
|
||||
sequence,
|
||||
status,
|
||||
accumulatedText,
|
||||
finishReason: status === 'ready' || status === 'committed' ? 'stop' : null,
|
||||
startedAt: 6000,
|
||||
updatedAt: 6000 + sequence,
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
function agentRuntimeUserInputRequest({
|
||||
agentId,
|
||||
sessionId,
|
||||
@@ -464,150 +425,6 @@ function agentRuntimeUserInputRequest({
|
||||
};
|
||||
}
|
||||
|
||||
function createPlanGddStateView(
|
||||
overrides: Partial<PlanGddStateViewV1> = {},
|
||||
): PlanGddStateViewV1 {
|
||||
const gddRef = {
|
||||
gddId: 'gdd-plan-0001',
|
||||
version: 1,
|
||||
fingerprint: 'sha256-serde-json-v2:1111111111111111',
|
||||
};
|
||||
return {
|
||||
schemaVersion: 'plan-gdd-state-view.v1',
|
||||
projectId: 'local-project-draft',
|
||||
gddId: gddRef.gddId,
|
||||
state: 'ready_for_approval',
|
||||
session: {
|
||||
sessionId: 'plan-session-0001',
|
||||
sessionRevision: 3,
|
||||
sessionFingerprint: 'sha256-serde-json-v2:2222222222222222',
|
||||
phase: 'awaiting_gdd_approval',
|
||||
clarificationRound: 2,
|
||||
repairDepth: 0,
|
||||
accumulatedAgentMillis: 42_000,
|
||||
activeRunId: null,
|
||||
awaitingAnswerFor: null,
|
||||
decisionStateCounts: {
|
||||
confirmed: 2,
|
||||
defaultPending: 1,
|
||||
prototypePending: 0,
|
||||
},
|
||||
},
|
||||
versions: [
|
||||
{
|
||||
gddRef,
|
||||
status: 'ready_for_approval',
|
||||
approvalRequestId: 'gdd-approval-0001',
|
||||
createdAtUtc: '2026-08-18T00:00:00Z',
|
||||
decision: null,
|
||||
},
|
||||
],
|
||||
displayGdd: {
|
||||
schemaVersion: 'plan-gdd.v1',
|
||||
projectId: 'local-project-draft',
|
||||
gddId: gddRef.gddId,
|
||||
version: gddRef.version,
|
||||
submissionId: 'action-0123456789abcdef01234567',
|
||||
approvalRequestId: 'gdd-approval-0001',
|
||||
actionFingerprint: 'a'.repeat(64),
|
||||
agentId: 'project-planning',
|
||||
source: 'agent-delegate',
|
||||
runProfile: 'standard',
|
||||
runProfileBindingFingerprint: 'b'.repeat(64),
|
||||
rootAgentId: 'planning-agent-v2',
|
||||
rootRunId: 'run-plan-root-0001',
|
||||
delegationId: 'delegation-0001',
|
||||
sessionId: 'plan-session-0001',
|
||||
sourceSessionRevision: 2,
|
||||
sourceSessionFingerprint: 'sha256-serde-json-v2:3333333333333333',
|
||||
createdByRunId: 'run-plan-child-0001',
|
||||
createdAtUtc: '2026-08-18T00:00:00Z',
|
||||
fingerprint: gddRef.fingerprint,
|
||||
game: {
|
||||
title: '灯塔守夜人',
|
||||
oneLiner: '在潮汐涨落之间调度光束,护送迷航的船只回港。',
|
||||
genre: { primary: '策略', fusion: null },
|
||||
artStyle: {
|
||||
visualType: '像素',
|
||||
keywords: ['夜色', '海雾'],
|
||||
moodAndColor: '冷蓝为主,暖黄光束作为唯一高光。',
|
||||
mvpArtBoundary: '只做灯塔与三类船只的静帧。',
|
||||
},
|
||||
pillars: [
|
||||
{
|
||||
name: '光束调度',
|
||||
playerFeel: '在有限视野里做取舍。',
|
||||
mechanism: '每回合只能照亮一个扇区。',
|
||||
decisionState: 'confirmed',
|
||||
basis: null,
|
||||
},
|
||||
],
|
||||
coreLoop: ['观察潮汐', '分配光束', '结算返港'],
|
||||
targetUsers: {
|
||||
coreUsers: '喜欢短局策略的玩家',
|
||||
preferences: '偏好可预测的规则',
|
||||
sessionLength: '单局 5 分钟',
|
||||
referenceGames: ['灯塔物语'],
|
||||
},
|
||||
platformFacts: {
|
||||
runtime: 'web',
|
||||
viewports: ['desktop', 'mobile'],
|
||||
inputs: ['pointer'],
|
||||
preview: '本地预览',
|
||||
},
|
||||
mvpSystems: [
|
||||
{
|
||||
system: '潮汐时钟',
|
||||
minimalFunction: '固定三段潮汐循环。',
|
||||
whyRequired: '没有它就没有节奏压力。',
|
||||
verifyMethod: '观察一局内三段是否各触发一次。',
|
||||
decisionState: 'confirmed',
|
||||
basis: null,
|
||||
},
|
||||
],
|
||||
outOfScope: ['多人对战'],
|
||||
creatorTips: {
|
||||
doFirst: '先做潮汐时钟。',
|
||||
deferForNow: '暂缓天气系统。',
|
||||
howToVerify: '单局跑满三段潮汐。',
|
||||
expandWhen: '核心循环稳定后再加船种。',
|
||||
},
|
||||
},
|
||||
decisions: [
|
||||
{
|
||||
id: 'decision-0001',
|
||||
topic: '光束是否可分裂',
|
||||
state: 'confirmed',
|
||||
answerSource: 'user_option',
|
||||
round: 1,
|
||||
answerSummary: '不可分裂,保持取舍压力。',
|
||||
basis: null,
|
||||
},
|
||||
],
|
||||
prototypeValidationItems: [
|
||||
{
|
||||
id: 'proto-0001',
|
||||
question: '单扇区照明是否足够做出取舍?',
|
||||
microPrototype: '纸面推演三回合。',
|
||||
observation: '玩家是否出现犹豫。',
|
||||
passCriterion: '三回合内至少一次改变计划。',
|
||||
},
|
||||
],
|
||||
},
|
||||
pendingApproval: {
|
||||
gddRef,
|
||||
pendingActionId: 'action-0123456789abcdef01234567',
|
||||
actionFingerprint: 'a'.repeat(64),
|
||||
approvalRequestId: 'gdd-approval-0001',
|
||||
sessionId: 'plan-session-0001',
|
||||
runId: 'run-plan-root-0001',
|
||||
},
|
||||
approvedGddRef: null,
|
||||
recoveryPending: false,
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 运行态事件里的条目身份:只有 `item.started` / `item.completed` 带条目。
|
||||
*
|
||||
@@ -1525,7 +1342,6 @@ export {
|
||||
composerValue,
|
||||
createGameCreationAppManifest,
|
||||
createGameCreationAppSeedTasks,
|
||||
createPlanGddStateView,
|
||||
createProjectChatRuntimeHarness,
|
||||
deriveAgentStatusCards,
|
||||
describe,
|
||||
@@ -1540,7 +1356,6 @@ export {
|
||||
nativeClipboardMock,
|
||||
openResourceFilterPanel,
|
||||
pickProjectFromLauncher,
|
||||
planningResponseStream,
|
||||
ProjectDevelopmentView,
|
||||
queryResourceSelectButton,
|
||||
React,
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
策划 V1、策划会话 Runtime V2 均已删除,当前“做方案”只使用独立 Design Agent,现行合同见[策划 Agent 生产迁移与工作区浏览](./【技术方案】策划Agent生产迁移与工作区浏览-2026-09-10.md)。旧 V1/V2 Runtime、命令、会话、审批卡、身份白名单和专属测试不作为兼容或恢复目标;历史方案中的 lifecycle v3、planning binding 等要求不能作为孤立代码的保留依据。共享能力按现役调用判断,不因名称相似删除当前 Design Agent 或通用 Runtime。
|
||||
|
||||
前端测试遵循相同退役边界:`appSurface` harness 不保留无消费者的旧策划响应流、GDD 状态工厂及其导出,不再引用已删除的旧 PlanGdd 类型;现役 Design Agent 测试使用当前会话与工作区契约。
|
||||
|
||||
## 固定视觉门禁与任务身份的现行边界
|
||||
|
||||
图片产物按项目需求选择,不恢复按固定 Agent 身份要求视觉资源的旧完成门禁。已停用门禁的空调用、不可达检查和无消费者包装直接清理;现役 `validate_manifest_required_visual_asset`、图片检查、内部切片提交及各完成合同继续按各自调用场景执行,不因清理旧门禁而一并删除。
|
||||
|
||||
Reference in New Issue
Block a user