MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / buildSafeDevConfig

Function buildSafeDevConfig

scripts/dev-safe.mjs:569–577  ·  view source on GitHub ↗
(cwd = process.cwd(), env = process.env)

Source from the content-addressed store, hash-verified

567 * @returns {SafeDevConfig} Configuration object
568 */
569export function buildSafeDevConfig(cwd = process.cwd(), env = process.env) {
570 const backendPort = parsePort(
571 env.OH_CANVAS_SAFE_BACKEND_PORT,
572 DEFAULT_BACKEND_PORT,
573 );
574 const vscodePort = parsePort(env.OH_CANVAS_SAFE_VSCODE_PORT, backendPort + 1);
575
576 return buildConfigFromPorts({ backendPort, vscodePort }, cwd, env);
577}
578
579/**
580 * Build safe dev configuration with dynamic port allocation.

Callers 8

buildConfigFunction · 0.90
startAgentServerFunction · 0.90
buildExtraBackendConfigFunction · 0.90
startAgentServerFunction · 0.90
dev-safe.test.tsFile · 0.90

Calls 2

buildConfigFromPortsFunction · 0.85
parsePortFunction · 0.70

Tested by

no test coverage detected