Commit 8d8d8f1
committed
Fix bash overflow temp directory to use Runtime abstraction
The bash tool overflow feature writes large outputs to temp files when they
exceed display limits. The previous implementation broke with SSH runtimes
because temp directories were created using local filesystem operations
(fs.mkdirSync) but passed to runtime.writeFile() which needs runtime-appropriate
paths.
Changes:
- Renamed 'tempDir' to 'runtimeTempDir' throughout for clarity
- StreamManager.createTempDirForStream() now uses runtime.exec('mkdir -p')
- Stream cleanup now uses runtime.exec('rm -rf') for temp directory removal
- Pass Runtime parameter through startStream() to enable temp dir operations
- Store Runtime in WorkspaceStreamInfo for cleanup access
- Updated ToolConfiguration interface (tempDir -> runtimeTempDir)
- Updated all tests to use runtimeTempDir
This ensures temp directories are created and cleaned up in the correct
location (local for LocalRuntime, remote for SSHRuntime) while preserving
the existing cleanup guarantees when streams end.1 parent 88b0c80 commit 8d8d8f1
File tree
5 files changed
+64
-36
lines changed- src
- services
- tools
- utils/tools
5 files changed
+64
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
525 | | - | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
526 | 529 | | |
527 | 530 | | |
528 | 531 | | |
529 | 532 | | |
530 | 533 | | |
531 | 534 | | |
532 | | - | |
| 535 | + | |
533 | 536 | | |
534 | 537 | | |
535 | 538 | | |
| |||
694 | 697 | | |
695 | 698 | | |
696 | 699 | | |
| 700 | + | |
697 | 701 | | |
698 | 702 | | |
699 | 703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
242 | 245 | | |
243 | 246 | | |
244 | 247 | | |
| 248 | + | |
| 249 | + | |
245 | 250 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
250 | 266 | | |
251 | 267 | | |
252 | 268 | | |
| |||
429 | 445 | | |
430 | 446 | | |
431 | 447 | | |
432 | | - | |
| 448 | + | |
| 449 | + | |
433 | 450 | | |
434 | 451 | | |
435 | 452 | | |
| |||
508 | 525 | | |
509 | 526 | | |
510 | 527 | | |
511 | | - | |
| 528 | + | |
| 529 | + | |
512 | 530 | | |
513 | 531 | | |
514 | 532 | | |
| |||
961 | 979 | | |
962 | 980 | | |
963 | 981 | | |
964 | | - | |
965 | | - | |
| 982 | + | |
| 983 | + | |
966 | 984 | | |
967 | | - | |
968 | | - | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
969 | 994 | | |
970 | | - | |
| 995 | + | |
971 | 996 | | |
972 | 997 | | |
973 | 998 | | |
| |||
1090 | 1115 | | |
1091 | 1116 | | |
1092 | 1117 | | |
| 1118 | + | |
1093 | 1119 | | |
1094 | 1120 | | |
1095 | 1121 | | |
| |||
1123 | 1149 | | |
1124 | 1150 | | |
1125 | 1151 | | |
1126 | | - | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
1132 | 1155 | | |
1133 | 1156 | | |
1134 | 1157 | | |
1135 | 1158 | | |
1136 | 1159 | | |
1137 | | - | |
| 1160 | + | |
| 1161 | + | |
1138 | 1162 | | |
1139 | 1163 | | |
1140 | 1164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
| 486 | + | |
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | | - | |
| 426 | + | |
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments