| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596 |
- {
- "version": 1,
- "caseName": "conversation-session-dynamic-workflow-gray-always-on-confirm",
- "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-confirm.test.ts",
- "fixtures": [
- {
- "id": "dwc-title",
- "description": "E2E_DWC_ 各会话首发的 case-local 标题生成响应。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "E2E_DWC_ 各会话首发会触发默认 title sidecar;固定 case-local 标题响应,并用 marker 隔离跨 case 匹配。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title", "E2E_DWC_"]
- },
- "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json; charset=utf-8"
- },
- "body": "{\"id\":\"dwc-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\": \\\"Workflow Confirm 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": "dwc-run-notified",
- "description": "放行后的 run 完成,主代理读到 <task-notification> 后的收尾文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "task-notification",
- "source": "synthetic",
- "syntheticReason": "放行的 run 由真实引擎跑完并发出真实通知;回放只固定主代理读到通知后的收尾文本。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
- "lastUserMessageIncludes": ["<task-notification>"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwc-run-notified",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWC_NOTIFIED 工作流已完成。"
- }
- }
- },
- {
- "id": "dwc-deny-skill",
- "description": "DWC-01:先加载工作流 Skill。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_deny_skill"
- ],
- "lastUserMessageIncludes": ["E2E_DWC_DENY"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_deny_skill",
- "name": "Skill",
- "input": {
- "skill": "dynamic-workflows"
- }
- }
- }
- },
- {
- "id": "dwc-deny-create",
- "description": "DWC-01:CreateWorkflow 打开确认窗。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_DENY", "toolu_dwc_deny_skill"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_deny_create"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_deny_create",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWC_DENY_RUN",
- "script": "phase(\"检查\");\nreturn \"E2E_DWC_DENY_RESULT\";"
- }
- }
- }
- },
- {
- "id": "dwc-deny-final",
- "description": "DWC-01:拒绝后模型读到未获批准的结果,给出终态文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_DENY", "toolu_dwc_deny_create"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwc-deny-final",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWC_DENY_DONE 好的,不运行。"
- }
- }
- },
- {
- "id": "dwc-refine-skill",
- "description": "DWC-02:先加载工作流 Skill。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_refine_skill"
- ],
- "lastUserMessageIncludes": ["E2E_DWC_REFINE_START"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_refine_skill",
- "name": "Skill",
- "input": {
- "skill": "dynamic-workflows"
- }
- }
- }
- },
- {
- "id": "dwc-refine-create-1",
- "description": "DWC-02:第一次 CreateWorkflow 打开确认窗。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_REFINE_START", "toolu_dwc_refine_skill"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_refine_create_1"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_refine_create_1",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWC_REFINE_RUN_1",
- "script": "phase(\"检查\");\nreturn \"E2E_DWC_REFINE_1_RESULT\";"
- }
- }
- }
- },
- {
- "id": "dwc-refine-create-2",
- "description": "DWC-02:模型读到 Refine 反馈后修订重提,确认窗再次出现。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_REFINE_START", "toolu_dwc_refine_create_1"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_refine_create_2"
- ],
- "lastUserMessageIncludes": ["E2E_DWC_REFINE_FEEDBACK"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_refine_create_2",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWC_REFINE_RUN_2",
- "script": "phase(\"检查\");\nreturn \"E2E_DWC_REFINE_2_RESULT\";"
- }
- }
- }
- },
- {
- "id": "dwc-refine-final",
- "description": "DWC-02:修订后的窗被拒绝,给出终态文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_REFINE_START", "toolu_dwc_refine_create_2"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwc-refine-final",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWC_REFINE_DONE 好的,不运行。"
- }
- }
- },
- {
- "id": "dwc-session-skill",
- "description": "DWC-03:先加载工作流 Skill。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_session_skill"
- ],
- "lastUserMessageIncludes": ["E2E_DWC_SESSION_FIRST"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_session_skill",
- "name": "Skill",
- "input": {
- "skill": "dynamic-workflows"
- }
- }
- }
- },
- {
- "id": "dwc-session-create-1",
- "description": "DWC-03:第一次 CreateWorkflow 打开确认窗,用户选本会话内始终允许。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_SESSION_FIRST", "toolu_dwc_session_skill"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_session_create_1"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_session_create_1",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWC_SESSION_RUN_1",
- "script": "phase(\"检查\");\nreturn \"E2E_DWC_SESSION_1_RESULT\";"
- }
- }
- }
- },
- {
- "id": "dwc-session-started-1",
- "description": "DWC-03:第一次 run 启动后的文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_SESSION_FIRST", "toolu_dwc_session_create_1"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "E2E_DWC_SESSION_AGAIN"
- ]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwc-session-started-1",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWC_SESSION_FIRST_STARTED 工作流已启动。"
- }
- }
- },
- {
- "id": "dwc-session-create-2",
- "description": "DWC-03:同一会话第二次 CreateWorkflow,不再弹窗。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_SESSION_FIRST", "toolu_dwc_session_create_1"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_session_create_2"
- ],
- "lastUserMessageIncludes": ["E2E_DWC_SESSION_AGAIN"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_session_create_2",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWC_SESSION_RUN_2",
- "script": "phase(\"检查\");\nreturn \"E2E_DWC_SESSION_2_RESULT\";"
- }
- }
- }
- },
- {
- "id": "dwc-session-started-2",
- "description": "DWC-03:第二次 run 启动后的文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_SESSION_AGAIN", "toolu_dwc_session_create_2"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwc-session-started-2",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWC_SESSION_AGAIN_STARTED 工作流已启动。"
- }
- }
- },
- {
- "id": "dwc-session-new-skill",
- "description": "DWC-03:新会话先加载工作流 Skill。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_session_new_skill"
- ],
- "lastUserMessageIncludes": ["E2E_DWC_SESSION_NEW"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_session_new_skill",
- "name": "Skill",
- "input": {
- "skill": "dynamic-workflows"
- }
- }
- }
- },
- {
- "id": "dwc-session-new-create",
- "description": "DWC-03:新会话的 CreateWorkflow,会话授权不跨会话,确认窗再次出现。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_SESSION_NEW", "toolu_dwc_session_new_skill"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_session_new_create"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_session_new_create",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWC_SESSION_RUN_NEW",
- "script": "phase(\"检查\");\nreturn \"E2E_DWC_SESSION_NEW_RESULT\";"
- }
- }
- }
- },
- {
- "id": "dwc-session-new-final",
- "description": "DWC-03:新会话的窗被拒绝,给出终态文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_SESSION_NEW", "toolu_dwc_session_new_create"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwc-session-new-final",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWC_SESSION_NEW_DONE 好的,不运行。"
- }
- }
- },
- {
- "id": "dwc-adjust-skill",
- "description": "DWC-04:先加载工作流 Skill。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_adjust_skill"
- ],
- "lastUserMessageIncludes": ["E2E_DWC_ADJUST"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_adjust_skill",
- "name": "Skill",
- "input": {
- "skill": "dynamic-workflows"
- }
- }
- }
- },
- {
- "id": "dwc-adjust-create",
- "description": "DWC-04:不带 max_concurrency 的 CreateWorkflow,窗里的并发步进器从默认值起。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_ADJUST", "toolu_dwc_adjust_skill"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_dwc_adjust_create"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_dwc_adjust_create",
- "name": "CreateWorkflow",
- "input": {
- "name": "E2E_DWC_ADJUST_RUN",
- "script": "phase(\"检查\");\nreturn \"E2E_DWC_ADJUST_RESULT\";"
- }
- }
- }
- },
- {
- "id": "dwc-adjust-started",
- "description": "DWC-04:按调整后的设置启动后的文本。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "确认窗只由模型调用 CreateWorkflow 打开;回放只固定 Skill / CreateWorkflow 的模型选择与收尾文本,真实 Skill 加载、编译、确认窗、应答、run 启动与通知都走产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_DWC_ADJUST", "toolu_dwc_adjust_create"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "dwc-adjust-started",
- "inputTokens": 80,
- "outputTokens": 8,
- "text": "E2E_DWC_ADJUST_STARTED 工作流已启动。"
- }
- }
- }
- ]
- }
|