MCPcopy
hub / github.com/coder/mux / computeOutputPaths

Function computeOutputPaths

src/node/services/backgroundProcessExecutor.ts:69–80  ·  view source on GitHub ↗

* Compute paths for a background process output directory. * @param bgOutputDir Base directory (e.g., /tmp/mux-bashes or ~/.mux/sessions) * @param workspaceId Workspace identifier * @param processId Process identifier

(
  bgOutputDir: string,
  workspaceId: string,
  processId: string
)

Source from the content-addressed store, hash-verified

67 * @param processId Process identifier
68 */
69function computeOutputPaths(
70 bgOutputDir: string,
71 workspaceId: string,
72 processId: string
73): { outputDir: string; outputPath: string; exitCodePath: string } {
74 const outputDir = `${bgOutputDir}/${workspaceId}/${processId}`;
75 return {
76 outputDir,
77 outputPath: `${outputDir}/${OUTPUT_FILENAME}`,
78 exitCodePath: `${outputDir}/${EXIT_CODE_FILENAME}`,
79 };
80}
81
82/**
83 * Options for spawning a process

Callers 2

spawnProcessFunction · 0.85
migrateToBackgroundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected