local-commander-agent-linux-arm64 0.3.45 → 0.3.47
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/package.json +1 -1
- package/runtime/agent.mjs +1717 -340
- package/runtime/lifecycle.mjs +14 -1
- package/runtime/manifest.json +5 -5
- package/runtime/node +0 -0
- package/runtime/posix-host +0 -0
package/runtime/lifecycle.mjs
CHANGED
|
@@ -620,7 +620,10 @@ async function pair() {
|
|
|
620
620
|
}
|
|
621
621
|
try {
|
|
622
622
|
const begun = JSON.parse(line);
|
|
623
|
-
if (typeof begun.approvalUrl === "string")
|
|
623
|
+
if (typeof begun.approvalUrl === "string") {
|
|
624
|
+
process.stdout.write("\nApprove this computer in your browser (opening it now):\n " + begun.approvalUrl + "\nConfirmation code: " + begun.confirmationCode + "\nWaiting for approval...\n");
|
|
625
|
+
openBrowser(begun.approvalUrl);
|
|
626
|
+
}
|
|
624
627
|
} catch {
|
|
625
628
|
}
|
|
626
629
|
}
|
|
@@ -631,6 +634,16 @@ async function pair() {
|
|
|
631
634
|
});
|
|
632
635
|
if (code !== 0 || !paired) fail2("PAIRING_FAILED");
|
|
633
636
|
}
|
|
637
|
+
function openBrowser(url) {
|
|
638
|
+
if (!/^https:\/\/[A-Za-z0-9.-]+(:\d+)?\/setup\?pairing=[0-9a-f-]{36}$/.test(url)) return;
|
|
639
|
+
const opener = process.platform === "darwin" ? "/usr/bin/open" : "/usr/bin/xdg-open";
|
|
640
|
+
if (process.platform === "linux" && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) return;
|
|
641
|
+
try {
|
|
642
|
+
spawn2(opener, [url], { stdio: "ignore", detached: true, shell: false }).on("error", () => {
|
|
643
|
+
}).unref();
|
|
644
|
+
} catch {
|
|
645
|
+
}
|
|
646
|
+
}
|
|
634
647
|
async function main() {
|
|
635
648
|
if (!["linux", "darwin"].includes(process.platform) || !process.getuid || !process.getuid() || process.geteuid?.() !== process.getuid()) fail2("POSIX_OWNER_REQUIRED");
|
|
636
649
|
const command = process.argv[2];
|
package/runtime/manifest.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
2
|
+
"version": "0.3.47",
|
|
3
3
|
"experimental": true,
|
|
4
4
|
"platform": "linux",
|
|
5
5
|
"arch": "arm64",
|
|
6
6
|
"node": "v22.23.3",
|
|
7
|
-
"source": "
|
|
8
|
-
"sourceTreeSha256": "
|
|
7
|
+
"source": "df3c7268691268bf4d9c7ad1fd0225cfd3e4e25f",
|
|
8
|
+
"sourceTreeSha256": "55d2835bd5fd435a09d78cb5bb890b69c37127c6fac02077d2c2280642e596dc",
|
|
9
9
|
"qualification": "unqualified",
|
|
10
10
|
"lifecycleVersion": 1,
|
|
11
11
|
"packaging": "npm platform package runtime",
|
|
12
12
|
"files": {
|
|
13
13
|
"NODE-LICENSE.txt": "c738ae413cf561f174e34f6961f8ca458aae2369a73640dda6234c629b98bcc4",
|
|
14
|
-
"agent.mjs": "
|
|
14
|
+
"agent.mjs": "54343afee2c12f7a4b4ac46e3bebe1ee2fde4af58305b22a286b64773faab453",
|
|
15
15
|
"job-host.mjs": "54ab42fa00a53dfd4df6c93fd9e6692d5e03a0870aba8bf501f398905694b72d",
|
|
16
|
-
"lifecycle.mjs": "
|
|
16
|
+
"lifecycle.mjs": "ebed6bac75115ef1df34aff9fef211c9f710a524b2b614115b6bc80ef57b464b",
|
|
17
17
|
"node": "d09e299258c24f7cdf6f5d5ec185e3a56512b27a697113735dac909f1cac7b8d",
|
|
18
18
|
"posix-host": "54ae01b3a453faa0b37c6f4a8b541e9100fd2b84fc5d2695df2e6d5f44e0f718"
|
|
19
19
|
}
|
package/runtime/node
CHANGED
|
File without changes
|
package/runtime/posix-host
CHANGED
|
File without changes
|