@remcp/runtime 0.2.29 → 0.2.31
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/CHANGELOG.md +29 -0
- package/package.json +1 -1
- package/src/config.mjs +17 -3
- package/src/policy.mjs +1 -0
- package/src/tools/stats.mjs +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.30
|
|
4
|
+
|
|
5
|
+
- **Unrestricted mode.** `REMCP_RUNTIME_UNRESTRICTED=1` (or `"unrestricted": true` in `runtime.json`,
|
|
6
|
+
or `remcp godmode on`) lifts the access roots, the configured command blocklist and the
|
|
7
|
+
catastrophic-command guardrail for this computer. It is not settable through MCP: `set_config_value`
|
|
8
|
+
still accepts only the four preferences it lists, so a model cannot widen its own reach.
|
|
9
|
+
`get_runtime_info` reports `policy.unrestricted` and says how to turn it off. Size limits
|
|
10
|
+
(`maxWriteBytes`, `maxOutputBytes`, line limits) are unchanged, and commands still run as the user
|
|
11
|
+
the agent runs as.
|
|
12
|
+
|
|
13
|
+
## 0.2.29
|
|
14
|
+
|
|
15
|
+
- Screenshot failures on GNOME Wayland name the tool that works (`gnome-screenshot`); previously the
|
|
16
|
+
message suggested `grim`, which cannot read a GNOME session at all.
|
|
17
|
+
|
|
18
|
+
## 0.2.26
|
|
19
|
+
|
|
20
|
+
- Screenshot failures explain the platform's own gate: Screen Recording on macOS, an interactive
|
|
21
|
+
session on Windows, `grim`/`gnome-screenshot` on Wayland, and "no graphical session" on a server.
|
|
22
|
+
- A PNG above the inline limit is saved on the computer and the result says how to fetch it in
|
|
23
|
+
chunks, instead of failing the call.
|
|
24
|
+
|
|
25
|
+
## 0.2.25
|
|
26
|
+
|
|
27
|
+
- `EACCES`/`EPERM`/`EROFS`/`ENOSPC`/`EBUSY` from the file system are explained instead of printed
|
|
28
|
+
raw: macOS privacy folders (Full Disk Access for the exact `node` binary), Windows Controlled
|
|
29
|
+
folder access, Linux ownership, read-only mounts and full disks. Every filesystem failure in the
|
|
30
|
+
runtime goes through it.
|
|
31
|
+
|
|
3
32
|
## 0.2.20
|
|
4
33
|
|
|
5
34
|
- `set_config_value`: a model may change this runtime’s own preferences (telemetry opt-out, read
|
package/package.json
CHANGED
package/src/config.mjs
CHANGED
|
@@ -72,6 +72,19 @@ function dangerousMode(value, fallback = 'warn') {
|
|
|
72
72
|
const allowedRoots = stringList(process.env.REMCP_RUNTIME_ALLOWED_ROOTS ?? file.allowedRoots)
|
|
73
73
|
.map(root => path.resolve(expandHome(root)));
|
|
74
74
|
|
|
75
|
+
// "Everything is allowed" mode. It is deliberately *not* settable through MCP: a model that could
|
|
76
|
+
// widen its own reach would turn any prompt injection into root. The person at the computer turns it
|
|
77
|
+
// on (environment variable, runtime.json, or `remcp godmode on`), and the runtime then reports it in
|
|
78
|
+
// get_runtime_info so the model and the workspace can say so out loud.
|
|
79
|
+
//
|
|
80
|
+
// What it changes: no access-root confinement (allowedRoots becomes empty, which the path resolver
|
|
81
|
+
// already reads as "the whole filesystem"), the configured command blocklist is ignored, and the
|
|
82
|
+
// catastrophic-command guardrail is set to `allow`. What it does not change: the per-call size limits
|
|
83
|
+
// (maxWriteBytes, maxOutputBytes, line limits) — they bound one call, not what a person may do — and
|
|
84
|
+
// the fact that commands run as the user the agent runs as. To act as root, run the agent as root
|
|
85
|
+
// (`sudo remcp install --system`) or start it under sudo.
|
|
86
|
+
const unrestricted = booleanValue(process.env.REMCP_RUNTIME_UNRESTRICTED, booleanValue(file.unrestricted, false));
|
|
87
|
+
|
|
75
88
|
// Telemetry is opt-out, matching the ReMCP client: it is on unless the user (or the
|
|
76
89
|
// ReMCP agent that spawned this runtime) turns it off. It never sends file paths,
|
|
77
90
|
// command strings, arguments, or tool output - only tool names, timings and outcomes.
|
|
@@ -85,9 +98,10 @@ const telemetryEnabled = telemetryDisabled
|
|
|
85
98
|
const configuredOutputBytes = positiveNumber(process.env.REMCP_RUNTIME_MAX_OUTPUT_BYTES ?? file.maxOutputBytes, 2 * 1024 * 1024);
|
|
86
99
|
|
|
87
100
|
export const runtimeConfig = Object.freeze({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
101
|
+
unrestricted,
|
|
102
|
+
allowedRoots: Object.freeze(unrestricted ? [] : allowedRoots),
|
|
103
|
+
blockedCommands: Object.freeze(unrestricted ? [] : stringList(process.env.REMCP_RUNTIME_BLOCKED_COMMANDS ?? file.blockedCommands)),
|
|
104
|
+
dangerousCommands: unrestricted ? 'allow' : dangerousMode(process.env.REMCP_RUNTIME_DANGEROUS_COMMANDS ?? file.dangerousCommands),
|
|
91
105
|
maxOutputBytes: Math.min(configuredOutputBytes, HARD_OUTPUT_CEILING_BYTES),
|
|
92
106
|
maxReadLines: positiveNumber(process.env.REMCP_RUNTIME_MAX_READ_LINES ?? file.maxReadLines, 4000),
|
|
93
107
|
maxBufferedLines: positiveNumber(process.env.REMCP_RUNTIME_MAX_BUFFERED_LINES ?? file.maxBufferedLines, 100000),
|
package/src/policy.mjs
CHANGED
|
@@ -66,6 +66,7 @@ function commandWord(segment) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
export function checkCommand(command) {
|
|
69
|
+
if (runtimeConfig.unrestricted) return { warned: false, mode: 'allow', unrestricted: true, findings: [] };
|
|
69
70
|
const normalized = normalize(command);
|
|
70
71
|
const parts = segments(normalized);
|
|
71
72
|
const findings = [];
|
package/src/tools/stats.mjs
CHANGED
|
@@ -14,6 +14,11 @@ export async function getRuntimeInfoTool() {
|
|
|
14
14
|
version: VERSION,
|
|
15
15
|
runtime: describeConfig(),
|
|
16
16
|
policy: {
|
|
17
|
+
// Reported first because it changes how everything below should be read.
|
|
18
|
+
unrestricted: runtimeConfig.unrestricted,
|
|
19
|
+
...(runtimeConfig.unrestricted
|
|
20
|
+
? { unrestrictedNote: 'Unrestricted mode is on for this computer: any path and any command is allowed, and commands still run as the user the agent runs as, so sudo needs your own sudoers rules. Turn it off with `remcp godmode off` (or REMCP_RUNTIME_UNRESTRICTED=0) and restart the agent.' }
|
|
21
|
+
: {}),
|
|
17
22
|
allowedRoots: [...runtimeConfig.allowedRoots],
|
|
18
23
|
blockedCommands: [...runtimeConfig.blockedCommands],
|
|
19
24
|
dangerousCommands: runtimeConfig.dangerousCommands,
|