Lines 301-341javascript
301 return path.resolve(packageRoot, relativeEntry);
303function resolveLauncherPath(homeDir) {
304 return path.join(homeDir, ".satori", MANAGED_BIN_DIR, MANAGED_LAUNCHER_FILE);
306function plannedManagedRuntimeCommand(homeDir, packageSpecifier) {
308 command: process.execPath,
309 args: [resolveRuntimeEntryPath(resolveRuntimePackageRoot(homeDir, packageSpecifier))],
312function managedClientCommand(homeDir) {
314 command: process.execPath,
315 args: [resolveLauncherPath(homeDir)],
318function buildLauncherScript(runtimeCommand) {
320 "#!/usr/bin/env node",
322 "const { spawn } = require(\"node:child_process\");",
323 "",
MediumDynamic Require
Package source references dynamic require/import behavior.
dist/install.jsView on unpkg · L321 324 `const command = ${JSON.stringify(runtimeCommand.command)};`,
325 `const baseArgs = ${JSON.stringify(runtimeCommand.args)};`,
326 "const child = spawn(command, [...baseArgs, ...process.argv.slice(2)], {",
327 " stdio: \"inherit\",",
328 " env: process.env,",
331 "child.on(\"error\", (error) => {",
332 " console.error(`Failed to start Satori MCP runtime: ${error.message}`);",
336 "child.on(\"exit\", (code, signal) => {",
338 " console.error(`Satori MCP runtime exited from signal ${signal}`);",
341 " process.exit(code ?? 0);",