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

Function buildSafeDevConfig

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

Source from the content-addressed store, hash-verified

535 * @returns {SafeDevConfig} Configuration object
536 */
537export function buildSafeDevConfig(cwd = process.cwd(), env = process.env) {
538 const backendPort = parsePort(
539 env.OH_CANVAS_SAFE_BACKEND_PORT,
540 DEFAULT_BACKEND_PORT,
541 );
542 const vscodePort = parsePort(env.OH_CANVAS_SAFE_VSCODE_PORT, backendPort + 1);
543
544 return buildConfigFromPorts({ backendPort, vscodePort }, cwd, env);
545}
546
547/**
548 * Build safe dev configuration with dynamic port allocation.

Callers 6

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