remotelink 0.6.1 → 0.6.2-rc.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.
- package/README.md +7 -4
- package/dist/go-binaries.json +7 -7
- package/dist/index.js +46 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -175,10 +175,13 @@ out-of-scope write receives a matching Approval Broker grant. The dashboard and
|
|
|
175
175
|
an interactive remotelink terminal can approve once, allow the same file
|
|
176
176
|
briefly, trust the parent folder, or deny the request.
|
|
177
177
|
|
|
178
|
-
Sensitive-path protection
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
Sensitive-path protection is **enabled by default** for credential locations
|
|
179
|
+
and `.env` files. Device owners may explicitly turn it off in Dashboard after
|
|
180
|
+
confirming the risks. Disabling it pauses both built-in and custom sensitive
|
|
181
|
+
path restrictions for file tools, so a narrow exception is preferable whenever
|
|
182
|
+
possible. A sensitive-path exception only grants file visibility; it does not
|
|
183
|
+
allow writes outside Trusted Write Locations. Terminal execution is a separate
|
|
184
|
+
high-risk capability and is not sandboxed by file policy.
|
|
182
185
|
|
|
183
186
|
Filesystem paths are canonicalized and checked locally immediately before
|
|
184
187
|
execution. Full terminal mode requires an in-scope `cwd` when trusted write
|
package/dist/go-binaries.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.6.
|
|
2
|
+
"version": "0.6.2-rc.2",
|
|
3
3
|
"checksums": {
|
|
4
|
-
"remotelink-v0.6.
|
|
5
|
-
"remotelink-v0.6.
|
|
6
|
-
"remotelink-v0.6.
|
|
7
|
-
"remotelink-v0.6.
|
|
8
|
-
"remotelink-v0.6.
|
|
9
|
-
"remotelink-v0.6.
|
|
4
|
+
"remotelink-v0.6.2-rc.2-windows-amd64.exe": "326e7dd667c54ab58bf32dd100f0202b39098b1c7d262debfa8099be19c4e3cd",
|
|
5
|
+
"remotelink-v0.6.2-rc.2-windows-arm64.exe": "1b85349093d3a0206e461d19ae43717fd1d9f8ed668dae3f352972a03156097c",
|
|
6
|
+
"remotelink-v0.6.2-rc.2-darwin-amd64": "e94e707556bedfe5fc50a32154a3d00251f27918371bc00a4f732f15cde22bdf",
|
|
7
|
+
"remotelink-v0.6.2-rc.2-darwin-arm64": "abaec158f8c452d22d701cb22912046ba11790bdd6da0cd1f78319a49b6c8ae1",
|
|
8
|
+
"remotelink-v0.6.2-rc.2-linux-amd64": "3791e8aac9740236248c9191bd55b4edab7ad359f8d7db0788569732caef7676",
|
|
9
|
+
"remotelink-v0.6.2-rc.2-linux-arm64": "ce00fa8e9cdbc6785d892345f392e26841991caa34a1f770a18f7607db6778cf"
|
|
10
10
|
}
|
|
11
11
|
}
|
package/dist/index.js
CHANGED
|
@@ -45,7 +45,7 @@ var init_package = __esm({
|
|
|
45
45
|
"package.json"() {
|
|
46
46
|
package_default = {
|
|
47
47
|
name: "remotelink",
|
|
48
|
-
version: "0.6.
|
|
48
|
+
version: "0.6.2-rc.2",
|
|
49
49
|
description: "Controlled remote computer access for AI across computers you own.",
|
|
50
50
|
type: "module",
|
|
51
51
|
bin: {
|
|
@@ -82,11 +82,11 @@ var init_package = __esm({
|
|
|
82
82
|
homepage: "https://remotearc.app",
|
|
83
83
|
repository: {
|
|
84
84
|
type: "git",
|
|
85
|
-
url: "git+https://github.com/
|
|
85
|
+
url: "git+https://github.com/Remote-Arc/remote-arc.git",
|
|
86
86
|
directory: "packages/cli"
|
|
87
87
|
},
|
|
88
88
|
bugs: {
|
|
89
|
-
url: "https://github.com/
|
|
89
|
+
url: "https://github.com/Remote-Arc/remote-arc/issues"
|
|
90
90
|
},
|
|
91
91
|
keywords: [
|
|
92
92
|
"mcp",
|
|
@@ -3507,6 +3507,35 @@ var init_agent_runtime = __esm({
|
|
|
3507
3507
|
}
|
|
3508
3508
|
});
|
|
3509
3509
|
|
|
3510
|
+
// src/fleet-capacity.ts
|
|
3511
|
+
import os4 from "os";
|
|
3512
|
+
function createFleetCapacitySampler(now = Date.now) {
|
|
3513
|
+
let prior = null;
|
|
3514
|
+
return () => {
|
|
3515
|
+
const total = os4.totalmem(), free = os4.freemem();
|
|
3516
|
+
if (!Number.isFinite(total) || total <= 0 || !Number.isFinite(free)) return null;
|
|
3517
|
+
const times = os4.cpus().map((cpu) => cpu.times);
|
|
3518
|
+
const next = {
|
|
3519
|
+
idle: times.reduce((n, t) => n + t.idle, 0),
|
|
3520
|
+
total: times.reduce((n, t) => n + t.user + t.nice + t.sys + t.idle + t.irq, 0)
|
|
3521
|
+
};
|
|
3522
|
+
const elapsed = prior ? next.total - prior.total : 0;
|
|
3523
|
+
const busy = prior && elapsed > 0 ? Math.max(0, Math.min(100, (1 - (next.idle - prior.idle) / elapsed) * 100)) : void 0;
|
|
3524
|
+
prior = next;
|
|
3525
|
+
return {
|
|
3526
|
+
observedAt: new Date(now()).toISOString(),
|
|
3527
|
+
memoryTotalMB: Math.round(total / 1048576),
|
|
3528
|
+
memoryAvailableMB: Math.round(Math.max(0, Math.min(free, total)) / 1048576),
|
|
3529
|
+
...busy !== void 0 ? { cpuPercent: Math.round(busy * 10) / 10 } : {}
|
|
3530
|
+
};
|
|
3531
|
+
};
|
|
3532
|
+
}
|
|
3533
|
+
var init_fleet_capacity = __esm({
|
|
3534
|
+
"src/fleet-capacity.ts"() {
|
|
3535
|
+
"use strict";
|
|
3536
|
+
}
|
|
3537
|
+
});
|
|
3538
|
+
|
|
3510
3539
|
// ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/constants.js
|
|
3511
3540
|
var require_constants = __commonJS({
|
|
3512
3541
|
"../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/constants.js"(exports, module) {
|
|
@@ -7195,7 +7224,7 @@ var init_wrapper = __esm({
|
|
|
7195
7224
|
});
|
|
7196
7225
|
|
|
7197
7226
|
// src/background.ts
|
|
7198
|
-
import
|
|
7227
|
+
import os5 from "os";
|
|
7199
7228
|
import path8 from "path";
|
|
7200
7229
|
import fs8 from "fs/promises";
|
|
7201
7230
|
import { spawn as spawn5 } from "child_process";
|
|
@@ -7262,9 +7291,9 @@ async function run2(command, args, options = {}) {
|
|
|
7262
7291
|
}
|
|
7263
7292
|
function createBackgroundController(options = {}) {
|
|
7264
7293
|
const platform = options.platform ?? process.platform;
|
|
7265
|
-
const home = options.home ??
|
|
7294
|
+
const home = options.home ?? os5.homedir();
|
|
7266
7295
|
const nodePath = options.nodePath ?? process.execPath;
|
|
7267
|
-
const uid = options.uid ?? process.getuid?.() ??
|
|
7296
|
+
const uid = options.uid ?? process.getuid?.() ?? os5.userInfo().uid;
|
|
7268
7297
|
const runCommand = options.run ?? run2;
|
|
7269
7298
|
const wait = options.wait ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
7270
7299
|
const leaseActive = options.leaseActive ?? agentLeaseActive;
|
|
@@ -7505,7 +7534,7 @@ WantedBy=default.target
|
|
|
7505
7534
|
);
|
|
7506
7535
|
}
|
|
7507
7536
|
async function windowsAgentPid(role = "--supervise") {
|
|
7508
|
-
const script =
|
|
7537
|
+
const script = `$p = Get-CimInstance Win32_Process -Filter "Name = 'node.exe'" | Where-Object { $_.Name -ieq 'node.exe' -and $_.ExecutablePath -ieq ` + psQuote(nodePath) + ` -and $_.CommandLine -match ('^"?' + [regex]::Escape(` + psQuote(nodePath) + `) + '"?\\s+"?' + [regex]::Escape(` + psQuote(AGENT_BUNDLE) + `) + '"?\\s+(?:--ts\\s+)?` + role + "(?:\\s|$)') } | Select-Object -First 1 -ExpandProperty ProcessId; if ($null -ne $p) { Write-Output $p }";
|
|
7509
7538
|
const result = await powershell(script, true);
|
|
7510
7539
|
const pid = Number(result.stdout.trim());
|
|
7511
7540
|
return Number.isFinite(pid) && pid > 0 ? pid : null;
|
|
@@ -7687,7 +7716,7 @@ var legacy_exports = {};
|
|
|
7687
7716
|
__export(legacy_exports, {
|
|
7688
7717
|
runLegacy: () => runLegacy
|
|
7689
7718
|
});
|
|
7690
|
-
import
|
|
7719
|
+
import os6 from "os";
|
|
7691
7720
|
import path9 from "path";
|
|
7692
7721
|
import fs9 from "fs/promises";
|
|
7693
7722
|
import { spawn as spawn6 } from "child_process";
|
|
@@ -7856,7 +7885,7 @@ function openBrowser(url) {
|
|
|
7856
7885
|
child.unref();
|
|
7857
7886
|
}
|
|
7858
7887
|
async function pair(origin, mode) {
|
|
7859
|
-
const deviceName =
|
|
7888
|
+
const deviceName = os6.hostname();
|
|
7860
7889
|
const response = await fetch(origin + "/api/device/start", {
|
|
7861
7890
|
method: "POST",
|
|
7862
7891
|
headers: { "content-type": "application/json" },
|
|
@@ -7864,7 +7893,7 @@ async function pair(origin, mode) {
|
|
|
7864
7893
|
device_name: deviceName,
|
|
7865
7894
|
platform: process3.platform,
|
|
7866
7895
|
arch: process3.arch,
|
|
7867
|
-
hostname:
|
|
7896
|
+
hostname: os6.hostname()
|
|
7868
7897
|
})
|
|
7869
7898
|
});
|
|
7870
7899
|
if (!response.ok) {
|
|
@@ -8021,11 +8050,12 @@ async function connectAgent(config) {
|
|
|
8021
8050
|
name: config.deviceName,
|
|
8022
8051
|
platform: process3.platform,
|
|
8023
8052
|
arch: process3.arch,
|
|
8024
|
-
hostname:
|
|
8053
|
+
hostname: os6.hostname(),
|
|
8025
8054
|
agentVersion: VERSION,
|
|
8026
8055
|
pid: process3.pid,
|
|
8027
8056
|
backgroundProcess: argFlag("--agent"),
|
|
8028
8057
|
connectedAt,
|
|
8058
|
+
capacity: sampleFleetCapacity(),
|
|
8029
8059
|
recoveryEnabled: recovery?.enabled ?? false,
|
|
8030
8060
|
supervisorActive: recovery?.active,
|
|
8031
8061
|
supervisorPid: recovery?.pid,
|
|
@@ -8430,22 +8460,24 @@ async function main() {
|
|
|
8430
8460
|
async function runLegacy() {
|
|
8431
8461
|
await main();
|
|
8432
8462
|
}
|
|
8433
|
-
var VERSION, DEFAULT_ORIGIN, CONFIG_DIR, CONFIG_PATH, LEGACY_CONFIG_PATH, SELF_PATH, RevokedDeviceCredentialError, sleep, approvalPromptActive, supportsColor, paint, dim, cyan, green, yellow, red, bold, ExecutionCore;
|
|
8463
|
+
var sampleFleetCapacity, VERSION, DEFAULT_ORIGIN, CONFIG_DIR, CONFIG_PATH, LEGACY_CONFIG_PATH, SELF_PATH, RevokedDeviceCredentialError, sleep, approvalPromptActive, supportsColor, paint, dim, cyan, green, yellow, red, bold, ExecutionCore;
|
|
8434
8464
|
var init_legacy = __esm({
|
|
8435
8465
|
"src/legacy.ts"() {
|
|
8436
8466
|
"use strict";
|
|
8437
8467
|
init_keep_awake();
|
|
8438
8468
|
init_goal_workspace();
|
|
8439
8469
|
init_agent_runtime();
|
|
8470
|
+
init_fleet_capacity();
|
|
8440
8471
|
init_wrapper();
|
|
8441
8472
|
init_package();
|
|
8442
8473
|
init_background();
|
|
8443
8474
|
init_src();
|
|
8475
|
+
sampleFleetCapacity = createFleetCapacitySampler();
|
|
8444
8476
|
VERSION = package_default.version;
|
|
8445
8477
|
DEFAULT_ORIGIN = "https://mcp.remotearc.app";
|
|
8446
|
-
CONFIG_DIR = path9.join(
|
|
8478
|
+
CONFIG_DIR = path9.join(os6.homedir(), ".remotearc");
|
|
8447
8479
|
CONFIG_PATH = path9.join(CONFIG_DIR, "config.json");
|
|
8448
|
-
LEGACY_CONFIG_PATH = path9.join(
|
|
8480
|
+
LEGACY_CONFIG_PATH = path9.join(os6.homedir(), ".remote-link", "config.json");
|
|
8449
8481
|
SELF_PATH = fileURLToPath2(import.meta.url);
|
|
8450
8482
|
RevokedDeviceCredentialError = class extends Error {
|
|
8451
8483
|
constructor() {
|