opencode-cockpit 0.1.5 → 0.2.0
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 +36 -11
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -59,6 +59,19 @@ their final frame, repeated lines folded to `(×12)`, and every read returns a c
|
|
|
59
59
|
one only brings what's new. For full-screen programs (`vitest --ui`, `htop`, prompts) the agent can
|
|
60
60
|
ask for the *screen* instead of the log.
|
|
61
61
|
|
|
62
|
+
**It notices breakage on its own.** Watch a process that never exits and the agent hears only about
|
|
63
|
+
changes, never about a thousand identical recompiles:
|
|
64
|
+
```
|
|
65
|
+
shell_start command="tsc --watch --noEmit" description="type checker" watch=true
|
|
66
|
+
→ tsc: ok → fail · src/auth.ts(42,3): error TS2339: Property 'id' does not exist
|
|
67
|
+
```
|
|
68
|
+
Presets cover about 35 tools (tsc, vitest, jest, eslint, cargo, go, gradle, pytest, vite, next,
|
|
69
|
+
docker compose…), and anything else takes three regexes of its own. A watched process that dies
|
|
70
|
+
counts as a failure, so a crashed dev server is reported too.
|
|
71
|
+
|
|
72
|
+
**You can find things in a huge log.** `/` in the console filters the scrollback to matching lines,
|
|
73
|
+
keeping line numbers and highlighting matches — and output keeps the colours the program printed.
|
|
74
|
+
|
|
62
75
|
**It can type.** Prompts, REPLs, migration wizards: `shell_send` sends text or named keys
|
|
63
76
|
(`ctrl+c`, `up`, `enter`) and returns whatever the program printed back.
|
|
64
77
|
|
|
@@ -70,6 +83,7 @@ ask for the *screen* instead of the log.
|
|
|
70
83
|
| Knowing something is ready | Guess, or sleep and poll | Blocks on a port, a pattern, silence or exit |
|
|
71
84
|
| Interactive programs | Not possible (no TTY) | Real PTY: prompts, REPLs, ctrl+c |
|
|
72
85
|
| Reading output | Whole log, every time | Clean lines from a cursor, with grep |
|
|
86
|
+
| Noticing a break later | Never | Watchers report health changes |
|
|
73
87
|
| Your visibility | None until it finishes | Live panel, console and sidebar |
|
|
74
88
|
| After OpenCode restarts | Gone | Still running |
|
|
75
89
|
|
|
@@ -81,6 +95,7 @@ ask for the *screen* instead of the log.
|
|
|
81
95
|
| `ctrl+x i` · `/shell` | Open the shell console |
|
|
82
96
|
| `/shell-new` | Start a shell yourself |
|
|
83
97
|
| `/shells-clear` | Remove finished shells |
|
|
98
|
+
| `/cockpit-update` | Update the plugin when a newer release exists |
|
|
84
99
|
|
|
85
100
|
Status reads the same everywhere — `RUN` (with a spinner), `FAIL`, `STOP`, `DONE` — running shells
|
|
86
101
|
and recent failures stay in view, the rest folds behind `▸ N more`. In the console: `i` types
|
|
@@ -105,20 +120,32 @@ Restart OpenCode. Requires OpenCode 1.18+ on macOS or Linux. Install a feature e
|
|
|
105
120
|
`opencode-cockpit` or on its own — if both are configured, the first one loaded is used and
|
|
106
121
|
OpenCode warns you which entry to remove.
|
|
107
122
|
|
|
108
|
-
**Turn features off
|
|
123
|
+
**Turn features off** (in both `opencode.json` and `tui.json`):
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"plugin": [["opencode-cockpit", { "features": { "shell": true } }]]
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Configure them** in one file, read by both halves of the plugin and by every project:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
~/.config/opencode-cockpit/config.json → <project>/.cockpit.json → plugin-entry options
|
|
135
|
+
```
|
|
109
136
|
|
|
110
137
|
```json
|
|
111
138
|
{
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
"shell": { "dockHeight": 16, "historyMinutes": 60 }
|
|
116
|
-
}]
|
|
117
|
-
]
|
|
139
|
+
"kinds": { "e2e": "playwright|cypress" },
|
|
140
|
+
"defaults": { "logFile": true, "timeoutSeconds": 900 },
|
|
141
|
+
"ui": { "dockHeight": 16, "historyMinutes": 60 }
|
|
118
142
|
}
|
|
119
143
|
```
|
|
120
144
|
|
|
121
|
-
|
|
145
|
+
Later sources win key by key, and an invalid file is ignored rather than fatal. You can categorize
|
|
146
|
+
your own commands, define watch rules, cap how long shells live, choose what may interrupt the
|
|
147
|
+
agent, and trade context tokens for accuracy. Each feature's README documents its own settings:
|
|
148
|
+
[Shell](https://github.com/Codestz/opencode-cockpit/tree/main/packages/shell#configuration).
|
|
122
149
|
|
|
123
150
|
## How it works
|
|
124
151
|
|
|
@@ -147,11 +174,9 @@ Each shell's output feeds three views at once: a normalized **log** for the agen
|
|
|
147
174
|
|
|
148
175
|
## Roadmap
|
|
149
176
|
|
|
150
|
-
- **Watchers** — `tsc`, `eslint` and `vitest` that report only *state changes*: "ok → 3 errors in
|
|
151
|
-
auth.ts", never a wall of repeated output.
|
|
152
177
|
- **Agents** — live subagent tree with a peek overlay.
|
|
153
178
|
- **Doctor** — one command that checks your setup and tells you how to fix it.
|
|
154
|
-
-
|
|
179
|
+
- Shell groups in the sidebar, if the five-row cap ever stops being enough.
|
|
155
180
|
|
|
156
181
|
## Contributing
|
|
157
182
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-cockpit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "OpenCode superpowers, all in one: installs every opencode-cockpit feature (Shell today), each can be switched off",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@opencode-cockpit/shell": "0.
|
|
51
|
+
"@opencode-cockpit/shell": "0.2.0",
|
|
52
52
|
"@opencode-ai/plugin": "1.18.31"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@opencode-cockpit/client": "0.
|
|
55
|
+
"@opencode-cockpit/client": "0.2.0"
|
|
56
56
|
}
|
|
57
57
|
}
|