resolveDefaultServerScript function
Locates a runnable agent_sdk_server.js for a transport with no
installer — a developer's tool, not the packaged app's path.
Resolution order: the environment override, then a source checkout's
tom_core_agentic/node, found by walking up. A packaged app does not come
through here: the ai/ folder beside its executable holds the server's
source without its dependencies, which cannot run until the user has
installed them (see StandaloneNodeAiTransport.forApp).
Implementation
String resolveDefaultServerScript() {
final override = Platform.environment[standaloneScriptEnvVar];
if (override != null && override.isNotEmpty) return override;
return resolveServerScriptFor(
executableDir: File(Platform.resolvedExecutable).parent.path,
);
}