feat(connectd): native-binary connectors + companion sidecar lifecycle #2

Open
tim.lingo wants to merge 5 commits from feat/bin-native-connector into main
Showing only changes of commit fed166202e - Show all commits
+6 -1
View File
@@ -32,6 +32,8 @@ export function namespacedName(serverId: string, tool: string): string {
// Node we ship in the .app), used to spawn pre-bundled MCP servers.
// arg "@bundled/<file>" → a pre-bundled MCP server shipped alongside the bridge (e.g. the
// filesystem server for "Your files"), so it runs offline without npx.
// command "@bin/<file>" → a pre-bundled NATIVE MCP server binary shipped alongside the bridge
// (e.g. the Go whatsapp-mcp), spawned directly (no Node runtime).
// The bundled-servers dir is the app's resources/.../neuron-connectd/servers (set by the daemons
// launcher via NEURON_CONNECTD_BUNDLE_DIR; falls back to a path next to the running bundle).
function bundledServersDir(): string {
@@ -39,7 +41,10 @@ function bundledServersDir(): string {
}
function resolveRuntimeCommand(command: string): string {
return command === "@node" ? process.execPath : command;
if (command === "@node") return process.execPath;
// "@bin/<file>": a bundled native binary (e.g. whatsapp-mcp). Resolve to the bundled-servers dir.
if (command.startsWith("@bin/")) return join(bundledServersDir(), command.slice("@bin/".length));
return command;
}
function resolveBundledArg(arg: string): string {