| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520 |
- {
- "version": 1,
- "caseName": "conversation-session-dynamic-workflow-gray-always-on-compile",
- "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-compile.test.ts",
- "fixtures": [
- {
- "id": "dwe-title",
- "description": "E2E_DWE_ 各会话首发的 case-local 标题生成响应。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "E2E_DWE_ 各会话首发会触发默认 title sidecar;固定 case-local 标题响应,并用 marker 隔离跨 case 匹配。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title", "E2E_DWE_"]
- },
- "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json; charset=utf-8"
- },
- "body": "{\"id\":\"dwe-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\": \\\"Workflow Compile E2E\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
- }
- },
- {
- "id": "dwe-inline-skill",
- "description": "DWE-01:先加载工作流 Skill。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_inline_skill"
- ],
- "lastUserMessageIncludes": ["E2E_DWE_INLINE"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_inline_skill",
- "name": "Skill",
- "input": {
- "skill": "dynamic-workflows"
- }
- }
- }
- },
- {
- "id": "dwe-inline-create",
- "description": "DWE-01:内联提交一份编不过的脚本(三个 agent 同名,分析器报两条 9005)。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_INLINE", "toolu_dwe_inline_skill"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_inline_create"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_inline_create",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWE_INLINE",
- "script": "phase(\"检查\");\nconst first = agent(\"E2E_DWE_REVIEWER\");\nconst second = agent(\"E2E_DWE_REVIEWER\");\nconst third = agent(\"E2E_DWE_REVIEWER\");\nreturn \"E2E_DWE_INLINE_RESULT\";"
- }
- }
- }
- },
- {
- "id": "dwe-inline-final",
- "description": "DWE-01:模型读到编译诊断后先停下,turn 收口。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_INLINE", "toolu_dwe_inline_create"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "E2E_DWE_INLINE_FIX"
- ]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwe-inline-final",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWE_INLINE_DONE 脚本有类型错误,稍后修正。"
- }
- }
- },
- {
- "id": "dwe-inline-edit",
- "description": "DWE-01:下一轮直接 Edit 内联草稿(不先 Read)。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_inline_edit"
- ],
- "lastUserMessageIncludes": ["E2E_DWE_INLINE_FIX"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_inline_edit",
- "name": "Edit",
- "input": {
- "file_path": ".zcode/workflow-drafts/E2E_DWE_INLINE.dwf.ts",
- "old_string": "const second = agent(\"E2E_DWE_REVIEWER\");\nconst third = agent(\"E2E_DWE_REVIEWER\");",
- "new_string": "const second = agent(\"E2E_DWE_CHECKER\");\nconst third = agent(\"E2E_DWE_WRITER\");"
- }
- }
- }
- },
- {
- "id": "dwe-inline-resubmit",
- "description": "DWE-01:按 path 重提改过的草稿,确认窗出现。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_INLINE", "toolu_dwe_inline_edit"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_inline_resubmit"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_inline_resubmit",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWE_INLINE_FIXED",
- "path": ".zcode/workflow-drafts/E2E_DWE_INLINE.dwf.ts"
- }
- }
- }
- },
- {
- "id": "dwe-inline-resubmit-final",
- "description": "DWE-01:重提的确认窗被拒绝,给出终态文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_INLINE", "toolu_dwe_inline_resubmit"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwe-inline-resubmit-final",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWE_INLINE_FIX_DONE 好的,不运行。"
- }
- }
- },
- {
- "id": "dwe-gate-create-1",
- "description": "DWE-02:没加载 Skill 就调用 CreateWorkflow。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_gate_create_1"
- ],
- "lastUserMessageIncludes": ["E2E_DWE_GATE"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_gate_create_1",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWE_GATE_RUN_1",
- "script": "phase(\"检查\");\nreturn \"E2E_DWE_GATE_RESULT\";"
- }
- }
- }
- },
- {
- "id": "dwe-gate-skill",
- "description": "DWE-02:读到技能门的拒绝后加载 Skill。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_GATE", "toolu_dwe_gate_create_1"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_gate_skill"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_gate_skill",
- "name": "Skill",
- "input": {
- "skill": "dynamic-workflows"
- }
- }
- }
- },
- {
- "id": "dwe-gate-create-2",
- "description": "DWE-02:加载 Skill 后再调用 CreateWorkflow,确认窗出现。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_GATE", "toolu_dwe_gate_skill"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_gate_create_2"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_gate_create_2",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWE_GATE_RUN_2",
- "script": "phase(\"检查\");\nreturn \"E2E_DWE_GATE_RESULT\";"
- }
- }
- }
- },
- {
- "id": "dwe-gate-final",
- "description": "DWE-02:确认窗被拒绝,给出终态文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_GATE", "toolu_dwe_gate_create_2"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwe-gate-final",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWE_GATE_DONE 好的,不运行。"
- }
- }
- },
- {
- "id": "dwe-path-skill",
- "description": "DWE-03:先加载工作流 Skill。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_path_skill"
- ],
- "lastUserMessageIncludes": ["E2E_DWE_PATH"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_path_skill",
- "name": "Skill",
- "input": {
- "skill": "dynamic-workflows"
- }
- }
- }
- },
- {
- "id": "dwe-path-write",
- "description": "DWE-03:在草稿目录里写一份带元数据块的脚本文件。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_PATH", "toolu_dwe_path_skill"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_path_write"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_path_write",
- "name": "Write",
- "input": {
- "file_path": ".zcode/workflow-drafts/e2e-dwe-path.dwf.ts",
- "content": "/* zcode-workflow\ndescription: E2E_DWE_PATH draft\n*/\nphase(\"检查\");\nconst total: number = \"E2E_DWE_PATH_BAD\";\nreturn String(total);\n"
- }
- }
- }
- },
- {
- "id": "dwe-path-create-1",
- "description": "DWE-03:按 path 提交草稿,编不过。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_PATH", "toolu_dwe_path_write"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_path_create_1"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_path_create_1",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWE_PATH_RUN",
- "path": ".zcode/workflow-drafts/e2e-dwe-path.dwf.ts"
- }
- }
- }
- },
- {
- "id": "dwe-path-edit",
- "description": "DWE-03:按诊断改草稿。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_PATH", "toolu_dwe_path_create_1"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_path_edit"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_path_edit",
- "name": "Edit",
- "input": {
- "file_path": ".zcode/workflow-drafts/e2e-dwe-path.dwf.ts",
- "old_string": "const total: number = \"E2E_DWE_PATH_BAD\";",
- "new_string": "const total: number = 2;"
- }
- }
- }
- },
- {
- "id": "dwe-path-create-2",
- "description": "DWE-03:改完按 path 重提,确认窗出现。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_PATH", "toolu_dwe_path_edit"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwe_path_create_2"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwe_path_create_2",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWE_PATH_RUN",
- "path": ".zcode/workflow-drafts/e2e-dwe-path.dwf.ts"
- }
- }
- }
- },
- {
- "id": "dwe-path-final",
- "description": "DWE-03:确认窗被拒绝,给出终态文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWE_PATH", "toolu_dwe_path_create_2"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwe-path-final",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWE_PATH_DONE 好的,不运行。"
- }
- }
- }
- ]
- }
|