UNPKG

@adonis-agora/agent

Version:

Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.

13 lines • 573 B
import { spawn } from 'node:child_process'; /** Best-effort: opens a URL in the desktop browser. Callers always print the URL as well. */ export function openInBrowser(url) { const cmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'cmd' : 'xdg-open'; const args = process.platform === 'win32' ? ['/c', 'start', '""', url] : [url]; try { const child = spawn(cmd, args, { stdio: 'ignore', detached: true }); child.on('error', () => { }); child.unref(); } catch { } } //# sourceMappingURL=open_url.js.map