@@ -243,27 +243,24 @@ export class StreamManager extends EventEmitter {
243243 * - Agent mistakes when copying/manipulating paths
244244 * - Harder to read in tool outputs
245245 * - Potential path length issues on some systems
246- *
246+ *
247247 * Uses the Runtime abstraction so temp directories work for both local and SSH runtimes.
248248 */
249- public async createTempDirForStream (
250- streamToken : StreamToken ,
251- runtime : Runtime
252- ) : Promise < string > {
249+ public async createTempDirForStream ( streamToken : StreamToken , runtime : Runtime ) : Promise < string > {
253250 // Create directory and get absolute path (works for both local and remote)
254251 // Use 'cd' + 'pwd' to resolve ~ to absolute path
255252 const command = `mkdir -p ~/.cmux-tmp/${ streamToken } && cd ~/.cmux-tmp/${ streamToken } && pwd` ;
256253 const result = await execBuffered ( runtime , command , {
257254 cwd : "/" ,
258255 timeout : 10 ,
259256 } ) ;
260-
257+
261258 if ( result . exitCode !== 0 ) {
262259 throw new Error (
263260 `Failed to create temp directory ~/.cmux-tmp/${ streamToken } : exit code ${ result . exitCode } `
264261 ) ;
265262 }
266-
263+
267264 // Return absolute path (e.g., "/home/user/.cmux-tmp/abc123")
268265 return result . stdout . trim ( ) ;
269266 }
@@ -984,13 +981,10 @@ export class StreamManager extends EventEmitter {
984981 // Clean up stream temp directory using runtime
985982 if ( streamInfo . runtimeTempDir ) {
986983 try {
987- const result = await streamInfo . runtime . exec (
988- `rm -rf "${ streamInfo . runtimeTempDir } "` ,
989- {
990- cwd : "~" ,
991- timeout : 10 ,
992- }
993- ) ;
984+ const result = await streamInfo . runtime . exec ( `rm -rf "${ streamInfo . runtimeTempDir } "` , {
985+ cwd : "~" ,
986+ timeout : 10 ,
987+ } ) ;
994988 await result . exitCode ; // Wait for completion
995989 log . debug ( `Cleaned up temp dir: ${ streamInfo . runtimeTempDir } ` ) ;
996990 } catch ( error ) {
0 commit comments