@erichll/pi-auto-review 0.18.1 → 0.18.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/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/review/config.ts +7 -1
- package/src/review/guards.ts +0 -5
- package/src/review/input.ts +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.2 - 2026-09-17
|
|
4
|
+
|
|
5
|
+
- Treat empty or whitespace-only `.pi/pi-auto-review.json` files as missing
|
|
6
|
+
configuration instead of throwing `SyntaxError`. This prevents `session_start`
|
|
7
|
+
from disabling automatic reviews for an entire session when Linux bubblewrap
|
|
8
|
+
creates a 0-byte mount point stub for deny-write paths (fixes #6).
|
|
9
|
+
- Apply the same empty-file tolerance to the user-global config loader.
|
|
10
|
+
- Remove redundant files from `protectedFiles` in `guards.ts` (`settings.json`,
|
|
11
|
+
`permissions.json`, and unused `sandbox.json`) so workspaces can configure
|
|
12
|
+
standard settings without triggering security tampering hard-denials.
|
|
13
|
+
|
|
3
14
|
## 0.18.1 - 2026-09-11
|
|
4
15
|
|
|
5
16
|
- Animate the live `reviewing` label in the above-editor widget with a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@erichll/pi-auto-review",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"description": "Fail-closed, model-backed approval broker for Pi: deterministically hard-denies dangerous operations, reviews dangerous boundaries with a reviewer model, and issues one-shot expiring grants that OS sandbox adapters must consume before retrying.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/review/config.ts
CHANGED
|
@@ -241,7 +241,13 @@ export function loadTrustedConfig(
|
|
|
241
241
|
const path = options.userConfigPath ?? userConfigPath();
|
|
242
242
|
let value: unknown;
|
|
243
243
|
try {
|
|
244
|
-
|
|
244
|
+
const content = readFileSync(path, "utf8");
|
|
245
|
+
if (!content.trim()) {
|
|
246
|
+
// Treat empty/whitespace-only file the same as missing — sandbox
|
|
247
|
+
// runtime may leave 0-byte mount-point stubs for denyWrite paths.
|
|
248
|
+
return packageConfig;
|
|
249
|
+
}
|
|
250
|
+
value = JSON.parse(content);
|
|
245
251
|
} catch (error) {
|
|
246
252
|
if (
|
|
247
253
|
error &&
|
package/src/review/guards.ts
CHANGED
|
@@ -31,12 +31,7 @@ export function protectedWriteHardDeny(
|
|
|
31
31
|
join(agentDir, "extensions", "pi-auto-review"),
|
|
32
32
|
];
|
|
33
33
|
const protectedFiles = [
|
|
34
|
-
join(request.cwd, ".pi", "settings.json"),
|
|
35
|
-
join(request.cwd, ".pi", "sandbox.json"),
|
|
36
34
|
join(request.cwd, PROJECT_CONFIG_PATH),
|
|
37
|
-
join(agentDir, "settings.json"),
|
|
38
|
-
join(agentDir, "permissions.json"),
|
|
39
|
-
join(agentDir, "sandbox.json"),
|
|
40
35
|
userConfigPath(),
|
|
41
36
|
];
|
|
42
37
|
if (
|
package/src/review/input.ts
CHANGED
|
@@ -39,7 +39,13 @@ export function sessionConfig(
|
|
|
39
39
|
const projectPath = join(cwd, PROJECT_CONFIG_PATH);
|
|
40
40
|
let raw: unknown;
|
|
41
41
|
try {
|
|
42
|
-
|
|
42
|
+
const content = readFileSync(projectPath, "utf8");
|
|
43
|
+
if (!content.trim()) {
|
|
44
|
+
// Treat empty/whitespace-only file the same as missing — sandbox
|
|
45
|
+
// runtime may leave 0-byte mount-point stubs for denyWrite paths.
|
|
46
|
+
return Object.freeze({ ...trusted });
|
|
47
|
+
}
|
|
48
|
+
raw = JSON.parse(content);
|
|
43
49
|
} catch (error) {
|
|
44
50
|
if (
|
|
45
51
|
error &&
|