@loomwright/cli 1.0.2 → 1.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/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes per release. `loomwright update` applies them to an installed workspace (see [docs/cli.md](docs/cli.md#update)).
4
4
 
5
+ ## 1.2.0
6
+
7
+ ### Minor Changes
8
+
9
+ - 06f4b4a: Add `loomwright tui`: watch runs, start changes, answer questions and approve from the terminal.
10
+
11
+ ## 1.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 4d9d481: Every run now writes an append-only event stream to `.factory/events/<id>.jsonl`, a JSONL file
16
+ with a versioned envelope and one event type per milestone (run, phase, task, gate, review,
17
+ usage). The schemas live in the new `@loomwright/protocol` package and the stream is redacted
18
+ the same way state files are.
19
+
20
+ Two commands read it: `loomwright events <id> [--follow] [--from <n>] [--json]` prints the
21
+ stored stream unchanged, and `loomwright status <id> --watch` now reprints its view when an
22
+ event arrives instead of only every two seconds, while `--interval` stays the heartbeat and the
23
+ fallback poll period. The decision is documented in ADR-0046 and `docs/events.md`.
24
+
5
25
  ## 1.0.2
6
26
 
7
27
  ### Patch Changes
package/README.md CHANGED
@@ -124,7 +124,8 @@ While it runs, or after it stops:
124
124
  | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
125
125
  | See what is happening: phase, task DAG, worktrees, gate results, token usage | `loomwright status [<id>] [--json]` |
126
126
  | See AI usage across every change and quick task in the workspace | `loomwright usage [--json]` |
127
- | Watch it from a second terminal (refreshes every 2 s until Ctrl-C) | `loomwright status <id> --watch` |
127
+ | Watch it from a second terminal (refreshes on progress events until Ctrl-C) | `loomwright status <id> --watch` |
128
+ | See the stored run event stream (JSONL, redacted) | `loomwright events <id> [--follow] [--from <n>]` |
128
129
  | It paused because a task failed three times: fix it in the task's worktree (path in the report), then | `loomwright retry <id> --task <n>` |
129
130
  | It paused, was aborted, or the process died: continue from the last consistent state | `loomwright resume <id>` |
130
131
  | A review finding concerns the spec itself: let the architect apply it | `loomwright reword <id> [--finding <n,...>] [--dry-run]` |
@@ -148,6 +149,31 @@ loomwright quick "fix the login typo" --repo frontend # add --agent <id> for a
148
149
 
149
150
  `refine` asks a few questions before any model work starts. During `run`, the intake orchestrator and architect may raise questions; the CLI asks them in the terminal and records the Q&A in the change. Pass `--no-interactive` to record without asking. Spec approval is still the only hard gate. `quick` is the no-OpenSpec path: it creates a `task/<slug>` branch, implements, runs the gates, runs one review pass, and makes one local commit. It never pushes.
150
151
 
152
+ ## Watching and driving from the terminal
153
+
154
+ ```bash
155
+ loomwright tui
156
+ ```
157
+
158
+ The terminal UI reads the run state and the event stream and shows every change in one place: the
159
+ run list (newest first, with phase, role, tokens, cost and elapsed time) and, on `Enter`, the task
160
+ graph, each task's role, model, retries, gates and activity. At 100 columns and wider it uses two
161
+ panes; below that, one pane with drill-down.
162
+ - `n` starts a change: type the request, `Ctrl-J` for a newline, or `Tab` to pick a request file with
163
+ a preview. It launches `loomwright run` as a detached child and shows the spawn log.
164
+ - At `awaiting-approval` the overlay offers `a` approve and run, `A` approve only, `w` reword (when
165
+ the run has spec findings) and `R` reapprove (after an approval). It needs `git user.email`; `Esc`
166
+ cancels.
167
+ - `Q` opens the questions pane. A recorded answer reads "recorded — applies at the next step" until
168
+ the run emits `question.answered`, and only then "answered"; the UI never claims it was applied.
169
+ - `r` resumes, `x` aborts and `t` retries a failed task; `?` is help and `q` quits.
170
+ - `loomwright tui --replay <file>` replays a recorded stream read-only; `--once` prints one frame and
171
+ is what CI smoke-tests.
172
+
173
+ The long actions — intake, approve, approve only, reword, reapprove and resume — are detached CLI
174
+ children, so closing the UI never stops a run; answer, abort and retry are short in-process writes.
175
+ Keys, screens, flags and accessibility: [docs/tui.md](docs/tui.md).
176
+
151
177
  ## Configuration reference
152
178
 
153
179
  `factory.config.jsonc` (JSONC, validated on every command; the editor schema is `.opencode/schemas/factory.config.schema.json`):