opencode-landstrip 0.16.6 → 0.16.7
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 +7 -3
- package/package.json +2 -2
- package/tui.ts +1 -1
package/index.ts
CHANGED
|
@@ -1252,7 +1252,11 @@ const plugin: Plugin = async ({ client, directory }: PluginInput, options?: Plug
|
|
|
1252
1252
|
},
|
|
1253
1253
|
|
|
1254
1254
|
'command.execute.before': async (input, output) => {
|
|
1255
|
-
|
|
1255
|
+
// OpenCode strips the leading slash before dispatching commands, so the
|
|
1256
|
+
// hook receives the bare name ("sandbox"); accept both forms so the
|
|
1257
|
+
// handler matches whether invoked by name or via tui.executeCommand.
|
|
1258
|
+
const command = input.command.trim().replace(/^\//, '');
|
|
1259
|
+
if (command === 'sandbox') {
|
|
1256
1260
|
const config = loadConfig(directory, optionOverrides);
|
|
1257
1261
|
pushCommandText(input, output, buildSandboxSummary(config));
|
|
1258
1262
|
await client.tui
|
|
@@ -1263,7 +1267,7 @@ const plugin: Plugin = async ({ client, directory }: PluginInput, options?: Plug
|
|
|
1263
1267
|
return;
|
|
1264
1268
|
}
|
|
1265
1269
|
|
|
1266
|
-
if (
|
|
1270
|
+
if (command === 'sandbox-disable') {
|
|
1267
1271
|
if (sandboxDisabled) {
|
|
1268
1272
|
pushCommandText(
|
|
1269
1273
|
input,
|
|
@@ -1290,7 +1294,7 @@ const plugin: Plugin = async ({ client, directory }: PluginInput, options?: Plug
|
|
|
1290
1294
|
return;
|
|
1291
1295
|
}
|
|
1292
1296
|
|
|
1293
|
-
if (
|
|
1297
|
+
if (command === 'sandbox-enable') {
|
|
1294
1298
|
if (!sandboxDisabled) {
|
|
1295
1299
|
pushCommandText(
|
|
1296
1300
|
input,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-landstrip",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.7",
|
|
4
4
|
"description": "Landlock-based sandboxing for opencode with landstrip",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"landlock",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"ci:test": "npm test"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@landstrip/landstrip": "^0.16.
|
|
52
|
+
"@landstrip/landstrip": "^0.16.11"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@opencode-ai/plugin": "^1.17.7",
|
package/tui.ts
CHANGED