opencode-landstrip 0.18.39 → 0.18.41
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/index.ts +3 -3
- package/package.json +3 -4
package/index.ts
CHANGED
|
@@ -97,7 +97,7 @@ function matchDepth(filePath: string, patterns: string[], baseDirectory: string)
|
|
|
97
97
|
let depth = -1;
|
|
98
98
|
|
|
99
99
|
for (const pattern of patterns) {
|
|
100
|
-
if (pattern
|
|
100
|
+
if (/[*?[\]]/.test(pattern)) {
|
|
101
101
|
const absPattern = normalizePathForMatch(canonicalizeGlobPattern(pattern, baseDirectory));
|
|
102
102
|
if (globToRegExp(absPattern).test(abs)) depth = Math.max(depth, pathDepth(abs));
|
|
103
103
|
} else {
|
|
@@ -114,7 +114,7 @@ function matchDepth(filePath: string, patterns: string[], baseDirectory: string)
|
|
|
114
114
|
|
|
115
115
|
function resolveFilesystemPatterns(patterns: string[], baseDirectory: string): string[] {
|
|
116
116
|
return patterns.map((pattern) =>
|
|
117
|
-
pattern
|
|
117
|
+
/[*?[\]]/.test(pattern)
|
|
118
118
|
? canonicalizeGlobPattern(pattern, baseDirectory)
|
|
119
119
|
: canonicalizePath(pattern, baseDirectory),
|
|
120
120
|
);
|
|
@@ -248,7 +248,7 @@ function evaluateWritePermission(
|
|
|
248
248
|
const allowDepth = matchDepth(filePath, effectiveAllowWrite, baseDirectory);
|
|
249
249
|
const denyDepth = matchDepth(filePath, config.filesystem.denyWrite, baseDirectory);
|
|
250
250
|
|
|
251
|
-
if (denyDepth
|
|
251
|
+
if (denyDepth >= 0 && denyDepth >= allowDepth) {
|
|
252
252
|
return {
|
|
253
253
|
status: 'deny',
|
|
254
254
|
kind: 'write',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-landstrip",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.41",
|
|
4
4
|
"description": "OS-level AI command sandboxing for OpenCode with Landstrip",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"landlock",
|
|
@@ -48,14 +48,13 @@
|
|
|
48
48
|
"ci:test": "npm test"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@landstrip/landstrip-api": "^0.18.
|
|
51
|
+
"@landstrip/landstrip-api": "^0.18.41",
|
|
52
|
+
"@opentui/core": ">=0.3.4",
|
|
52
53
|
"@opentui/solid": ">=0.3.4",
|
|
53
54
|
"solid-js": "1.9.12"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
57
|
"@opencode-ai/plugin": "^1.17.7",
|
|
57
|
-
"@opentui/core": ">=0.3.4",
|
|
58
|
-
"@opentui/keymap": ">=0.3.4",
|
|
59
58
|
"@types/node": "^26.1.1",
|
|
60
59
|
"oxfmt": "^0.64.0",
|
|
61
60
|
"oxlint": "^1.68.0",
|