opencode-zellij 0.0.1

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 ADDED
@@ -0,0 +1,59 @@
1
+ # opencode-zellij
2
+
3
+ [正體中文](README.zh.md)
4
+
5
+ Give OpenCode a way to use visible Zellij panes for work that should not disappear into a one-shot tool call.
6
+
7
+ Use OpenCode's built-in `bash` for normal commands. Use this plugin when the process should stay alive, remain visible, or need later input.
8
+
9
+ ## Good fits
10
+
11
+ - dev servers and watchers
12
+ - REPLs and interactive CLIs
13
+ - SSH or remote sessions
14
+ - commands that ask follow-up questions
15
+ - privileged commands that need human review
16
+
17
+ ## Ask OpenCode like this
18
+
19
+ ```text
20
+ Start the dev server in a visible Zellij pane and wait until it is ready.
21
+ ```
22
+
23
+ ```text
24
+ Check the server pane for errors.
25
+ ```
26
+
27
+ ```text
28
+ Send Enter to the interactive pane and show me the latest output.
29
+ ```
30
+
31
+ ```text
32
+ Open a human-reviewed pane for the sudo install step.
33
+ ```
34
+
35
+ ```text
36
+ Close the dev server pane.
37
+ ```
38
+
39
+ ## Tools
40
+
41
+ | Tool | Use |
42
+ | --- | --- |
43
+ | `zellij_pty_spawn` | Start a visible Zellij pane. |
44
+ | `zellij_pty_read` | Read recent pane output. |
45
+ | `zellij_pty_write` | Send input to an interactive pane. |
46
+ | `zellij_pty_list` | Show panes known to the plugin. |
47
+ | `zellij_pty_kill` | Close a pane created by the plugin. |
48
+ | `request_sudo` | Ask the user to review and run privileged commands in Zellij. |
49
+
50
+ ## Human-only work
51
+
52
+ `request_sudo` opens a review pane, shows what will run, and waits for the user to type `YES`. The agent cannot type into that pane, so passwords and credentials stay in Zellij instead of entering prompts or tool arguments.
53
+
54
+ ## Notes
55
+
56
+ - This is not a sandbox.
57
+ - Session records are in-memory only; restarting OpenCode loses them.
58
+ - Output is rendered Zellij output, not raw PTY bytes.
59
+ - Exit code capture is best-effort for commands started by the plugin.
package/README.zh.md ADDED
@@ -0,0 +1,59 @@
1
+ # opencode-zellij
2
+
3
+ [English](README.md)
4
+
5
+ 讓 OpenCode 可以使用可見的 Zellij panes,處理不適合消失在一次性 tool call 裡的工作。
6
+
7
+ 一般 commands 請使用 OpenCode 內建的 `bash`。當 process 應該持續存在、保持可見,或需要後續輸入時,才使用這個 plugin。
8
+
9
+ ## 適合情境
10
+
11
+ - dev servers 與 watchers
12
+ - REPLs 與互動式 CLIs
13
+ - SSH 或 remote sessions
14
+ - 會詢問後續問題的 commands
15
+ - 需要人類審核的 privileged commands
16
+
17
+ ## 可以這樣要求 OpenCode
18
+
19
+ ```text
20
+ 在可見的 Zellij pane 中啟動 dev server,並等待它 ready。
21
+ ```
22
+
23
+ ```text
24
+ 檢查 server pane 有沒有錯誤。
25
+ ```
26
+
27
+ ```text
28
+ 對互動式 pane 送出 Enter,然後顯示最新 output。
29
+ ```
30
+
31
+ ```text
32
+ 為 sudo install step 開一個 human-reviewed pane。
33
+ ```
34
+
35
+ ```text
36
+ 關閉 dev server pane。
37
+ ```
38
+
39
+ ## Tools
40
+
41
+ | Tool | 用途 |
42
+ | --- | --- |
43
+ | `zellij_pty_spawn` | 啟動可見的 Zellij pane。 |
44
+ | `zellij_pty_read` | 讀取最近的 pane output。 |
45
+ | `zellij_pty_write` | 對互動式 pane 送出 input。 |
46
+ | `zellij_pty_list` | 顯示 plugin 已知的 panes。 |
47
+ | `zellij_pty_kill` | 關閉 plugin 建立的 pane。 |
48
+ | `request_sudo` | 請使用者在 Zellij 中審核並執行 privileged commands。 |
49
+
50
+ ## Human-only work
51
+
52
+ `request_sudo` 會開啟 review pane、顯示即將執行的內容,並等待使用者輸入 `YES`。Agent 不能在該 pane 中輸入,因此 passwords 與 credentials 會留在 Zellij,而不是進入 prompts 或 tool arguments。
53
+
54
+ ## 注意事項
55
+
56
+ - 這不是 sandbox。
57
+ - Session records 只存在於 memory;重啟 OpenCode 後會遺失。
58
+ - Output 是 rendered Zellij output,不是 raw PTY bytes。
59
+ - 由 plugin 啟動的 commands 會 best-effort 捕捉 exit code。
@@ -0,0 +1,7 @@
1
+ import { Plugin } from "@opencode-ai/plugin";
2
+
3
+ //#region src/plugin.d.ts
4
+ declare const ZellijPtyPlugin: Plugin;
5
+ //#endregion
6
+ export { ZellijPtyPlugin, ZellijPtyPlugin as default };
7
+ //# sourceMappingURL=index.d.mts.map