opencode-landstrip 0.18.3 → 0.18.5
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 +26 -46
- package/package.json +3 -3
- package/tui.ts +3 -3
package/README.md
CHANGED
|
@@ -1,33 +1,23 @@
|
|
|
1
1
|
# opencode-landstrip
|
|
2
2
|
|
|
3
|
-
`opencode-landstrip`
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
`opencode-landstrip` sandboxes OpenCode AI `bash` calls with
|
|
4
|
+
[`landstrip`](https://github.com/landstrip/landstrip) and the supported Anthropic
|
|
5
|
+
Sandbox Runtime policy fields.
|
|
6
6
|
|
|
7
|
-
The
|
|
8
|
-
|
|
7
|
+
The bundled [policy](./sandbox.json) is merged with global, project, and plugin
|
|
8
|
+
options in that order.
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
|
-
### Automatic install
|
|
13
|
-
|
|
14
|
-
Install for the current project:
|
|
15
|
-
|
|
16
12
|
```sh
|
|
13
|
+
# Current project
|
|
17
14
|
opencode plugin install opencode-landstrip
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Install globally:
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
# Global
|
|
23
17
|
opencode plugin install opencode-landstrip --global
|
|
24
18
|
```
|
|
25
19
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
For a manual installation, update OpenCode's configuration files.
|
|
29
|
-
|
|
30
|
-
Add the plugin to `opencode.json`:
|
|
20
|
+
For a manual install, add the server plugin to `opencode.json`:
|
|
31
21
|
|
|
32
22
|
```json
|
|
33
23
|
{
|
|
@@ -36,7 +26,7 @@ Add the plugin to `opencode.json`:
|
|
|
36
26
|
}
|
|
37
27
|
```
|
|
38
28
|
|
|
39
|
-
Add TUI
|
|
29
|
+
Add the TUI plugin to `tui.json`:
|
|
40
30
|
|
|
41
31
|
```json
|
|
42
32
|
{
|
|
@@ -45,41 +35,31 @@ Add TUI entry point to `tui.json`:
|
|
|
45
35
|
}
|
|
46
36
|
```
|
|
47
37
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{
|
|
52
|
-
"$schema": "https://opencode.ai/config.json",
|
|
53
|
-
"plugin": [["opencode-landstrip", { "enabled": false }]]
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
The `/sandbox` command shows the current configuration and toggles the sandbox
|
|
58
|
-
on or off. The toggle persists `enabled` to the project config when it already
|
|
59
|
-
sets it, otherwise to the global config.
|
|
38
|
+
Run `/sandbox` to inspect or toggle the sandbox. The toggle writes to the
|
|
39
|
+
project config if it already defines `enabled`; otherwise it writes to the
|
|
40
|
+
global config.
|
|
60
41
|
|
|
61
42
|
## Behavior
|
|
62
43
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
OpenCode's native permission and question prompts take priority; the Landstrip
|
|
68
|
-
prompt returns after they are resolved. The user can allow once, allow for the
|
|
69
|
-
session, persist a filesystem approval for the project or globally, or deny the
|
|
70
|
-
request.
|
|
44
|
+
AI `bash` calls run through Landstrip. Direct network access is blocked by
|
|
45
|
+
default; the plugin's local HTTP and HTTPS proxy enforces `allowedDomains` and
|
|
46
|
+
`deniedDomains`.
|
|
47
|
+
The domain lists are plugin policy fields, not core Landstrip fields.
|
|
71
48
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
49
|
+
OpenCode handles normal tool permissions before dispatch. On Linux, Landstrip
|
|
50
|
+
can also pause a blocked filesystem or network operation and show an inline
|
|
51
|
+
approval prompt. Filesystem approvals may be saved to
|
|
52
|
+
`.opencode/sandbox.json` or `~/.config/opencode/sandbox.json`.
|
|
75
53
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
54
|
+
Shell-mode commands typed by the user are not process-sandboxed because
|
|
55
|
+
OpenCode's plugin API cannot replace their execution. They may inherit proxy
|
|
56
|
+
settings and receive policy checks, but they do not have an OS sandbox.
|
|
57
|
+
|
|
58
|
+
See the main [Landstrip documentation](https://github.com/landstrip/landstrip#readme)
|
|
59
|
+
for policy semantics and platform limits.
|
|
79
60
|
|
|
80
61
|
## License
|
|
81
62
|
|
|
82
63
|
`opencode-landstrip` is licensed under `Apache-2.0`. See [LICENSE](LICENSE).
|
|
83
|
-
|
|
84
64
|
The bundled `@landstrip/landstrip` package is licensed separately as
|
|
85
65
|
`Apache-2.0 AND LGPL-2.1-or-later`.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-landstrip",
|
|
3
|
-
"version": "0.18.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.18.5",
|
|
4
|
+
"description": "OS-level AI command sandboxing for OpenCode with Landstrip",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"landlock",
|
|
7
7
|
"landstrip",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"ci:test": "npm test"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@landstrip/landstrip": "^0.18.
|
|
51
|
+
"@landstrip/landstrip": "^0.18.5",
|
|
52
52
|
"@opentui/solid": ">=0.3.4",
|
|
53
53
|
"solid-js": "1.9.12"
|
|
54
54
|
},
|
package/tui.ts
CHANGED
|
@@ -616,7 +616,7 @@ const tui: TuiPlugin = async (api, options, meta) => {
|
|
|
616
616
|
namespace: 'palette',
|
|
617
617
|
name: 'sandbox',
|
|
618
618
|
title: 'Sandbox',
|
|
619
|
-
desc: '
|
|
619
|
+
desc: 'Inspect and toggle the sandbox',
|
|
620
620
|
category: 'Sandbox',
|
|
621
621
|
suggested: true,
|
|
622
622
|
slash: { name: 'sandbox' },
|
|
@@ -630,7 +630,7 @@ const tui: TuiPlugin = async (api, options, meta) => {
|
|
|
630
630
|
{
|
|
631
631
|
title: 'Sandbox',
|
|
632
632
|
value: 'sandbox',
|
|
633
|
-
description: '
|
|
633
|
+
description: 'Inspect and toggle the sandbox',
|
|
634
634
|
category: 'Sandbox',
|
|
635
635
|
suggested: true,
|
|
636
636
|
slash: { name: 'sandbox' },
|
|
@@ -676,7 +676,7 @@ const tui: TuiPlugin = async (api, options, meta) => {
|
|
|
676
676
|
api.kv.set('onboarded', true);
|
|
677
677
|
api.ui.toast({
|
|
678
678
|
title: 'Sandbox active',
|
|
679
|
-
message: '
|
|
679
|
+
message: 'Landstrip sandbox is on. Run /sandbox to inspect it.',
|
|
680
680
|
variant: 'info',
|
|
681
681
|
duration: 8000,
|
|
682
682
|
});
|