mtech-ai-local-runner 0.1.25 → 0.1.26
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
CHANGED
|
@@ -10,6 +10,15 @@ The package stores safe runner configuration locally and keeps OAuth refresh cre
|
|
|
10
10
|
|
|
11
11
|
Public npm installation requires no npm account or publishing OTP. Setup requires Gateway OAuth login, and local Claude Code must already be authenticated (`claude auth status`).
|
|
12
12
|
|
|
13
|
+
## 0.1.26: compiled private-file denial compatibility
|
|
14
|
+
|
|
15
|
+
The compiled `.env.*` blocked-path rule now denies that private-file family
|
|
16
|
+
without rejecting unrelated scoped reads. Private files at all depths,
|
|
17
|
+
read-only access and unsupported-pattern rejection remain enforced. Shared
|
|
18
|
+
Claude/Codex policy and actual MCP fake-data regressions use the full compiled
|
|
19
|
+
path combination. Foreground installation does not rerun Codex or update the
|
|
20
|
+
daemon; actual document acceptance still requires a separately approved run.
|
|
21
|
+
|
|
13
22
|
## 0.1.25: scoped reads and blocked diagnostics
|
|
14
23
|
|
|
15
24
|
Codex receives explicit file-scoped ai_local read/search guidance; launch and
|
|
@@ -15,6 +15,13 @@ function scopePath(root, scope) {
|
|
|
15
15
|
throw new Error('DENIED_UNSUPPORTED_SCOPE');
|
|
16
16
|
return path.resolve(root, directory);
|
|
17
17
|
}
|
|
18
|
+
function blockedScopeContains(root, scope, file) {
|
|
19
|
+
// The compiled repository policy includes this private-file family. Handle
|
|
20
|
+
// it only as a denial, never as a wildcard grant or an ignored block.
|
|
21
|
+
if (scope === '.env.*')
|
|
22
|
+
return file.startsWith(path.join(root, '.env.'));
|
|
23
|
+
return contains(scopePath(root, scope), file);
|
|
24
|
+
}
|
|
18
25
|
export class LocalToolPolicy {
|
|
19
26
|
options;
|
|
20
27
|
abort = new AbortController();
|
|
@@ -51,7 +58,7 @@ export class LocalToolPolicy {
|
|
|
51
58
|
if (typeof value !== 'string' || !value || value.includes('\0') || path.isAbsolute(value) || value.split(/[\\/]/).some(p => p === '..' || sensitive(p)))
|
|
52
59
|
throw new Error('DENIED_PATH');
|
|
53
60
|
const root = path.resolve(this.options.worktreeRoot), file = path.resolve(root, value);
|
|
54
|
-
if (!contains(root, file) || !this.options.allowedPaths.some(scope => contains(scopePath(root, scope), file)) || this.options.blockedPaths.some(scope =>
|
|
61
|
+
if (!contains(root, file) || !this.options.allowedPaths.some(scope => contains(scopePath(root, scope), file)) || this.options.blockedPaths.some(scope => blockedScopeContains(root, scope, file)))
|
|
55
62
|
throw new Error('DENIED_SCOPE');
|
|
56
63
|
if (await realpath(root) !== root)
|
|
57
64
|
throw new Error('DENIED_ROOT');
|