rscot-agent 1.2.1 → 1.2.3
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.
- package/dist/index.js +20 -6
- 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
|
-
|
|
1426
|
-
|
|
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();
|
|
@@ -1445,13 +1455,17 @@ async function signIn() {
|
|
|
1445
1455
|
client: "cli"
|
|
1446
1456
|
});
|
|
1447
1457
|
const authUrl = `${AUTH_BASE}/auth/desktop/start?${params.toString()}`;
|
|
1448
|
-
process.
|
|
1449
|
-
|
|
1458
|
+
const verbose = process.env.RSCOT_VERBOSE === "1";
|
|
1459
|
+
process.stdout.write("\nOpened your browser to sign in.\n");
|
|
1460
|
+
process.stdout.write("Complete the flow there, then return to this terminal.\n");
|
|
1461
|
+
process.stdout.write("Waiting (up to 3 minutes)\u2026\n\n");
|
|
1462
|
+
if (verbose) {
|
|
1463
|
+
process.stdout.write(`[verbose] auth url: ${authUrl}
|
|
1450
1464
|
`);
|
|
1451
|
-
|
|
1452
|
-
process.stdout.write(`Waiting for callback on http://127.0.0.1:${port}/cb (up to 3 minutes)\u2026
|
|
1465
|
+
process.stdout.write(`[verbose] loopback: 127.0.0.1:${port}
|
|
1453
1466
|
|
|
1454
1467
|
`);
|
|
1468
|
+
}
|
|
1455
1469
|
openBrowser(authUrl);
|
|
1456
1470
|
const code = await waitForCallback(server, state);
|
|
1457
1471
|
const bundle = await exchangeCode(code, verifier, deviceId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rscot-agent",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
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",
|