File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed
Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ import { expandTilde } from "./tildeExpansion";
3939export class LocalRuntime implements Runtime {
4040 private readonly srcBaseDir : string ;
4141
42+ /** LocalRuntime supports background execution via detached process groups */
43+ readonly supportsBackgroundExecution = true ;
44+
4245 constructor ( srcBaseDir : string ) {
4346 // Expand tilde to actual home directory path for local file system operations
4447 this . srcBaseDir = expandTilde ( srcBaseDir ) ;
Original file line number Diff line number Diff line change @@ -364,6 +364,13 @@ export interface Runtime {
364364 * @returns Result with new workspace path and source branch, or error
365365 */
366366 forkWorkspace ( params : WorkspaceForkParams ) : Promise < WorkspaceForkResult > ;
367+
368+ /**
369+ * Whether this runtime supports background process execution.
370+ * LocalRuntime: true (uses detached process groups)
371+ * SSHRuntime: false (TODO: implement via nohup/setsid + file-based output capture)
372+ */
373+ readonly supportsBackgroundExecution : boolean ;
367374}
368375
369376/**
Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ export class SSHRuntime implements Runtime {
7171 private readonly config : SSHRuntimeConfig ;
7272 private readonly controlPath : string ;
7373
74+ /**
75+ * SSHRuntime does not yet support background execution.
76+ * TODO: Implement via nohup/setsid + file-based output capture on remote host
77+ */
78+ readonly supportsBackgroundExecution = false ;
79+
7480 constructor ( config : SSHRuntimeConfig ) {
7581 // Note: srcBaseDir may contain tildes - they will be resolved via resolvePath() before use
7682 // The WORKSPACE_CREATE IPC handler resolves paths before storing in config
Original file line number Diff line number Diff line change @@ -249,6 +249,16 @@ export const createBashTool: ToolFactory = (config: ToolConfiguration) => {
249249 } ;
250250 }
251251
252+ // TODO: Add SSH runtime support for background processes (nohup/setsid + file-based output)
253+ if ( ! config . runtime . supportsBackgroundExecution ) {
254+ return {
255+ success : false ,
256+ error : "Background execution is not yet supported for SSH/remote workspaces" ,
257+ exitCode : - 1 ,
258+ wall_duration_ms : 0 ,
259+ } ;
260+ }
261+
252262 if ( ! config . workspaceId || ! config . backgroundProcessManager ) {
253263 return {
254264 success : false ,
You can’t perform that action at this time.
0 commit comments