opencode-landstrip 0.18.34 → 0.18.36
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 +23 -70
- package/index.ts +56 -467
- package/package.json +2 -2
- package/shared.ts +100 -37
- package/tui.ts +290 -154
- package/LICENSE +0 -201
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# opencode-landstrip
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[`landstrip`](https://github.com/landstrip/landstrip).
|
|
3
|
+
OpenCode plugin that runs AI `bash` calls through Landstrip.
|
|
5
4
|
|
|
6
5
|
## Install
|
|
7
6
|
|
|
@@ -13,85 +12,39 @@ opencode plugin install opencode-landstrip
|
|
|
13
12
|
opencode plugin install opencode-landstrip --global
|
|
14
13
|
```
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
`opencode.json`:
|
|
18
|
-
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"$schema": "https://opencode.ai/config.json",
|
|
22
|
-
"plugin": ["opencode-landstrip"]
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Add the presenter to `tui.json`:
|
|
27
|
-
|
|
28
|
-
```json
|
|
29
|
-
{
|
|
30
|
-
"$schema": "https://opencode.ai/config.json",
|
|
31
|
-
"plugin": ["opencode-landstrip/tui"]
|
|
32
|
-
}
|
|
33
|
-
```
|
|
15
|
+
The installer configures both the server plugin and TUI presenter.
|
|
34
16
|
|
|
35
17
|
## Permissions
|
|
36
18
|
|
|
37
|
-
OpenCode
|
|
38
|
-
|
|
39
|
-
|
|
19
|
+
OpenCode permissions authorize tool dispatch. Landstrip permissions authorize
|
|
20
|
+
filesystem and network access. Agent approval never bypasses a sandbox hard
|
|
21
|
+
denial, and requests without a live presenter are denied.
|
|
40
22
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Filesystem approvals may be stored in `.opencode/sandbox.json` for the project
|
|
46
|
-
or `~/.config/opencode/sandbox.json` globally. `/sandbox` displays or toggles the
|
|
47
|
-
policy. It updates the project file when that file defines `enabled`, otherwise
|
|
48
|
-
the global file.
|
|
23
|
+
OpenCode intentionally exposes one plugin slash command: `/landstrip`, which
|
|
24
|
+
opens the bottom management pane. Pi-only agent and task subcommands are not
|
|
25
|
+
available. Persistent approvals update `.opencode/sandbox.json` or
|
|
26
|
+
`~/.config/opencode/sandbox.json`.
|
|
49
27
|
|
|
50
28
|
## Configuration
|
|
51
29
|
|
|
52
30
|
Policy merges in this order:
|
|
53
31
|
|
|
54
|
-
1. bundled
|
|
32
|
+
1. bundled `sandbox.json`;
|
|
55
33
|
2. `~/.config/opencode/sandbox.json`;
|
|
56
34
|
3. `.opencode/sandbox.json`;
|
|
57
35
|
4. plugin options.
|
|
58
36
|
|
|
59
37
|
Objects merge recursively, arrays combine, and later scalar values replace
|
|
60
|
-
earlier values. The
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
| `network.allowAllUnixSockets` | `false` |
|
|
74
|
-
| `network.allowUnixSockets` | `[]` |
|
|
75
|
-
| `network.allowedDomains` | `[]` |
|
|
76
|
-
| `network.deniedDomains` | `[]` |
|
|
77
|
-
|
|
78
|
-
Filesystem and core network semantics follow the main
|
|
79
|
-
[Landstrip policy](https://github.com/landstrip/landstrip#policy). `allowedDomains`
|
|
80
|
-
and `deniedDomains` are plugin-only fields enforced by its local HTTP/HTTPS proxy.
|
|
81
|
-
|
|
82
|
-
If `enabled` is true but the Landstrip binary, version, or platform is unusable,
|
|
83
|
-
AI Bash fails closed rather than running without isolation. Set `enabled` to
|
|
84
|
-
false explicitly to allow unsandboxed AI Bash.
|
|
85
|
-
|
|
86
|
-
## Limits
|
|
87
|
-
|
|
88
|
-
Only AI `bash` calls are process-sandboxed. Shell-mode commands entered directly
|
|
89
|
-
by the user cannot be replaced through OpenCode's plugin API. They may inherit
|
|
90
|
-
proxy settings and receive policy checks, but they do not have OS isolation.
|
|
91
|
-
|
|
92
|
-
See the main [Landstrip documentation](https://github.com/landstrip/landstrip#readme) for platform limits.
|
|
93
|
-
|
|
94
|
-
## License
|
|
95
|
-
|
|
96
|
-
`opencode-landstrip` is licensed under `Apache-2.0`. The bundled Landstrip
|
|
97
|
-
package is licensed separately as `Apache-2.0 AND LGPL-2.1-or-later`.
|
|
38
|
+
earlier values. The bundled policy denies sensitive files and network access
|
|
39
|
+
while allowing project writes. See [`sandbox.json`](sandbox.json) for its exact
|
|
40
|
+
defaults.
|
|
41
|
+
|
|
42
|
+
If sandboxing is enabled but the binary or platform is unusable, AI Bash fails
|
|
43
|
+
closed. Set `enabled` to `false` explicitly to allow unsandboxed AI Bash.
|
|
44
|
+
|
|
45
|
+
Only AI `bash` calls receive OS isolation; direct user shell commands cannot be
|
|
46
|
+
replaced through OpenCode's plugin API.
|
|
47
|
+
|
|
48
|
+
## Licensing
|
|
49
|
+
|
|
50
|
+
[Apache 2.0](../../LICENSE-APACHE-2.0).
|