@loomwright/cli 1.1.0 → 1.3.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 +37 -0
- package/README.md +50 -20
- package/dist/cli.js +803 -355
- package/dist/tui.js +58379 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
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.3.0
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- b711355: The shell guard treats `npx` and `pnpx` as package runners: it skips their own flags and inspects the wrapped command with the same wrapped-command, publish and global-install checks `bunx` gets, including `-c`/`--call` text.
|
|
10
|
+
- 93c287b: The shell guard resolves package-runner option arity per runner and inspects an option with unknown arity both as a bare flag and as value-taking. `npm exec -p` is the boolean `--parseable`, while npm's value-taking configs and aliases (`--expires`, `--min-release-age`, `--password`, `--name`, `--allow-git`, `--scopes`, `--orgs`, `--packages`, `--token-description`, `--enjoy-by`, `--reg`) can no longer hide `npm publish` or a global install behind their value.
|
|
11
|
+
- b41f277: Gates and sandboxed shells mark the commands they wrap with `AI_FACTORY_SANDBOX=wrapped`, so a
|
|
12
|
+
gate that already runs inside a Seatbelt profile is not wrapped again.
|
|
13
|
+
- 5bcc334: The terminal UI folds every run event into the activity tail and can land a done run with `l`.
|
|
14
|
+
- af740e1: The terminal UI scrolls its lists and log, scopes a task's activity to its repo, surfaces spec
|
|
15
|
+
findings and rewords from the run view; this ships in 1.3.0.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 3d1ca3c: `-h`/`--help` is help only before the command or as its first token after it; later occurrences reach the command as flag values or positional text.
|
|
20
|
+
- ce5ee38: `loomwright doctor` no longer warns about a gate script that a `gates.overrides` entry replaces.
|
|
21
|
+
- edca7eb: The shell guard routes `npm exec` and its `x` alias through the same wrapped-command and `-c`/`--call` checks as `npx`, so `npm exec -- git push` and `npm x -c 'git push'` are no longer allowed unchecked.
|
|
22
|
+
- 01fd664: The shell-policy tests now name every security-critical `npx` value-taking flag (`--shell`, `--prefix`, `--userconfig`, `--registry`, `--cache`, `--node-options`, `--package`), so dropping or misspelling one in the table fails a test instead of reopening the publish/global-install bypass.
|
|
23
|
+
- ebf959e: The shell guard dispatches package-manager handling on the version-stripped name, so `npx npm@latest run deploy` and `npx bun@1 run deploy` inspect the named script body instead of being allowed unchecked.
|
|
24
|
+
- 72ff30b: The shell guard strips a version tag from a package-manager name before its publish and global-install checks, so `npx npm@latest publish` and `npx npm@10 install -g left-pad` are no longer allowed unchecked.
|
|
25
|
+
- 60ad674: The plugin bundle build pins its root to the repository root and normalises module labels, so
|
|
26
|
+
`bun run build:plugin` produces the committed bundle from any working directory.
|
|
27
|
+
- 7198943: Every binding-less `catch` in shipped code now states why its failure is ignored, and `doctor`
|
|
28
|
+
warns when a repo's `package.json` cannot be parsed instead of silently treating a configured gate
|
|
29
|
+
script as absent.
|
|
30
|
+
- af4e1cc: The shell guard passes a subshell's piped input and input redirects to the shell it runs, so `printf 'git push' | (bash)` and `(bash) < script.sh` are no longer allowed unchecked.
|
|
31
|
+
- 5461d27: A run started with `n` from an open run view is found by the next poll, so its view opens instead of leaving the intake dialog stranded.
|
|
32
|
+
- 3cda850: The terminal UI polls only the open run's status and its controls and status wiring live behind testable modules.
|
|
33
|
+
- 34cd76b: The `status --watch` suite waits for observed frames instead of an 80 ms window, so it is green
|
|
34
|
+
under `--parallel`.
|
|
35
|
+
|
|
36
|
+
## 1.2.0
|
|
37
|
+
|
|
38
|
+
### Minor Changes
|
|
39
|
+
|
|
40
|
+
- 06f4b4a: Add `loomwright tui`: watch runs, start changes, answer questions and approve from the terminal.
|
|
41
|
+
|
|
5
42
|
## 1.1.0
|
|
6
43
|
|
|
7
44
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -149,6 +149,36 @@ loomwright quick "fix the login typo" --repo frontend # add --agent <id> for a
|
|
|
149
149
|
|
|
150
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.
|
|
151
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 the activity tail folded from every run event —
|
|
161
|
+
design, installs, merges and closing included. At 100 columns and wider it uses two panes; below
|
|
162
|
+
that, one pane with drill-down, where the tail sits below the graph.
|
|
163
|
+
- `n` starts a change: type the request, `Ctrl-J` for a newline, or `Tab` to pick a request file with
|
|
164
|
+
a preview. It launches `loomwright run` as a detached child and shows the spawn log.
|
|
165
|
+
- At `awaiting-approval` the overlay offers `a` approve and run, `A` approve only and `R` reapprove
|
|
166
|
+
once the stream carries the spec commit. `Esc` collapses it to the run view's gate banner, where
|
|
167
|
+
`a`, `A` or `R` reopens it. Reword (`w`) starts from the run view, never at the gate; approving
|
|
168
|
+
needs `git user.email`.
|
|
169
|
+
- `Q` opens the questions pane. A recorded answer reads "recorded — applies at the next step" until
|
|
170
|
+
the run emits `question.answered`, and only then "answered"; the UI never claims it was applied.
|
|
171
|
+
- `r` resumes, `x` aborts and `t` retries a failed task; `?` is help and `q` quits.
|
|
172
|
+
- `l` lands a `done` run: a confirmation, then a detached `land <id>` that merges locally, deletes
|
|
173
|
+
the branches and removes the worktrees and run state, pushing nothing.
|
|
174
|
+
- `loomwright tui --replay <file>` replays a recorded stream read-only; `--once` prints one frame and
|
|
175
|
+
is what CI smoke-tests.
|
|
176
|
+
|
|
177
|
+
The long actions — intake, approve, approve only, reword, reapprove, resume and land — are detached
|
|
178
|
+
CLI children, so closing the UI never stops a run; answer, abort and retry are short in-process
|
|
179
|
+
writes.
|
|
180
|
+
Keys, screens, flags and accessibility: [docs/tui.md](docs/tui.md).
|
|
181
|
+
|
|
152
182
|
## Configuration reference
|
|
153
183
|
|
|
154
184
|
`factory.config.jsonc` (JSONC, validated on every command; the editor schema is `.opencode/schemas/factory.config.schema.json`):
|
|
@@ -165,7 +195,7 @@ loomwright quick "fix the login typo" --repo frontend # add --agent <id> for a
|
|
|
165
195
|
| `mcp.roles.<role>` | `{}` | MCP tool action patterns a role may call (e.g. `["mantine_*"]`). Without an entry MCP tools stay on `ask`, which headless runs reject. |
|
|
166
196
|
| `agents[]`, `routing[]` | `[]`, `[]` | Optional specialist agents (`id`, `phase`, `prompt` or `promptFile`, `model`, `skills`, `edits`, `shell`, `web`, `mcp`) and path-to-agent routing for implementation tasks. |
|
|
167
197
|
| `gates.maxRetries` | `3` | Retries per task after the first attempt. |
|
|
168
|
-
| `gates.scripts` | `format:check`, `lint`, `typecheck`, `test`, `test:affected` | Script or target names looked up in `package.json`, `Makefile`, `justfile` and `Taskfile.yml`.
|
|
198
|
+
| `gates.scripts` | `format:check`, `lint`, `typecheck`, `test`, `test:affected` | Script or target names looked up in `package.json`, `Makefile`, `justfile` and `Taskfile.yml`. A repository/gate pair with a `gates.overrides.<repo>.<gate>` entry is not looked up here: an override replaces the script lookup, so the write-mode script warning is not evaluated for that pair. |
|
|
169
199
|
| `gates.overrides.<repo>.<gate>` | `{}` | A literal command, which wins over scripts and profile defaults. `"skip"` turns that gate off. Placeholders: `{files}`, `{testFiles}`, `{packages}`, `{crates}`, `{charts}`, `{base}`. |
|
|
170
200
|
| `gates.extra[]` | `[]` | Conditional gates: `name`, `type`, `phases`, `when.changed`, `command`, `env`, `setup`, `outputs`, `checkOnly`, `timeoutMs`.`outputs` makes it a generated-artifact drift gate. |
|
|
171
201
|
| `contracts[]` | detected | `{ kind: openapi \| proto \| json-schema \| helm-values \| generated \| crd \| ipc \| custom, provider, path, consumers[], command?, outputs?, allowBreaking?, validate?{<consumer>: cmd} }`.`generated`/`crd`/`ipc` contracts run their command and fail on output drift. In `validate` commands, `{contract}` is the absolute path of the provider's new contract. |
|
|
@@ -210,25 +240,25 @@ bunx @loomwright/cli@<new> rollback # undo it
|
|
|
210
240
|
|
|
211
241
|
## Troubleshooting
|
|
212
242
|
|
|
213
|
-
| Symptom | Fix
|
|
214
|
-
| -------------------------------------------------------------------------- |
|
|
215
|
-
| `uses config schemaVersion 1; this factory needs 4` | `loomwright update` (it migrates v1 → v4 and keeps comments).
|
|
216
|
-
| `doctor`: `model … is not available to opencode` | Run `opencode auth login <provider>` (imported on the next run) or export the key (e.g. `ANTHROPIC_API_KEY`), or change the model. `doctor` lists the stored credentials without their values.
|
|
217
|
-
| `doctor` / `gate`: `no format gate` or `not found: golangci-lint` | Install the tool, add a script under the name in `gates.scripts`, or set `gates.overrides.<repo>.<gate>` (`"skip"` to turn it off).
|
|
218
|
-
| `gate is not check-only` | Your format or lint script writes files. Point the gate at the check variant (e.g. `prettier --check`, `biome check`).
|
|
219
|
-
| The change paused | Read `.factory/reports/<id>.md`. Fix the code in the named worktree, then run `retry <id> --task <n>`; or run `resume <id>` after a transient failure.
|
|
220
|
-
| `the spec changed after approval` | Something other than a checkbox changed in `openspec/changes/<id>/`. Review it, then run `approve <id>` again.
|
|
221
|
-
| `<id> is the active change` after a crash | `loomwright resume <id>` takes over the stale lock (or `abort <id>`). `doctor` shows locks that nothing is driving.
|
|
222
|
-
| `update` stopped with conflicts | Resolve the `<<<<<<< yours` markers in the listed files and commit, or `loomwright rollback`.
|
|
223
|
-
| `Ponytail add-on files were modified` | `loomwright update --restore`, or set `addons.ponytail.enabled` to `false`.
|
|
224
|
-
| A push is rejected by the `ai-factory` pre-push hook | It blocks pushes from agents while a change is active. Push from your own shell, where `AI_FACTORY_AGENT` is not set.
|
|
225
|
-
| Tauri: `cargo check` fails on a permission "not found" | A capability in `src-tauri/capabilities/` names a permission the app doesn't have. Add the plugin (`tauri add <plugin>`) or fix the identifier.
|
|
226
|
-
| Tauri gates fail on Linux with missing `webkit2gtk`/`pkg-config` libraries | Install Tauri's Linux prerequisites on the machine that runs the gates.
|
|
227
|
-
| An agent's command fails with `Operation not permitted` | The macOS sandbox stopped a write outside the session's worktree, or a read of a credential file. Agents work inside their worktree. If a repo truly needs more, set `security.sandbox` to `"off"` (weaker guarantees; see ADR-0026).
|
|
228
|
-
| A task fails with "you changed how your work is checked" | It edited a script or target the gates run (e.g. `scripts.lint` in package.json). Change gate definitions yourself, outside a factory change.
|
|
229
|
-
| A submodule is missing or empty | `loomwright doctor` offers `git submodule update --init`.
|
|
230
|
-
| Commits fail with a signing error | The factory commits with your git config. Unlock your signing agent (e.g. 1Password) and run `resume`, or rerun the command.
|
|
231
|
-
| Agents re-read the same files a lot | `status` shows wasted re-reads. Build the graph (`loomwright graph`) so agents can query it instead.
|
|
243
|
+
| Symptom | Fix |
|
|
244
|
+
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
245
|
+
| `uses config schemaVersion 1; this factory needs 4` | `loomwright update` (it migrates v1 → v4 and keeps comments). |
|
|
246
|
+
| `doctor`: `model … is not available to opencode` | Run `opencode auth login <provider>` (imported on the next run) or export the key (e.g. `ANTHROPIC_API_KEY`), or change the model. `doctor` lists the stored credentials without their values. |
|
|
247
|
+
| `doctor` / `gate`: `no format gate` or `not found: golangci-lint` | Install the tool, add a script under the name in `gates.scripts`, or set `gates.overrides.<repo>.<gate>` (`"skip"` to turn it off). An override replaces the script lookup, so the write-mode script warning is skipped for that repo/gate pair. |
|
|
248
|
+
| `gate is not check-only` | Your format or lint script writes files. Point the gate at the check variant (e.g. `prettier --check`, `biome check`). |
|
|
249
|
+
| The change paused | Read `.factory/reports/<id>.md`. Fix the code in the named worktree, then run `retry <id> --task <n>`; or run `resume <id>` after a transient failure. |
|
|
250
|
+
| `the spec changed after approval` | Something other than a checkbox changed in `openspec/changes/<id>/`. Review it, then run `approve <id>` again. |
|
|
251
|
+
| `<id> is the active change` after a crash | `loomwright resume <id>` takes over the stale lock (or `abort <id>`). `doctor` shows locks that nothing is driving. |
|
|
252
|
+
| `update` stopped with conflicts | Resolve the `<<<<<<< yours` markers in the listed files and commit, or `loomwright rollback`. |
|
|
253
|
+
| `Ponytail add-on files were modified` | `loomwright update --restore`, or set `addons.ponytail.enabled` to `false`. |
|
|
254
|
+
| A push is rejected by the `ai-factory` pre-push hook | It blocks pushes from agents while a change is active. Push from your own shell, where `AI_FACTORY_AGENT` is not set. |
|
|
255
|
+
| Tauri: `cargo check` fails on a permission "not found" | A capability in `src-tauri/capabilities/` names a permission the app doesn't have. Add the plugin (`tauri add <plugin>`) or fix the identifier. |
|
|
256
|
+
| Tauri gates fail on Linux with missing `webkit2gtk`/`pkg-config` libraries | Install Tauri's Linux prerequisites on the machine that runs the gates. |
|
|
257
|
+
| An agent's command fails with `Operation not permitted` | The macOS sandbox stopped a write outside the session's worktree, or a read of a credential file. Agents work inside their worktree. If a repo truly needs more, set `security.sandbox` to `"off"` (weaker guarantees; see ADR-0026). |
|
|
258
|
+
| A task fails with "you changed how your work is checked" | It edited a script or target the gates run (e.g. `scripts.lint` in package.json). Change gate definitions yourself, outside a factory change. |
|
|
259
|
+
| A submodule is missing or empty | `loomwright doctor` offers `git submodule update --init`. |
|
|
260
|
+
| Commits fail with a signing error | The factory commits with your git config. Unlock your signing agent (e.g. 1Password) and run `resume`, or rerun the command. |
|
|
261
|
+
| Agents re-read the same files a lot | `status` shows wasted re-reads. Build the graph (`loomwright graph`) so agents can query it instead. |
|
|
232
262
|
|
|
233
263
|
Logs: `.factory/logs/<id>/` (redacted tool calls and gate results). Run state: `.factory/runs/<id>.json`.
|
|
234
264
|
|