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.
Files changed (6) hide show
  1. package/README.md +23 -70
  2. package/index.ts +56 -467
  3. package/package.json +2 -2
  4. package/shared.ts +100 -37
  5. package/tui.ts +290 -154
  6. package/LICENSE +0 -201
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # opencode-landstrip
2
2
 
3
- `opencode-landstrip` runs OpenCode AI `bash` calls through
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
- A manual installation needs both plugins. Add the server plugin to
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 agent permissions authorize tool dispatch. Landstrip sandbox
38
- permissions authorize filesystem and network access before a tool or while its
39
- process runs. Agent approval never bypasses a sandbox hard denial.
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
- The TUI presents one request at a time. OpenCode's native agent prompt has
42
- priority; Landstrip requests retain FIFO order and are routed to the originating
43
- root session. Without a live presenter, blocked sandbox requests are denied.
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 [`sandbox.json`](./sandbox.json);
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 global file is initialized from the bundled policy when it
61
- does not exist. Programmatic plugin options may be the policy object directly or
62
- `{ "config": { ... } }`.
63
-
64
- | Field | Bundled default |
65
- | ----------------------------- | --------------------------------------------------------------------------------------------------------------- |
66
- | `enabled` | `true` |
67
- | `filesystem.denyRead` | `["/Users", "/home"]` |
68
- | `filesystem.allowRead` | `[".", "~/.gitconfig", "~/.config/git/config", "/dev/null"]` |
69
- | `filesystem.allowWrite` | `[".", "/dev/null"]` |
70
- | `filesystem.denyWrite` | `["**/.env", "**/.env.*", "**/*.pem", "**/*.key", ".opencode/sandbox.json", "~/.config/opencode/sandbox.json"]` |
71
- | `network.allowNetwork` | `false` |
72
- | `network.allowLocalBinding` | `false` |
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).