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

Function resolveRuntimeMode

src/node/services/tools/task.ts:67–72  ·  view source on GitHub ↗

Resolve the parent workspace's runtime mode from the injected MUX_RUNTIME env.

(config: ToolConfiguration)

Source from the content-addressed store, hash-verified

65
66/** Resolve the parent workspace's runtime mode from the injected MUX_RUNTIME env. */
67function resolveRuntimeMode(config: ToolConfiguration): RuntimeMode | undefined {
68 const runtimeValue = config.muxEnv?.MUX_RUNTIME;
69 return runtimeValue != null && Object.values(RUNTIME_MODE).includes(runtimeValue as RuntimeMode)
70 ? (runtimeValue as RuntimeMode)
71 : undefined;
72}
73
74/**
75 * Build dynamic task tool description with runtime-specific workspace visibility

Callers 2

buildTaskDescriptionFunction · 0.70
createTaskToolFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected