conversation-session-background-bash-output.json 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-background-bash-output",
  4. "spec": "./test/e2e/conversation-session/conversation-session-background-bash-output.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "bgv-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyIncludes": ["Generate a concise title", "E2E_BGV_"]
  18. },
  19. "response": {
  20. "statusCode": 200,
  21. "text": {
  22. "id": "bgv-title",
  23. "text": "{\"title\":\"Background output\"}",
  24. "inputTokens": 96,
  25. "outputTokens": 16
  26. }
  27. }
  28. },
  29. {
  30. "id": "EXPLICIT-call",
  31. "metadata": {
  32. "kind": "main",
  33. "source": "synthetic",
  34. "timingPolicy": "fast-text",
  35. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  36. },
  37. "maxMatches": 1,
  38. "match": {
  39. "method": "POST",
  40. "pathIncludes": "/messages",
  41. "lastUserMessageIncludes": ["E2E_BGV_EXPLICIT"],
  42. "bodyExcludes": [
  43. "Generate a concise title",
  44. "CRITICAL: Respond with TEXT ONLY",
  45. "toolu_bgv_EXPLICIT"
  46. ]
  47. },
  48. "response": {
  49. "statusCode": 200,
  50. "toolUses": [
  51. {
  52. "id": "toolu_bgv_EXPLICIT",
  53. "name": "Bash",
  54. "input": {
  55. "command": "node \".zcode-e2e/background-bash-output/中文 空格/writer.cjs\" EXPLICIT",
  56. "description": "EXPLICIT background output",
  57. "timeout": 120000,
  58. "run_in_background": true
  59. }
  60. }
  61. ]
  62. }
  63. },
  64. {
  65. "id": "EXPLICIT-done",
  66. "metadata": {
  67. "kind": "main",
  68. "source": "synthetic",
  69. "timingPolicy": "fast-text",
  70. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  71. },
  72. "match": {
  73. "method": "POST",
  74. "pathIncludes": "/messages",
  75. "bodyIncludes": ["toolu_bgv_EXPLICIT", "E2E_BGV_EXPLICIT"],
  76. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  77. },
  78. "response": {
  79. "statusCode": 200,
  80. "text": {
  81. "id": "EXPLICIT-done",
  82. "text": "E2E_BGV_EXPLICIT_DONE",
  83. "inputTokens": 96,
  84. "outputTokens": 16
  85. }
  86. }
  87. },
  88. {
  89. "id": "AUTO-call",
  90. "metadata": {
  91. "kind": "main",
  92. "source": "synthetic",
  93. "timingPolicy": "fast-text",
  94. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  95. },
  96. "maxMatches": 1,
  97. "match": {
  98. "method": "POST",
  99. "pathIncludes": "/messages",
  100. "lastUserMessageIncludes": ["E2E_BGV_AUTO"],
  101. "bodyExcludes": [
  102. "Generate a concise title",
  103. "CRITICAL: Respond with TEXT ONLY",
  104. "toolu_bgv_AUTO"
  105. ]
  106. },
  107. "response": {
  108. "statusCode": 200,
  109. "toolUses": [
  110. {
  111. "id": "toolu_bgv_AUTO",
  112. "name": "Bash",
  113. "input": {
  114. "command": "node \".zcode-e2e/background-bash-output/中文 空格/writer.cjs\" AUTO",
  115. "description": "AUTO background output",
  116. "timeout": 1
  117. }
  118. }
  119. ]
  120. }
  121. },
  122. {
  123. "id": "AUTO-done",
  124. "metadata": {
  125. "kind": "main",
  126. "source": "synthetic",
  127. "timingPolicy": "fast-text",
  128. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  129. },
  130. "match": {
  131. "method": "POST",
  132. "pathIncludes": "/messages",
  133. "bodyIncludes": ["toolu_bgv_AUTO", "E2E_BGV_AUTO"],
  134. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  135. },
  136. "response": {
  137. "statusCode": 200,
  138. "text": {
  139. "id": "AUTO-done",
  140. "text": "E2E_BGV_AUTO_DONE",
  141. "inputTokens": 96,
  142. "outputTokens": 16
  143. }
  144. }
  145. },
  146. {
  147. "id": "PAUSE-call",
  148. "metadata": {
  149. "kind": "main",
  150. "source": "synthetic",
  151. "timingPolicy": "fast-text",
  152. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  153. },
  154. "maxMatches": 1,
  155. "match": {
  156. "method": "POST",
  157. "pathIncludes": "/messages",
  158. "lastUserMessageIncludes": ["E2E_BGV_PAUSE"],
  159. "bodyExcludes": [
  160. "Generate a concise title",
  161. "CRITICAL: Respond with TEXT ONLY",
  162. "toolu_bgv_PAUSE"
  163. ]
  164. },
  165. "response": {
  166. "statusCode": 200,
  167. "toolUses": [
  168. {
  169. "id": "toolu_bgv_PAUSE",
  170. "name": "Bash",
  171. "input": {
  172. "command": "node \".zcode-e2e/background-bash-output/中文 空格/writer.cjs\" PAUSE",
  173. "description": "PAUSE background output",
  174. "timeout": 120000,
  175. "run_in_background": true
  176. }
  177. }
  178. ]
  179. }
  180. },
  181. {
  182. "id": "PAUSE-done",
  183. "metadata": {
  184. "kind": "main",
  185. "source": "synthetic",
  186. "timingPolicy": "fast-text",
  187. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  188. },
  189. "match": {
  190. "method": "POST",
  191. "pathIncludes": "/messages",
  192. "bodyIncludes": ["toolu_bgv_PAUSE", "E2E_BGV_PAUSE"],
  193. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  194. },
  195. "response": {
  196. "statusCode": 200,
  197. "text": {
  198. "id": "PAUSE-done",
  199. "text": "E2E_BGV_PAUSE_DONE",
  200. "inputTokens": 96,
  201. "outputTokens": 16
  202. }
  203. }
  204. },
  205. {
  206. "id": "SCOPE_A-call",
  207. "metadata": {
  208. "kind": "main",
  209. "source": "synthetic",
  210. "timingPolicy": "fast-text",
  211. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  212. },
  213. "maxMatches": 1,
  214. "match": {
  215. "method": "POST",
  216. "pathIncludes": "/messages",
  217. "lastUserMessageIncludes": ["E2E_BGV_SCOPE_A"],
  218. "bodyExcludes": [
  219. "Generate a concise title",
  220. "CRITICAL: Respond with TEXT ONLY",
  221. "toolu_bgv_SCOPE_A"
  222. ]
  223. },
  224. "response": {
  225. "statusCode": 200,
  226. "toolUses": [
  227. {
  228. "id": "toolu_bgv_SCOPE_A",
  229. "name": "Bash",
  230. "input": {
  231. "command": "node \".zcode-e2e/background-bash-output/中文 空格/writer.cjs\" SCOPE_A",
  232. "description": "SCOPE_A background output",
  233. "timeout": 120000,
  234. "run_in_background": true
  235. }
  236. }
  237. ]
  238. }
  239. },
  240. {
  241. "id": "SCOPE_A-done",
  242. "metadata": {
  243. "kind": "main",
  244. "source": "synthetic",
  245. "timingPolicy": "fast-text",
  246. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  247. },
  248. "match": {
  249. "method": "POST",
  250. "pathIncludes": "/messages",
  251. "bodyIncludes": ["toolu_bgv_SCOPE_A", "E2E_BGV_SCOPE_A"],
  252. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  253. },
  254. "response": {
  255. "statusCode": 200,
  256. "text": {
  257. "id": "SCOPE_A-done",
  258. "text": "E2E_BGV_SCOPE_A_DONE",
  259. "inputTokens": 96,
  260. "outputTokens": 16
  261. }
  262. }
  263. },
  264. {
  265. "id": "SCOPE_B-call",
  266. "metadata": {
  267. "kind": "main",
  268. "source": "synthetic",
  269. "timingPolicy": "fast-text",
  270. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  271. },
  272. "maxMatches": 1,
  273. "match": {
  274. "method": "POST",
  275. "pathIncludes": "/messages",
  276. "lastUserMessageIncludes": ["E2E_BGV_SCOPE_B"],
  277. "bodyExcludes": [
  278. "Generate a concise title",
  279. "CRITICAL: Respond with TEXT ONLY",
  280. "toolu_bgv_SCOPE_B"
  281. ]
  282. },
  283. "response": {
  284. "statusCode": 200,
  285. "toolUses": [
  286. {
  287. "id": "toolu_bgv_SCOPE_B",
  288. "name": "Bash",
  289. "input": {
  290. "command": "node \".zcode-e2e/background-bash-output/中文 空格/writer.cjs\" SCOPE_B",
  291. "description": "SCOPE_B background output",
  292. "timeout": 120000,
  293. "run_in_background": true
  294. }
  295. }
  296. ]
  297. }
  298. },
  299. {
  300. "id": "SCOPE_B-done",
  301. "metadata": {
  302. "kind": "main",
  303. "source": "synthetic",
  304. "timingPolicy": "fast-text",
  305. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  306. },
  307. "match": {
  308. "method": "POST",
  309. "pathIncludes": "/messages",
  310. "bodyIncludes": ["toolu_bgv_SCOPE_B", "E2E_BGV_SCOPE_B"],
  311. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  312. },
  313. "response": {
  314. "statusCode": 200,
  315. "text": {
  316. "id": "SCOPE_B-done",
  317. "text": "E2E_BGV_SCOPE_B_DONE",
  318. "inputTokens": 96,
  319. "outputTokens": 16
  320. }
  321. }
  322. },
  323. {
  324. "id": "ERROR-call",
  325. "metadata": {
  326. "kind": "main",
  327. "source": "synthetic",
  328. "timingPolicy": "fast-text",
  329. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  330. },
  331. "maxMatches": 1,
  332. "match": {
  333. "method": "POST",
  334. "pathIncludes": "/messages",
  335. "lastUserMessageIncludes": ["E2E_BGV_ERROR"],
  336. "bodyExcludes": [
  337. "Generate a concise title",
  338. "CRITICAL: Respond with TEXT ONLY",
  339. "toolu_bgv_ERROR"
  340. ]
  341. },
  342. "response": {
  343. "statusCode": 200,
  344. "toolUses": [
  345. {
  346. "id": "toolu_bgv_ERROR",
  347. "name": "Bash",
  348. "input": {
  349. "command": "node \".zcode-e2e/background-bash-output/中文 空格/writer.cjs\" ERROR",
  350. "description": "ERROR background output",
  351. "timeout": 120000,
  352. "run_in_background": true
  353. }
  354. }
  355. ]
  356. }
  357. },
  358. {
  359. "id": "ERROR-done",
  360. "metadata": {
  361. "kind": "main",
  362. "source": "synthetic",
  363. "timingPolicy": "fast-text",
  364. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  365. },
  366. "match": {
  367. "method": "POST",
  368. "pathIncludes": "/messages",
  369. "bodyIncludes": ["toolu_bgv_ERROR", "E2E_BGV_ERROR"],
  370. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  371. },
  372. "response": {
  373. "statusCode": 200,
  374. "text": {
  375. "id": "ERROR-done",
  376. "text": "E2E_BGV_ERROR_DONE",
  377. "inputTokens": 96,
  378. "outputTokens": 16
  379. }
  380. }
  381. },
  382. {
  383. "id": "STOP-call",
  384. "metadata": {
  385. "kind": "main",
  386. "source": "synthetic",
  387. "timingPolicy": "fast-text",
  388. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  389. },
  390. "maxMatches": 1,
  391. "match": {
  392. "method": "POST",
  393. "pathIncludes": "/messages",
  394. "lastUserMessageIncludes": ["E2E_BGV_STOP"],
  395. "bodyExcludes": [
  396. "Generate a concise title",
  397. "CRITICAL: Respond with TEXT ONLY",
  398. "toolu_bgv_STOP"
  399. ]
  400. },
  401. "response": {
  402. "statusCode": 200,
  403. "toolUses": [
  404. {
  405. "id": "toolu_bgv_STOP",
  406. "name": "Bash",
  407. "input": {
  408. "command": "node \".zcode-e2e/background-bash-output/中文 空格/writer.cjs\" STOP",
  409. "description": "STOP background output",
  410. "timeout": 120000,
  411. "run_in_background": true
  412. }
  413. }
  414. ]
  415. }
  416. },
  417. {
  418. "id": "STOP-done",
  419. "metadata": {
  420. "kind": "main",
  421. "source": "synthetic",
  422. "timingPolicy": "fast-text",
  423. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  424. },
  425. "match": {
  426. "method": "POST",
  427. "pathIncludes": "/messages",
  428. "bodyIncludes": ["toolu_bgv_STOP", "E2E_BGV_STOP"],
  429. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  430. },
  431. "response": {
  432. "statusCode": 200,
  433. "text": {
  434. "id": "STOP-done",
  435. "text": "E2E_BGV_STOP_DONE",
  436. "inputTokens": 96,
  437. "outputTokens": 16
  438. }
  439. }
  440. },
  441. {
  442. "id": "PARENT-call",
  443. "metadata": {
  444. "kind": "main",
  445. "source": "synthetic",
  446. "timingPolicy": "fast-text",
  447. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  448. },
  449. "maxMatches": 1,
  450. "match": {
  451. "method": "POST",
  452. "pathIncludes": "/messages",
  453. "lastUserMessageIncludes": ["E2E_BGV_PARENT:"],
  454. "bodyExcludes": [
  455. "Generate a concise title",
  456. "CRITICAL: Respond with TEXT ONLY",
  457. "toolu_bgv_parent"
  458. ]
  459. },
  460. "response": {
  461. "statusCode": 200,
  462. "toolUses": [
  463. {
  464. "id": "toolu_bgv_parent",
  465. "name": "Agent",
  466. "input": {
  467. "description": "background child output",
  468. "prompt": "E2E_BGV_CHILD_WORK: Start the exact background Bash writer fixture and return.",
  469. "subagent_type": "general-purpose",
  470. "run_in_background": true
  471. }
  472. }
  473. ]
  474. }
  475. },
  476. {
  477. "id": "PARENT-done",
  478. "metadata": {
  479. "kind": "main",
  480. "source": "synthetic",
  481. "timingPolicy": "fast-text",
  482. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  483. },
  484. "match": {
  485. "method": "POST",
  486. "pathIncludes": "/messages",
  487. "bodyIncludes": ["E2E_BGV_PARENT:", "toolu_bgv_parent"],
  488. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  489. },
  490. "response": {
  491. "statusCode": 200,
  492. "text": {
  493. "id": "parent-done",
  494. "text": "E2E_BGV_PARENT_DONE"
  495. }
  496. }
  497. },
  498. {
  499. "id": "CHILD-call",
  500. "metadata": {
  501. "kind": "subagent",
  502. "source": "synthetic",
  503. "timingPolicy": "fast-text",
  504. "syntheticReason": "固定 Bash tool call 和主轮收尾,实际进程及 canonical 文件由 barrier 控制;UI 查询不调用模型。"
  505. },
  506. "maxMatches": 1,
  507. "match": {
  508. "method": "POST",
  509. "pathIncludes": "/messages",
  510. "lastUserMessageIncludes": ["E2E_BGV_CHILD_WORK:"],
  511. "bodyExcludes": [
  512. "Generate a concise title",
  513. "CRITICAL: Respond with TEXT ONLY",
  514. "toolu_bgv_CHILD",
  515. "toolu_bgv_parent"
  516. ]
  517. },
  518. "response": {
  519. "statusCode": 200,
  520. "toolUses": [
  521. {
  522. "id": "toolu_bgv_CHILD",
  523. "name": "Bash",
  524. "input": {
  525. "command": "node \".zcode-e2e/background-bash-output/中文 空格/writer.cjs\" CHILD",
  526. "description": "child background output",
  527. "timeout": 120000,
  528. "run_in_background": true
  529. }
  530. }
  531. ]
  532. }
  533. },
  534. {
  535. "id": "CHILD-done",
  536. "metadata": {
  537. "kind": "subagent",
  538. "source": "synthetic",
  539. "timingPolicy": "delayed-text",
  540. "syntheticReason": "child Bash 在真实后台运行时保持 child 模型请求在途,以验证现有子会话条目及 Stop。"
  541. },
  542. "match": {
  543. "method": "POST",
  544. "pathIncludes": "/messages",
  545. "bodyIncludes": ["E2E_BGV_CHILD_WORK:", "toolu_bgv_CHILD"],
  546. "bodyExcludes": [
  547. "Generate a concise title",
  548. "CRITICAL: Respond with TEXT ONLY",
  549. "toolu_bgv_parent"
  550. ]
  551. },
  552. "response": {
  553. "statusCode": 200,
  554. "text": {
  555. "id": "child-done",
  556. "text": "CHILD_READY"
  557. },
  558. "delayMs": 60000
  559. }
  560. }
  561. ]
  562. }