MCPcopy Index your code
hub / github.com/coder/mux / getRuntimeType

Function getRuntimeType

src/node/runtime/initHook.ts:129–136  ·  view source on GitHub ↗
(config: RuntimeConfig | undefined)

Source from the content-addressed store, hash-verified

127 * Handles legacy "local" with srcBaseDir → "worktree" mapping.
128 */
129export function getRuntimeType(config: RuntimeConfig | undefined): RuntimeMode {
130 if (!config) return "worktree"; // Default to worktree for undefined config
131 if (isSSHRuntime(config)) return "ssh";
132 if (isDockerRuntime(config)) return "docker";
133 if (isDevcontainerRuntime(config)) return "devcontainer";
134 if (isWorktreeRuntime(config)) return "worktree";
135 return "local";
136}
137
138/**
139 * Line-buffered logger that splits stream output into lines and logs them

Callers 4

createMethod · 0.90
createManyMethod · 0.90
createMethod · 0.90
streamMessageMethod · 0.90

Calls 4

isSSHRuntimeFunction · 0.90
isDockerRuntimeFunction · 0.90
isDevcontainerRuntimeFunction · 0.90
isWorktreeRuntimeFunction · 0.90

Tested by

no test coverage detected