@bojackduy/opencode-loopd 1.10.1 → 1.10.4
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/CHANGELOG.md +15 -0
- package/README.md +13 -6
- package/commands/goal.md +2 -0
- package/dist/server.js +3921 -188
- package/dist/tui.js +12128 -2274
- package/package.json +5 -1
- package/skills/loopd/SKILL.md +171 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased — Command sessions replace opencode-pty + sentinel
|
|
4
|
+
|
|
5
|
+
> `loopd_command_*` now covers everything `opencode-pty` (`pty_spawn/write/read/list/kill`) and `opencode-sentinel` (`sentinel_monitor/stop/list`) do — remove both plugins from config. Live-smoked on the real PTY backend (timeout, until-stop, pattern read, env, terminate+remove).
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **M1 pty parity** — `env` (values to host, names-only persistence), `timeout_seconds` (in-memory deadline → terminate path, `endReason=timeout`, always notifies), `shell:true` (`/bin/sh -c`), `pattern`+`ignore_case` log read (ANSI-stripped match, ReDoS guard), `terminate remove:true`, `endReason` (`exit|terminate|timeout|until|missing`) on every terminal transition.
|
|
10
|
+
- **M2 sentinel watcher engine** — `watch_filter`/`watch_until`/`watch_ignore_case`/`watch_until_action (stop|keep)` at start, `loopd_command_watch` on running commands; 2s coalescing (20 lines/4KB), 100-lines/sec flood-suspend (process keeps running), 30-push budget; `until:stop` terminates with `endReason=until` and exactly one owner message; `loopd_command_await until:` wakes a goal once on match without stopping.
|
|
11
|
+
- **M3 surface** — watch badges + endReason in Commands tab, watch counters in detail panel, SKILL.md watching guide with pty + sentinel migration tables, de-polled `loopd_command_get` docs.
|
|
12
|
+
- **Owner auto-notify policy** — failure, lost-host `missing`, `timeout`, or ≥2min long-running success; `notify_on_exit` overrides.
|
|
13
|
+
|
|
14
|
+
### Live proof
|
|
15
|
+
|
|
16
|
+
- Scratch harness (real host + real service): timeout→`terminated/timeout`+notify; until→`terminated/until` with 1 notify and `until-matched` state; pattern read returns ANSI-original lines case-insensitively, rejects `(a+)+`; env value reaches process while state keeps only the name; terminate+remove in one call. 555 tests pass.
|
|
17
|
+
|
|
3
18
|
## 1.7.0 (2026-08-25) — Scheduled Intervals
|
|
4
19
|
|
|
5
20
|
> Interval requeue for repetitive dialogues — one `/goal` covers `monitor deploy` `periodic tests` `keep going` without manual re-prompt. `5s` `createScheduleWorker` resurrects `complete → active` with `Scheduled tick N/M`.
|
package/README.md
CHANGED
|
@@ -144,12 +144,15 @@ The agent will clarify (what/where/how to verify) and then call `loopd_create_go
|
|
|
144
144
|
|
|
145
145
|
Press **`<leader>o`** or open the command palette → **"Loop Dashboard"** (also `/loop`).
|
|
146
146
|
|
|
147
|
-
Dashboard (NORMAL / INSERT `:`):
|
|
148
|
-
|
|
149
|
-
- `
|
|
150
|
-
- `g/G` — top / bottom
|
|
151
|
-
- `o` — open child session (
|
|
152
|
-
|
|
147
|
+
Dashboard (NORMAL / INSERT `:`) — shared Goals/Commands tabs:
|
|
148
|
+
|
|
149
|
+
- `Tab` — toggle Goals / Commands · `h` Goals · `l` Commands (`/commands` opens on Commands)
|
|
150
|
+
- `j/k` — move selection · `g/G` — top / bottom (active tab only)
|
|
151
|
+
- `o` — goals: open child session (native OpenCode view) · commands: close
|
|
152
|
+
popup, open fullscreen terminal page (route `opencode.loopd.terminal`)
|
|
153
|
+
- `p/r/R/x` — pause / resume / retry / clear selected goal (Goals tab only)
|
|
154
|
+
- Commands tab: `:new <command> [args...]` launch · `:interrupt` ·
|
|
155
|
+
`:terminate` · `:remove` · bare text + Enter writes stdin (owner-scoped)
|
|
153
156
|
- `:` — insert mode → `:send <message>` to steer, `:force` / `:block` to finish manually
|
|
154
157
|
- `?` — toggle help — help stays open while you type
|
|
155
158
|
- `Ctrl+N` — back to NORMAL
|
|
@@ -157,6 +160,10 @@ Dashboard (NORMAL / INSERT `:`):
|
|
|
157
160
|
|
|
158
161
|
> The dashboard traps all keys — even when open via the palette, the chat input cursor won't blink underneath.
|
|
159
162
|
|
|
163
|
+
Fullscreen terminal page: raw typing goes straight to the PTY, `Ctrl+C`
|
|
164
|
+
interrupts (never closes OpenCode), `Ctrl+]` detaches back to your session
|
|
165
|
+
(the command keeps running — termination is explicit-only), paste is instant.
|
|
166
|
+
|
|
160
167
|
### 3. Inspect from the main agent (owner tools)
|
|
161
168
|
|
|
162
169
|
The parent never needs the dashboard — it can ask:
|
package/commands/goal.md
CHANGED
|
@@ -6,6 +6,8 @@ Create a new background loop goal using the `loopd_create_goal` tool.
|
|
|
6
6
|
|
|
7
7
|
A goal is a **contract**: `objective` (semantic requirements) + `checks` (deterministic host acceptance) + `agent`/`model`/`workspaceWrite`/`checkCwd`/`limits`. The host is the acceptance authority; the worker proposes completion and the host rejects it if `checks` fail (free retry <3, `blocked` after 3).
|
|
8
8
|
|
|
9
|
+
If the user just wants to **run and watch/interact with a single process** (dev server, `test --watch`, REPL, log tail, one-off script) with no multi-turn AI reasoning involved, that's a `loopd_command_start` command session instead — lighter weight, no agent/checks/turns. Only proceed with this command when the request genuinely needs an autonomous AI worker.
|
|
10
|
+
|
|
9
11
|
First, gather what you need to craft a good contract:
|
|
10
12
|
- If the user gave a vague objective, ask 1–3 short clarifying questions (what to accomplish, where, and how they'll verify it — i.e., what `checks` should be).
|
|
11
13
|
- If the user was specific, skip straight to creating it.
|