@bojackduy/opencode-loopd 1.10.3 → 1.10.5
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/commands/goal.md +4 -2
- package/dist/server.js +1717 -82
- package/dist/tui.js +1437 -906
- package/package.json +1 -1
- package/skills/loopd/SKILL.md +203 -20
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/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.
|
|
@@ -14,8 +16,8 @@ When you have enough to write a concrete contract:
|
|
|
14
16
|
1. Call `loopd_create_goal` with:
|
|
15
17
|
- `name` — a short slug (e.g. "pdf-notes")
|
|
16
18
|
- `objective` — a precise, self-contained statement including verification criteria
|
|
17
|
-
- `agent` — any OpenCode agent name: built-in (`general`, `explore`), `~/.config/opencode/agents/*.md`, or `opencode.jsonc` `agent.*`. Discover with `opencode agent list`. Prefer `subagent`-mode agents for workers; `primary`-mode agents work but may expect user interaction.
|
|
18
|
-
- `model` — any model as `"providerID/modelID"` (e.g. `openai/gpt-5.6-sol`, `ollama/qwen3.8:27b`). Discover with `opencode models [provider]`. Sent on every worker prompt
|
|
19
|
+
- `agent` — any OpenCode agent name: built-in (`general`, `explore`), `~/.config/opencode/agents/*.md`, or `opencode.jsonc` `agent.*`. Discover with `opencode agent list`. Prefer `subagent`-mode agents for workers; `primary`-mode agents work but may expect user interaction. **Omit by default — inherits calling session's live agent, then `defaultAgent`.** Only pass when explicitly requested.
|
|
20
|
+
- `model` — any model as `"providerID/modelID"` (e.g. `openai/gpt-5.6-sol`, `ollama/qwen3.8:27b`). Discover with `opencode models [provider]`. Sent on every worker prompt. **Omit by default — inherits calling session's live model, then `defaultModel`.** Only pass when explicitly requested.
|
|
19
21
|
- `checks` — shell commands that must pass before `complete_goal` is accepted; **mandatory when `workspaceWrite:true`** (the default) — or configure `defaultChecks` in `opencode.jsonc`
|
|
20
22
|
- `workspaceWrite` — default `true` (safe — may touch the shared repo; only one active writer allowed — second `start`/`resume` fails with `already active`); set `false` explicitly for artifact-only/read-only work to allow concurrency
|
|
21
23
|
- `checkCwd` — optional directory where `checks` run; writers default to project root, artifact-only jobs default to their `artifactDir`
|