rscot-agent 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +12 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1422,8 +1422,18 @@ async function exchangeCode(code, verifier, deviceId) {
1422
1422
  }
1423
1423
  function openBrowser(url) {
1424
1424
  const platform = process.platform;
1425
- const cmd = platform === "win32" ? "cmd" : platform === "darwin" ? "open" : "xdg-open";
1426
- const args = platform === "win32" ? ["/c", "start", "", url] : [url];
1425
+ let cmd;
1426
+ let args;
1427
+ if (platform === "win32") {
1428
+ cmd = "rundll32";
1429
+ args = ["url.dll,FileProtocolHandler", url];
1430
+ } else if (platform === "darwin") {
1431
+ cmd = "open";
1432
+ args = [url];
1433
+ } else {
1434
+ cmd = "xdg-open";
1435
+ args = [url];
1436
+ }
1427
1437
  try {
1428
1438
  const child = spawn(cmd, args, { detached: true, stdio: "ignore", windowsHide: true });
1429
1439
  child.unref();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rscot-agent",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Rscot Agent (rscot) — local-first, source-available coding agent. One-shot npx onramp that walks you through provider/key setup.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",