@giamme/forge 0.22.0 → 0.23.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 +61 -0
- package/README.md +19 -12
- package/SKILL.md +137 -216
- package/VERSION +1 -1
- package/docs/README.md +2 -3
- package/docs/add-ons.md +5 -3
- package/docs/artifacts.md +17 -2
- package/docs/commands.md +85 -63
- package/docs/decomposed-runs.md +195 -21
- package/docs/development.md +11 -9
- package/docs/forge-ui.md +33 -4
- package/docs/install.md +37 -5
- package/docs/memory.md +6 -1
- package/docs/models.md +36 -10
- package/docs/reviews.md +44 -25
- package/docs/safety.md +27 -2
- package/docs/troubleshooting.md +7 -10
- package/forge +25 -4
- package/package.json +2 -1
- package/references/dataset.md +10 -9
- package/references/decompose-integration.md +337 -0
- package/references/decompose-opt-in.md +527 -0
- package/references/decompose-recovery.md +569 -0
- package/references/decompose-review.md +256 -0
- package/references/decompose.md +99 -1606
- package/references/findings.md +68 -0
- package/references/harnesses.md +7 -12
- package/references/memory.md +13 -2
- package/references/planning.md +48 -18
- package/references/ripwire.md +38 -13
- package/references/runtime.md +22 -33
- package/references/setup.md +90 -0
- package/references/solo.md +13 -42
- package/references/ui.md +12 -5
- package/registry.tsv +40 -22
- package/scripts/forge-artifact.sh +143 -12
- package/scripts/forge-compare.py +5 -15
- package/scripts/forge-config.py +14 -1
- package/scripts/forge-contract.py +216 -53
- package/scripts/forge-control.py +777 -54
- package/scripts/forge-dispatch.sh +95 -12
- package/scripts/forge-du.py +13 -3
- package/scripts/forge-handoff.py +221 -39
- package/scripts/forge-install-ripwire.sh +100 -24
- package/scripts/forge-install.sh +18 -32
- package/scripts/forge-issues.py +6 -4
- package/scripts/forge-jev-options.sh +3 -5
- package/scripts/forge-lib-adopt.sh +169 -5
- package/scripts/forge-lib-attribute.sh +10 -3
- package/scripts/forge-lib-decompose.sh +454 -0
- package/scripts/forge-lib-env.sh +21 -0
- package/scripts/forge-lib-group.sh +4 -1
- package/scripts/forge-lib-plans.sh +30 -18
- package/scripts/forge-lib-review.sh +28 -8
- package/scripts/forge-lib-task.sh +225 -56
- package/scripts/forge-lib-verify.sh +59 -10
- package/scripts/forge-memory.sh +81 -4
- package/scripts/forge-metrics.sh +4 -2
- package/scripts/forge-parallel-options.sh +23 -4
- package/scripts/forge-parallel.sh +447 -175
- package/scripts/forge-plan-check.py +71 -8
- package/scripts/forge-planner.py +303 -17
- package/scripts/forge-pr.py +9 -1
- package/scripts/forge-prompt.py +2 -2
- package/scripts/forge-review-links.py +248 -0
- package/scripts/forge-ripwire.py +234 -16
- package/scripts/forge-route.py +19 -27
- package/scripts/forge-runs-rm.py +92 -21
- package/scripts/forge-runs.py +46 -5
- package/scripts/forge-runtime.py +37 -12
- package/scripts/forge-schedule.py +124 -33
- package/scripts/forge-setup-stale.py +236 -0
- package/scripts/forge-setup.py +804 -0
- package/scripts/forge-shadow.py +2 -20
- package/scripts/forge-solo-lock.py +46 -0
- package/scripts/forge-solo.sh +33 -56
- package/scripts/forge-sweep.py +2 -1
- package/scripts/forge-ui.py +8 -1
- package/scripts/forge-update.sh +2 -2
- package/scripts/forge-verify.py +16 -1
- package/scripts/forge-version.py +13 -1
- package/scripts/forge-watch.py +7 -2
- package/scripts/forge_dataset/__init__.py +1 -1
- package/scripts/forge_dataset/capture.py +0 -34
- package/scripts/forge_dataset/checks.py +0 -1
- package/scripts/forge_dataset/cli.py +5 -1
- package/scripts/forge_dataset/export.py +28 -6
- package/scripts/forge_dataset/facts.py +1 -2
- package/scripts/forge_dataset/forecast.py +1 -1
- package/scripts/forge_dataset/harvest.py +107 -7
- package/scripts/forge_dataset/importer.py +3 -2
- package/scripts/forge_dataset/pairs.py +3 -3
- package/scripts/forge_dataset/reviewers.py +4 -3
- package/scripts/forge_dataset/routing.py +6 -3
- package/scripts/forge_dataset/tiers.py +1 -1
- package/scripts/forge_decide/__init__.py +1 -1
- package/scripts/forge_decide/profiles.py +11 -14
- package/scripts/forge_decompose.py +987 -0
- package/scripts/forge_groups/review.py +6 -1
- package/scripts/forge_jev/__init__.py +1 -1
- package/scripts/forge_jev/cli.py +10 -1
- package/scripts/forge_jev/gates.py +10 -1
- package/scripts/forge_jev/verify.py +10 -2
- package/scripts/forge_legacy.py +86 -0
- package/scripts/forge_memory_home.py +57 -0
- package/scripts/forge_models.py +151 -0
- package/scripts/forge_prefs.py +138 -0
- package/scripts/forge_side/__init__.py +10 -0
- package/scripts/forge_storage.py +28 -15
- package/ui/README.md +22 -10
- package/ui/docs/api.md +121 -99
- package/ui/forge_ui/control.py +46 -14
- package/ui/forge_ui/export.py +0 -10
- package/ui/forge_ui/models.py +15 -2
- package/ui/forge_ui/projects.py +4 -1
- package/ui/forge_ui/reader.py +456 -59
- package/ui/forge_ui/server.py +0 -10
- package/ui/forge_ui/static/app.js +28 -9
- package/ui/forge_ui/static/checksview.js +12 -3
- package/ui/forge_ui/static/controls.js +147 -11
- package/ui/forge_ui/static/convo.js +5 -2
- package/ui/forge_ui/static/diffview.js +4 -5
- package/ui/forge_ui/static/panel.js +180 -77
- package/ui/forge_ui/static/projectsview.js +16 -2
- package/ui/forge_ui/static/runmodel.js +18 -4
- package/ui/forge_ui/static/scene3d.js +29 -29
- package/ui/forge_ui/static/settings.js +1 -1
- package/ui/forge_ui/static/storageview.js +2 -2
- package/ui/forge_ui/static/style.css +23 -6
- package/ui/forge_ui/static/worktreesview.js +8 -4
- package/ui/forge_ui/transcripts.py +6 -0
- package/ui/forge_ui/worktrees.py +13 -1
- package/docs/fractal.md +0 -181
- package/references/fractal-dashboard.md +0 -21
- package/references/fractal.md +0 -307
- package/scripts/forge-fractal-dispatch.sh +0 -4
- package/scripts/forge-fractal-options.sh +0 -54
- package/scripts/forge-fractal.py +0 -6
- package/scripts/forge-install-fractal.sh +0 -4
- package/scripts/forge_fractal/__init__.py +0 -88
- package/scripts/forge_fractal/bridge.py +0 -46
- package/scripts/forge_fractal/cli.py +0 -224
- package/scripts/forge_fractal/dashboard.css +0 -138
- package/scripts/forge_fractal/dashboard.html +0 -41
- package/scripts/forge_fractal/dashboard.js +0 -687
- package/scripts/forge_fractal/decomposition.py +0 -262
- package/scripts/forge_fractal/execution.py +0 -659
- package/scripts/forge_fractal/inspection.py +0 -261
- package/scripts/forge_fractal/install.py +0 -158
- package/scripts/forge_fractal/invocation.py +0 -95
- package/scripts/forge_fractal/pipeline.py +0 -125
- package/scripts/forge_fractal/selection.py +0 -180
- package/ui/forge_ui/fractal.py +0 -582
package/ui/README.md
CHANGED
|
@@ -38,7 +38,7 @@ blocks on a plate, with cables between them and lamps that light up as things ha
|
|
|
38
38
|
- **Beyond one run:** a full-screen **run cloud** of every run, grouped by project, in five
|
|
39
39
|
layouts with filters and runs you can drag anywhere; **diffs** with each finding under the
|
|
40
40
|
line it names; each dwarf's and reviewer's **conversation**, read from its CLI's log; a
|
|
41
|
-
**model leaderboard**; a **files heatmap**; **
|
|
41
|
+
**model leaderboard**; a **files heatmap**; the **subtasks** of a split task as a tree;
|
|
42
42
|
**quick jump** and **notifications**; and **export** of a run as one HTML file. See
|
|
43
43
|
[What you see](#what-you-see).
|
|
44
44
|
|
|
@@ -225,6 +225,9 @@ keep one meaning everywhere (amber running, green merged or passed, red failed,
|
|
|
225
225
|
- **Retro:** a run with a retro report or retro notes has a Retro section in *Run details*: its note
|
|
226
226
|
counts on one line (for example *5 notes: 3 you can fix, 2 for forge · 4 verified, 1 claimed · 1
|
|
227
227
|
blocking*), then the report, collapsed.
|
|
228
|
+
- **Handoff:** a run with `handoff.driver.json` or `handoff.notes.jsonl` (`forge handoff claim` /
|
|
229
|
+
`note`) has a Handoff section in *Run details*: the driver on one line (harness, session, since,
|
|
230
|
+
last seen, *stale* past 12 hours), then the notes, newest first (the newest 50).
|
|
228
231
|
- **Read-only:** a server started with `--read-only` shows all of this, without the switches or the
|
|
229
232
|
answer boxes.
|
|
230
233
|
- **Now and checks:** a running task's *Now* names the agent at work and its attempt, the phase
|
|
@@ -344,12 +347,16 @@ keep one meaning everywhere (amber running, green merged or passed, red failed,
|
|
|
344
347
|
check or an environment problem (`/event/<n>` opens it there and stops following the end).
|
|
345
348
|
|
|
346
349
|
<img src="docs/media/conversation.png" width="760" alt="A dwarf's conversation: its thinking, the files it wrote, a test run that failed with exit 1 and the run that passed after the fix.">
|
|
347
|
-
- **
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
350
|
+
- **Subtasks:** when a task was split into subtasks, its inspector has a **Decomposition**
|
|
351
|
+
section: the decision (split, kept whole, or kept whole at a limit), who made it (the planner,
|
|
352
|
+
you, or the run with `--auto-split`) and why, then the tree of its subtasks through every
|
|
353
|
+
level, each with its status, model, difficulty, attempts, tokens and a link to its diff. The
|
|
354
|
+
opened task in 3D carries the same tree above it. A subtask opens as a task of its own, with
|
|
355
|
+
its attempts, reviews, findings and controls; *Open the subtasks as a plan of their own* shows
|
|
356
|
+
the sub-plan as a run, and that run links back to its task. The run's header shows the limits
|
|
357
|
+
every split works within, how much of the run was split, and, for a goal larger than one plan,
|
|
358
|
+
the stage this plan is and the stages after it. forge records tokens, not prices, so the tree
|
|
359
|
+
shows tokens. A run made with Fractal, which forge 0.23 removed, still opens, read-only.
|
|
353
360
|
- **Export:** *Export…* in a run's header downloads the run as one HTML file that opens in any
|
|
354
361
|
browser without forge-ui, offline included (in 2D; in 3D when cdn.jsdelivr.net is reachable).
|
|
355
362
|
It asks each time: by default prompts, reviewer reports, logs, finding details and diffs are
|
|
@@ -390,7 +397,12 @@ takes effect, except a brief answer, which is sent when you press *Send*. The ro
|
|
|
390
397
|
infra-retry budgets. A task has a threshold override (`Inherit`, P0–P3 or `None`, which
|
|
391
398
|
exempts it from the run's threshold), its own retry budget and a **model pin**: the model
|
|
392
399
|
its next full retry uses, once. A control that cannot apply (no live scheduler, a merged
|
|
393
|
-
task) is disabled and says why.
|
|
400
|
+
task) is disabled and says why.
|
|
401
|
+
- **Models per difficulty (`forge control models`):** in a plan's inspector, the implementer and
|
|
402
|
+
reviewer of the `low`, `medium` and `high` tasks that have not started yet, one spec or a pool
|
|
403
|
+
separated by commas. Started tasks keep their model. Every spec on the page, a pin or a tier's
|
|
404
|
+
pool included, shows the model id it runs (`astra:xhigh runs gpt-6.2-astra on codex`), also while
|
|
405
|
+
you type it, so a pin never changes the model generation unnoticed.
|
|
394
406
|
- **Open findings (`forge issues`):** the findings a run, or every run of its repository,
|
|
395
407
|
left open. The list opens from a quick offline listing and then fills in what is already
|
|
396
408
|
filed; select findings to file as GitHub issues, or dismiss them (and undo that).
|
|
@@ -449,8 +461,8 @@ turns all of it off: no token is issued, every change is a 405, and the controls
|
|
|
449
461
|
responses it reads, the 3D stage's modules as one module text, a hash-based policy).
|
|
450
462
|
- `forge_ui/static/modelstats.js`, `leaderboard.js`: the leaderboard's aggregation (outcomes as
|
|
451
463
|
`scripts/forge_dataset/export.py` labels them, the interval of its `routing.py`) and its page.
|
|
452
|
-
- `forge_ui/diffs.py`, `
|
|
453
|
-
|
|
464
|
+
- `forge_ui/diffs.py`, `models.py`: diff parsing and finding pins, and the facts behind the model
|
|
465
|
+
leaderboard.
|
|
454
466
|
- `forge_ui/static/search.js`, `notify.js`, `favicon.svg`: the quick jump and the notifications
|
|
455
467
|
(ranking and change detection are in `runmodel.js`).
|
|
456
468
|
- `tests/`: reader, executions, endpoints, server, static-script and browser checks; `run_fixture.py`
|
package/ui/docs/api.md
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
This file is the contract between the three parts of forge-ui. It is fixed for tasks and
|
|
4
4
|
dwarves: implement it as written, and do not edit it as part of a task. Its owner revised it
|
|
5
5
|
deliberately for 0.3.0 (executions, findings, final reviews, the lazy endpoints and the 3D view)
|
|
6
|
-
and for 0.4.0 (diffs with pinned findings, the files heatmap
|
|
6
|
+
and for 0.4.0 (diffs with pinned findings, the files heatmap and model facts). forge 0.23 removed
|
|
7
|
+
Fractal and its endpoints, and added the subtasks of a split task (Decomposition, below).
|
|
7
8
|
|
|
8
9
|
```
|
|
9
10
|
forge_ui/reader.py reads forge run dirs from disk, returns plain dicts (no I/O beyond reads)
|
|
@@ -11,7 +12,6 @@ forge_ui/executions.py the attempts/<role>-<uuid>/ dirs: parsing, nesting, atte
|
|
|
11
12
|
forge_ui/findings.py QA findings and gate lines, parsed by scripts/forge-contract.py
|
|
12
13
|
forge_ui/diffs.py unified diffs: parsing, the ```diff fence of a review prompt, pinning findings, cached reads
|
|
13
14
|
forge_ui/models.py per-run model facts (attempts and reviews) for the leaderboard, cached per run
|
|
14
|
-
forge_ui/fractal.py Fractal child tasks under $XDG_STATE_HOME/forge/fractal, read through dir fds
|
|
15
15
|
forge_ui/transcripts.py an agent CLI's `<role>.log` read as one conversation, whichever harness wrote it
|
|
16
16
|
forge_ui/checks.py the checks an agent ran, its running call and the environment problems it met, from a transcript
|
|
17
17
|
forge_ui/server.py serves those dicts as JSON plus the static page, 127.0.0.1 only; authenticates writes
|
|
@@ -109,7 +109,10 @@ written), and the reader must never raise because of one.
|
|
|
109
109
|
| `tasks/<id>/drift.txt`, `conflict.files` | one path per line: files the diff changed without declaring them; files that conflicted on merge |
|
|
110
110
|
| `attempts/qa-<uuid>/qa.prompt` | the copy of the prompt a reviewer read; the diff it reviewed is its **last** fenced block: a line exactly ` ```diff `, the diff, a line exactly ` ``` ` (a section may follow) |
|
|
111
111
|
| `final-review-*/combined.diff` | the diff a final review read, absent when larger than 400 KB (then not inlined in `qa.input`) |
|
|
112
|
-
| `fractal-selection.json` | `{"enabled": true,
|
|
112
|
+
| `fractal-selection.json` | written by forge before 0.23 only: `{"enabled": true, …}` marks a run made with Fractal, which is read and never run again (RunSummary `removed`) |
|
|
113
|
+
| `decomposition.json` | `{version, nodes: {<task id>: {decision, reason, by, at, limits_used}}}`, and in a root plan also `limits: {depth, children, nodes}` and `frozen`: the split decisions of this plan's tasks (Decomposition below) |
|
|
114
|
+
| `tasks/<id>/sub/` | the subtasks of a split task: a plan dir of its own (`tasks.tsv`, `run_id` `<run>--<id>`, `tasks/…`) with `parent.json` `{task, run_id, start, by, at, reason}`. Beside it: `sub.merged` (the commit of the subtasks' work once it is on the task's branch), `sub.waiting` (the subtasks the task waits for, one per line), `sub.kept` (the commit `split=fresh` set aside) |
|
|
115
|
+
| `later.json`, `chain.json` | `{later: [{title, goal}]}`, the stages a planner proposed after this plan; `{stage, first, previous}`, where a plan made by `next` stands in its goal |
|
|
113
116
|
| `tasks/<id>/route.jsonl` | one JSON object per line, one per routing decision: `at` (epoch), `task`, `tier`, `epsilon`, `candidates` (list of specs), `default` (spec), `chosen` (spec), `explored` (bool), `propensity` (probability the chosen spec had), `inputs` (object), `decision` (a short hash identifying the decision). Keep unknown fields |
|
|
114
117
|
| `tasks/<id>/route.explored` | exists when the task's route was an exploratory pick |
|
|
115
118
|
| `shadow/<id>/<attempt>-<k>/shadow.json` | JSON: `task`, `attempt`, `reviewed`, `primary`, `spec`, `pick` (`other_family`, `same_model`, `same_family` or `control`: identical to the primary), `started`. A second, never-read review of attempt `<attempt>` |
|
|
@@ -140,6 +143,14 @@ task that depends on one waits on it (it is not a stopped dependency). `status_c
|
|
|
140
143
|
leaves it in `on` only. `PASS` is neither: it is saved and not merged yet, so a dependent
|
|
141
144
|
still lists it.
|
|
142
145
|
|
|
146
|
+
A task whose `status` file says `RUNNING` reads as `INTERRUPTED` when the run dir records the forge
|
|
147
|
+
process that ran it (`scheduler.live` or `schedule.holder`) and none of it is running: neither the pid
|
|
148
|
+
in `scheduler.live` nor a `run` or `retry` command holding the plan lock (`schedule.holder`). That is a
|
|
149
|
+
run killed outright, which nothing could mark `INTERRUPTED` (#229). Its clock stops, the run and its
|
|
150
|
+
project stop counting as live, its worktrees stop being in use, and `scheduler.stale` and the task's
|
|
151
|
+
`waiting` name it and `forge handoff resume`. The reader writes nothing, and a run dir with neither file
|
|
152
|
+
reads as before.
|
|
153
|
+
|
|
143
154
|
Only the ids listed in `tasks.tsv` are tasks: `tasks/` may also hold forge's own dirs (e.g.
|
|
144
155
|
`tasks/_integration/`), and a task dir holds many other files (`attempts/` is a directory of
|
|
145
156
|
receipts, not `attempts.tsv`), all of which the reader ignores.
|
|
@@ -217,9 +228,8 @@ def execution_transcript(path, name, source='plan') -> dict | None # an Executio
|
|
|
217
228
|
def execution_checks(path, name, source='plan') -> dict | None # ExecutionChecks
|
|
218
229
|
def task_checks(path, task_id, source='plan') -> dict | None # TaskChecks
|
|
219
230
|
def run_environment(path, source='plan') -> dict | None # RunEnvironment
|
|
220
|
-
def
|
|
221
|
-
def
|
|
222
|
-
def fractal_node_diff(path, task_id, node, source='plan') -> dict | None # a DiffDetail
|
|
231
|
+
def sub_plan(path, task_id) -> Path | None # the plan dir of a split task's subtasks
|
|
232
|
+
def sub_plans(path) -> list[Path] # every sub-plan under a plan, through every level
|
|
223
233
|
def verification_log(path, lane=None, k=None, first=None, retry=False, source='plan') -> dict | None # a VerificationLog
|
|
224
234
|
|
|
225
235
|
class Catalog:
|
|
@@ -234,8 +244,6 @@ class Catalog:
|
|
|
234
244
|
def diff(self, key, task_id, which='current'), execution_diff(self, key, name),
|
|
235
245
|
final_review_diff(self, key, name), files(self, key), findings(self, key), transcript(self, key, name),
|
|
236
246
|
execution_checks(self, key, name), task_checks(self, key, task_id), environment(self, key),
|
|
237
|
-
fractal(self, key, task_id),
|
|
238
|
-
fractal_node(self, key, task_id, node), fractal_node_diff(self, key, task_id, node),
|
|
239
247
|
verification_log(self, key, lane=None, k=None, first=None) -> dict | None
|
|
240
248
|
def models(self) -> dict # Models, over every run
|
|
241
249
|
def locate(self, key) -> tuple[str, str] | None # (run dir, 'plan' | 'solo'); None for an unknown key
|
|
@@ -303,6 +311,7 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
|
|
|
303
311
|
| `POST /api/runs/<key>/issues/dismiss` | dismiss or (`undo`) restore findings; authenticated |
|
|
304
312
|
| `POST /api/runs/<key>/delete` | dry-run or delete a run with `forge runs rm`; authenticated, 900 s timeout; later requests for the key answer `404` |
|
|
305
313
|
| `POST /api/runs/<key>/tasks/<id>/answer` | answer a task that waits for input (`forge control retry … --answer-file -`); authenticated, see Controls |
|
|
314
|
+
| `POST /api/runs/<key>/tasks/<id>/steer` | queue a message for a task's next attempt, or with `now` send it to its running implementer (`forge control steer … --file - [--now]`); authenticated, see Controls |
|
|
306
315
|
| `POST /api/worktrees/remove` | remove chosen worktrees (`forge worktrees rm`); authenticated, 900 s timeout |
|
|
307
316
|
| `POST /api/projects/<id>/memories/forget` | forget learnings in a project's checkouts (`forge memory forget`); authenticated |
|
|
308
317
|
| `POST /api/projects/<id>/memories/add` | add a learning in a project's checkouts (`forge memory add`); body `{path?, category, text, paths?}`; authenticated |
|
|
@@ -333,8 +342,6 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
|
|
|
333
342
|
| `GET /api/config/profiles?run=<key>` | `200` every profile of that run's repository, each with its level, shadowed levels, default flag and body (see Profiles) |
|
|
334
343
|
| `POST /api/config/profiles` | create, edit, set, unset, remove or select a profile through `forge config profile`; authenticated |
|
|
335
344
|
| `GET /api/runs/<key>/export?texts=0\|1&paths=0\|1` | `200` the run as one HTML file (see Export), `Content-Disposition: attachment`, `Content-Security-Policy: default-src 'none'; sandbox`; `404` for an unknown run |
|
|
336
|
-
| `GET /api/runs/<key>/tasks/<id>/fractal` | `200 TaskFractal` |
|
|
337
|
-
| `GET /api/runs/<key>/tasks/<id>/fractal/nodes/<node>[/diff]` | `200 FractalNodeDetail`, or with `/diff` a `DiffDetail` of its `candidate.diff`; `<node>` matches `[A-Za-z0-9][A-Za-z0-9_-]{0,100}` |
|
|
338
345
|
| `GET /` | `forge_ui/static/index.html` |
|
|
339
346
|
| `GET /<name>` | that file from `forge_ui/static/` (`.html .js .css .svg` only, no subdirs) |
|
|
340
347
|
| anything else | `404 {"error": "not found"}` (an unknown path or run); a method a path does not take (PUT, DELETE, OPTIONS, a POST to a read path): `405` with `Allow`, except that a GET to a path that only takes POST (`/api/runs/<key>/delete`, `/api/runs/<key>/issues/dismiss`) answers `404` |
|
|
@@ -342,8 +349,7 @@ its last 20,000 behind a leading `…`. Their `truncated` lists the field names
|
|
|
342
349
|
The lazy endpoints answer `404 {"error": "not found"}` for an unknown run, task, group,
|
|
343
350
|
execution or review; the diff endpoints also for a `<which>` the run kind has not (`existing`
|
|
344
351
|
of a plan task, `prev` of a solo run), the diff and transcript endpoints for an execution that is
|
|
345
|
-
not `qa` or `dwarf
|
|
346
|
-
Fractal node endpoints for an unknown node or a task whose Fractal state is not `available`. A
|
|
352
|
+
not `qa` or `dwarf`. A
|
|
347
353
|
diff that is not there yet is a `200` with `available: false`. An execution is looked for only where executions are written:
|
|
348
354
|
`attempts/`, `tasks/<id>/attempts/`, `shadow/<id>/<a>-<k>/attempts/`,
|
|
349
355
|
`final-review-*/attempts/`, `integrate-*/final-review/attempts/` and `groups/<gid>/attempts/`,
|
|
@@ -430,6 +436,12 @@ nothing when there is none. Every other response keeps
|
|
|
430
436
|
`accepted.integration` is missing; always `null` for a solo run. RunDetail keeps this field
|
|
431
437
|
(it is not replaced by the newest review's `outdated`).
|
|
432
438
|
|
|
439
|
+
- `removed`: `null`, or `{name, since, note}` for a run made with a part of forge that no longer
|
|
440
|
+
exists (today `name` `Fractal`, `since` `0.23`). Such a run is read as any other and nothing can
|
|
441
|
+
run it again: the page shows `note` and offers no control that would.
|
|
442
|
+
- `parent`, `decomposition`: Decomposition, below. Both keys are **absent** on a plan that records
|
|
443
|
+
none, so a client reads them with a default.
|
|
444
|
+
|
|
433
445
|
`kind` is `"plan"` or `"solo"`. `updated` is the newest mtime (epoch seconds, float) among
|
|
434
446
|
the run dir and the files the reader read. Any field it cannot determine is `null`
|
|
435
447
|
(`counts` is then `{}`, `task_count` 0).
|
|
@@ -602,7 +614,8 @@ Every RunSummary field, plus:
|
|
|
602
614
|
`max_parallel` (the `max_parallel` file when it holds 1 to 64, else `null`) and `pauses` (the scopes of
|
|
603
615
|
`infra.paused`, `[]` without it; each with `needs_you` (`true` only for a bool `true`), `hint` (a string or
|
|
604
616
|
`null`) and `reset_at` (an epoch or `null`), which an older scope lacks, so they read as `false`, `null`, `null`);
|
|
605
|
-
while no scheduler runs they are `false`, `null`, `null` and `[]`.
|
|
617
|
+
while no scheduler runs they are `false`, `null`, `null` and `[]`. `stale` lists the tasks a forge process
|
|
618
|
+
that is gone left `RUNNING` (see the task `status` below), `[]` otherwise.
|
|
606
619
|
A solo run's `scheduler` is `null`.
|
|
607
620
|
- `sweep`: the run's finding sweep (`run --sweep`), `null` without `sweep/plan.json` (and for a solo
|
|
608
621
|
run). `tasks` are its fix tasks (tasks with a `sweep.json`), `findings` how many findings they took
|
|
@@ -612,8 +625,8 @@ Every RunSummary field, plus:
|
|
|
612
625
|
`group-cap`, `over-max`, `no-model`) and, for `changed`, the tasks that `merged_since` the review.
|
|
613
626
|
- `deferrals`: the non-empty lines of `deferrals.txt`, `[]` when it is missing.
|
|
614
627
|
- `findings_available`: whether `scripts/forge-contract.py` could be loaded.
|
|
615
|
-
- `
|
|
616
|
-
|
|
628
|
+
- `later`: only on a plan that is one stage of a larger goal (Decomposition below); the key is
|
|
629
|
+
absent otherwise.
|
|
617
630
|
- A solo run has `integration` `null`, `final_review` `null`, `final_reviews` and
|
|
618
631
|
`deferrals` `[]`.
|
|
619
632
|
- `waves` comes from `waves.tsv` (index 0 is wave 1); `[]` when it is missing. A solo run's
|
|
@@ -816,6 +829,8 @@ Every RunSummary field, plus:
|
|
|
816
829
|
`started` comes from the harness's own times, from `<role>.clock`, or, when the call is the log's
|
|
817
830
|
last line, the log's mtime. Every value but the call is `null` when unknown.
|
|
818
831
|
- `waiting`: why a task that is not running waits, as far as the run dir says, or `null`:
|
|
832
|
+
`{"kind": "stale", "status": "RUNNING", "command": "forge handoff resume <plan>"}` for a task a forge
|
|
833
|
+
process that is gone left `RUNNING` (#229); else
|
|
819
834
|
`{"kind": "escalation", "attempts", "model", "split"}` when `escalation.stop` exists (whether or
|
|
820
835
|
not a scheduler runs); else, while `scheduler.live` is true, for a `PENDING` or `INFRA` task:
|
|
821
836
|
`infra` (a pause in `scheduler.pauses` holds it: scope `all`, or its id in `tasks`; the pause's
|
|
@@ -844,6 +859,13 @@ Every RunSummary field, plus:
|
|
|
844
859
|
a merge changes the status the page shows. `error` is the text of `tasks/<id>/summary.error`, or `null` when
|
|
845
860
|
the file is missing or blank. A task whose first generation failed has no `summary.json`, so its `summary` is
|
|
846
861
|
`null` and its error is not shown. The export blanks `text` and `error` unless texts are chosen.
|
|
862
|
+
- `steer_waiting`: the messages `forge control steer` queued for the task's next attempt, oldest first, from
|
|
863
|
+
`tasks/<id>/steer.jsonl`: `{actor, at, chars, text}` (text capped at 8000 characters). `[]` for a solo task. Each
|
|
864
|
+
`trail` entry has `steered`, the same objects without `text`, from `tasks/<id>/steered.<attempt>.jsonl`: the
|
|
865
|
+
messages that attempt was given (`[]` when none), with `mode: "live"` on one sent while it ran.
|
|
866
|
+
- `steer_live`: the attempt whose implementer takes messages live now (#252: `tasks/<id>/steer.live` names a
|
|
867
|
+
live feeder), or `null`. `steer_sending`: the `--now` messages not yet sent to it, from
|
|
868
|
+
`tasks/<id>/steer.inbox.jsonl`, shaped as `steer_waiting`. A solo task has `null` and `[]`.
|
|
847
869
|
- `summaries_override`: `on` or `off` from `tasks/<id>/summaries`, or `null` when the file is missing or holds
|
|
848
870
|
anything else (the task then follows the run's switch). A solo run's task has `null` for `summary` and
|
|
849
871
|
`summaries_override`.
|
|
@@ -1091,7 +1113,7 @@ TaskDetail:
|
|
|
1091
1113
|
execution with the findings of its own `qa.last` copy (`null` until it is done); then the
|
|
1092
1114
|
task's current `qa.last` as a `primary` review with `execution` `null`, only when no
|
|
1093
1115
|
execution's copy is identical to it; then one `shadow` review per shadow dir. `tests` is the
|
|
1094
|
-
reply's `FORGE_TESTS` line: `status` `ran`, `not_needed`, `could_not_run` or `unclear` (it says
|
|
1116
|
+
reply's `FORGE_TESTS` line: `status` `ran`, `partial`, `not_needed`, `could_not_run` or `unclear` (it says
|
|
1095
1117
|
something else), and `reason` or `null`; `null` when the reply has none.
|
|
1096
1118
|
|
|
1097
1119
|
ExecutionDetail: the Execution, plus `resolved` (every `key=value` of `<role>.resolved`, or
|
|
@@ -1132,10 +1154,10 @@ of Findings, in place of the summary), `tests` (as on a TaskDetail review), `tru
|
|
|
1132
1154
|
|
|
1133
1155
|
| Field | Meaning |
|
|
1134
1156
|
|---|---|
|
|
1135
|
-
| `source.kind` | `task`, `execution
|
|
1136
|
-
| `source.which` | `current` `prev` `committed` `existing` (task), `reviewed` (execution, final review)
|
|
1157
|
+
| `source.kind` | `task`, `execution` or `final_review`; `id` the task id, execution name or review name |
|
|
1158
|
+
| `source.which` | `current` `prev` `committed` `existing` (task), `reviewed` (execution, final review) |
|
|
1137
1159
|
| `source.execution`, `attempt` | the qa execution whose prompt held the diff (a final review: its newest), its attempt; a task's `current` and `committed` carry the task's attempt, `prev` and `existing` `null` |
|
|
1138
|
-
| `source.file` | the file read, relative to the run dir
|
|
1160
|
+
| `source.file` | the file read, relative to the run dir; `null` when none was |
|
|
1139
1161
|
| `sources` | what else can be shown. Task (and its executions): every diff file present (`id` = `which`, `label` = file name, `bytes` its size), then every primary and shadow qa execution whose prompt has a fence (`id` the execution, `label` `reviewed diff, attempt N` / `shadow review, attempt N`, `attempt`, `verdict`, `kind` `primary`/`shadow`, `bytes` of the fenced diff). Final review: itself plus the newest 20 reviews that kept a `combined.diff` (`id` the name, `kind` `final`, `verdict`, `bytes` or `null`). Fractal: `[{"id": "candidate", "label": "candidate.diff", "bytes"}]`. Every entry but fractal's has `url`, the endpoint that shows it |
|
|
1140
1162
|
| `available`, `reason` | whether a diff was read; else why: `no changes.diff` (any missing file's name), `unreadable (see warnings)`, `no diff in the review prompt`, `no review prompt`, `no review of this attempt` (a dwarf), `not inlined (larger than 400 KB)` (final reviews), `no review prompt yet`, `no candidate diff yet` |
|
|
1141
1163
|
| `bytes` | the file's size, or the fenced diff's (UTF-8); `null` when unavailable |
|
|
@@ -1155,8 +1177,7 @@ is `combined.diff`, else the fence of its newest execution's `qa.prompt`, then o
|
|
|
1155
1177
|
|
|
1156
1178
|
Which findings: a task diff gets every review (primary, the task's own `qa.last` when no copy
|
|
1157
1179
|
matches it, shadows) of the task's latest attempt; an execution diff that review's (a
|
|
1158
|
-
primary's also brings the shadows of its attempt); a final review's its `qa.last`'s
|
|
1159
|
-
node's none.
|
|
1180
|
+
primary's also brings the shadows of its attempt); a final review's its `qa.last`'s.
|
|
1160
1181
|
|
|
1161
1182
|
Parsing: `git diff --binary` output and plain unified diffs; renames, copies, mode changes,
|
|
1162
1183
|
`/dev/null`, C-quoted paths (`"a/caf\303\251"`), CRLF, the mnemonic and no-prefix forms.
|
|
@@ -1441,78 +1462,58 @@ lines follow, a line was cut, or reaching them took more than 64 MB of reading.
|
|
|
1441
1462
|
The whole value is `null` when the file cannot be read or no tier qualifies. The object
|
|
1442
1463
|
above is what the shipped file answers today.
|
|
1443
1464
|
|
|
1444
|
-
##
|
|
1465
|
+
## Decomposition (subtasks of a split task)
|
|
1445
1466
|
|
|
1446
|
-
A
|
|
1447
|
-
`
|
|
1448
|
-
|
|
1449
|
-
`
|
|
1467
|
+
A task of a plan can be split into subtasks, which are a plan dir of their own under the task
|
|
1468
|
+
(`tasks/<id>/sub`), and a subtask can be split again. A sub-plan is **never listed** by
|
|
1469
|
+
`/api/runs`: it belongs to its run. It is a run all the same: its key (`run_key` of its path)
|
|
1470
|
+
answers every `/api/runs/<key>/…` endpoint, with `source` `sub`, so a subtask's detail, executions,
|
|
1471
|
+
diffs and controls are those of a task of that run. The keys below are absent, not `null`, where
|
|
1472
|
+
a plan records nothing, so older plans read exactly as before.
|
|
1450
1473
|
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
RunDetail `fractal`: `{"enabled", "run", "available", "reason"}`. `enabled` is true only for
|
|
1469
|
-
`"enabled": true`; `run` must match `run-[0-9a-f]{20}`. Reasons: `Fractal is off for this run`,
|
|
1470
|
-
`invalid fractal-selection.json` (not a ≤ 64 KiB JSON object), `invalid run id`,
|
|
1471
|
-
`managed run not found`, `invalid run.json`, `runner mismatch`, `not supported on this
|
|
1472
|
-
platform`.
|
|
1473
|
-
|
|
1474
|
-
TaskFractal:
|
|
1474
|
+
RunSummary (and RunDetail):
|
|
1475
|
+
|
|
1476
|
+
- `parent`: only on a sub-plan. `{"key", "task", "run_id", "path"}`: the run and the task it holds
|
|
1477
|
+
the subtasks of.
|
|
1478
|
+
- `decomposition`: only on a plan with `decomposition.json`.
|
|
1479
|
+
`{"limits": {"depth", "children", "nodes", "frozen"}, "split", "subtasks", "statuses"}`. `limits`
|
|
1480
|
+
are the tree's (the root plan's, each default where it set none: 2, 6, 24), `frozen` once the
|
|
1481
|
+
plan has run. `split` counts this plan's tasks that have subtasks, `subtasks` the tasks of every
|
|
1482
|
+
sub-plan below it, and `statuses` is `[{"id": "d/a", "status"}]` for those, in tree order.
|
|
1483
|
+
|
|
1484
|
+
RunDetail:
|
|
1485
|
+
|
|
1486
|
+
- `later`: only on a stage of a larger goal. `{"stages": [{"title", "goal"}], "stage", "first"}`:
|
|
1487
|
+
the stages its planner proposed after it (at most 10), which stage of its chain this plan is
|
|
1488
|
+
(`null` for the first), and `first`, `{"key", "path"}` of the chain's first plan, or `null`.
|
|
1489
|
+
|
|
1490
|
+
Task (in RunDetail `tasks` and in TaskDetail), only on a plan with `decomposition.json`:
|
|
1475
1491
|
|
|
1476
1492
|
```json
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
"tokens": {"input_tokens": 1, "cached_input_tokens": 0, "output_tokens": 2},
|
|
1487
|
-
"decomposition": {"phase": "accepted", "decision": "split", "reason": "…", "children": ["a", "b"]},
|
|
1488
|
-
"error": null, "has_diff": false, "reserved": false}],
|
|
1489
|
-
"events": [{"at": 1760600021.0, "kind": "node_created", "node": "implementation"}],
|
|
1490
|
-
"warnings": [], "truncated": []}
|
|
1493
|
+
"decomposition": {
|
|
1494
|
+
"decision": "split", "reason": "two halves that can be reviewed apart", "by": "user", "at": 1760621000.0,
|
|
1495
|
+
"sub": {"key": "9d2c41aa07fe", "run_id": "20261016-153012-ab12--page", "path": "…/tasks/page/sub"},
|
|
1496
|
+
"merged": false, "waiting": ["docs"], "start": "keep", "kept": null,
|
|
1497
|
+
"nodes": [{"id": "page/markup", "parent": null, "run": "9d2c41aa07fe", "run_id": "20261016-153012-ab12--page",
|
|
1498
|
+
"task": "markup", "level": 1, "title": "Write the markup", "status": "MERGED", "difficulty": "low",
|
|
1499
|
+
"model": "sol:high", "qa": "opus", "decision": "atomic", "reason": null, "by": "default",
|
|
1500
|
+
"attempts": 1, "tokens": {"input": 1200, "cached": 900, "output": 300}, "has_diff": true}]
|
|
1501
|
+
}
|
|
1491
1502
|
```
|
|
1492
1503
|
|
|
1493
|
-
- `
|
|
1494
|
-
|
|
1495
|
-
`
|
|
1496
|
-
- `
|
|
1497
|
-
|
|
1498
|
-
`
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
`
|
|
1502
|
-
-
|
|
1503
|
-
|
|
1504
|
-
`
|
|
1505
|
-
|
|
1506
|
-
`kind`, `node`, and those of `phase decision status acceptance exit_code iteration cost
|
|
1507
|
-
difficulty model reason` the line has. Other lines are counted in a warning.
|
|
1508
|
-
|
|
1509
|
-
FractalNodeDetail (`…/fractal/nodes/<node>`): the node as listed, plus `goal`, `error` (20,000
|
|
1510
|
-
characters), `last` and `planning_last` (their last 20,000, behind `…`), `planning_tokens`,
|
|
1511
|
-
`decomposition` in full (`phase decision reason attempts error`, and `admission`: `name goal
|
|
1512
|
-
difficulty paths deps model` each), `decomposition_history` (its newest 20, each like
|
|
1513
|
-
`decomposition`, `reason` and `error` 2,000), and `run`, `task`, `fractal_run`,
|
|
1514
|
-
`fractal_task`, `warnings`, `truncated` (the texts cut). A reserved node has these `null` or
|
|
1515
|
-
`[]`, with its admission's `goal`.
|
|
1504
|
+
- `decision`: `atomic` (kept whole), `split` or `bounded` (a split a limit of the run refused; the
|
|
1505
|
+
task runs as one). `by`: `planner`, `user`, `auto` (`run --auto-split`) or `default` (nobody
|
|
1506
|
+
decided). `reason` and `at` may be `null`.
|
|
1507
|
+
- `sub`: the sub-plan as a run, or `null` for a task that is not split. `merged`: its subtasks'
|
|
1508
|
+
work is on the task's branch. `waiting`: the subtasks the task waits for. `start`: `keep` or
|
|
1509
|
+
`fresh`; `kept`: the commit `fresh` set aside, else `null`.
|
|
1510
|
+
- `nodes`: every subtask below the task, through every level, in tree order (at most 600; past it
|
|
1511
|
+
the detail's `truncated` names `decomposition`). `id` is the path from the task
|
|
1512
|
+
(`page/markup/one`), `parent` the node above (`null` for a direct subtask), `run` the key of the
|
|
1513
|
+
sub-plan the node is a task of and `task` its id there: its detail is
|
|
1514
|
+
`/api/runs/<run>/tasks/<task>` and its diff `/api/runs/<run>/tasks/<task>/diff`. `tokens` sums
|
|
1515
|
+
the node's executions, or is `null`; forge records tokens, not a price. `has_diff` says its
|
|
1516
|
+
`changes.diff` is there and not empty.
|
|
1516
1517
|
|
|
1517
1518
|
## Export (`forge_ui/export.py`)
|
|
1518
1519
|
|
|
@@ -1529,10 +1530,9 @@ difficulty paths deps model` each), `decomposition_history` (its newest 20, each
|
|
|
1529
1530
|
exported), which `map3d.js` imports from a `blob:` URL.
|
|
1530
1531
|
- `api` maps each path the page requests to that endpoint's response as the server would answer
|
|
1531
1532
|
it (server.api_get): `/api/runs` (this run only), the RunDetail, every TaskDetail, every
|
|
1532
|
-
Group detail, every ExecutionDetail the RunDetail or a Group names, every FinalReviewDetail, Files
|
|
1533
|
-
Fractal trees and nodes. A script named above whose file is not in `forge_ui/static/` yet is left out,
|
|
1533
|
+
Group detail, every ExecutionDetail the RunDetail or a Group names, every FinalReviewDetail, Files and RunFindings. A script named above whose file is not in `forge_ui/static/` yet is left out,
|
|
1534
1534
|
so `groupsview.js` can be listed before the group page adds it. With `texts=1` also every diff the page can open (each task's diff and its `sources`,
|
|
1535
|
-
each final review's
|
|
1535
|
+
each final review's), every `dwarf` and `qa` ExecutionTranscript (at most 2 MB each)
|
|
1536
1536
|
and ExecutionChecks, every TaskChecks, the RunEnvironment,
|
|
1537
1537
|
and the VerificationLog tail of `verification.log`, of each lane's log and of each lane run's log
|
|
1538
1538
|
(under their tail paths; line ranges are not stored, so the page shows the tail).
|
|
@@ -1646,7 +1646,7 @@ object its stdout holds, when that parses as one.
|
|
|
1646
1646
|
|---|---|---|
|
|
1647
1647
|
| 0 | `200` | the CLI's stdout JSON object, as it is |
|
|
1648
1648
|
| 2 (invalid input) | `400` | `invalid` |
|
|
1649
|
-
| 3 (refused: not live, MERGED, a Fractal
|
|
1649
|
+
| 3 (refused: not live, MERGED, a plan made with Fractal, a pin that fails doctor, the control lock busy) | `409` | `refused` |
|
|
1650
1650
|
| 4 (a failure the CLI reported) | `500` | `failed` |
|
|
1651
1651
|
| anything else, a signal, a missing CLI, or a 0 with no JSON object | `502` | `bad gateway` |
|
|
1652
1652
|
| timeout | `504` | `timeout` |
|
|
@@ -1663,9 +1663,14 @@ for them only unknown keys and runs the catalog does not hold are `404`. Every w
|
|
|
1663
1663
|
|
|
1664
1664
|
### `GET /api/runs/<key>/controls`
|
|
1665
1665
|
|
|
1666
|
-
`forge control show <plan dir> --json`: `200` with its object (`plan`, `run_id`, `live`, `
|
|
1666
|
+
`forge control show <plan dir> --json`: `200` with its object (`plan`, `run_id`, `live`, `removed` (`"Fractal"` for a plan made with it, else `null`),
|
|
1667
|
+
`decomposition` (`{limits: {depth, children, nodes, frozen}, nodes: [{id, plan, task, level, status, title, decision, reason, by, …}]}`, every node of the tree in order),
|
|
1667
1668
|
`run` (the plan-wide controls; `qa_threshold` is the effective level and `qa_threshold_source` is `set` or `default`), `tasks` (per task: `status`, `dwarf`, `qa`, `qa_threshold`,
|
|
1668
|
-
`retry_budget`, `retries_used`, `pin`, `escalation_stop`, `escalation_next`)
|
|
1669
|
+
`retry_budget`, `retries_used`, `pin`, `escalation_stop`, `escalation_next`), `log`, `tiers` (per
|
|
1670
|
+
difficulty `low`/`medium`/`high`: `tasks`, `pending` (not started yet) and the `dwarf` and `qa` specs those
|
|
1671
|
+
pending tasks use), `models` ({spec: "gpt-6.2-sol on codex"} for every spec the tasks name) and
|
|
1672
|
+
`registry` ({alias: [[harness, model], ...]}, the first row the alias's default), from which the page
|
|
1673
|
+
resolves a spec typed in a picker before it is applied). No token
|
|
1669
1674
|
is needed to read it. Of `run` the page also reads `max_parallel` (1–64 or `null`), `infra_backoff`
|
|
1670
1675
|
(the shape, `exp:60` when unset), `escalate_effort` (`on`/`off`), `drained` and `stopping`
|
|
1671
1676
|
(`graceful`, `now` or `null`) while live, and `infra_paused` while live: one
|
|
@@ -1687,9 +1692,11 @@ known or a spec runs is for the CLI to say (its `400` or `409` comes back as abo
|
|
|
1687
1692
|
| `{"action": "set", "key": "qa-threshold", "value": "P2"}` (`default` at run level removes the setting, `none` is P3; for a task `inherit` drops the override) | `control set <dir> qa-threshold P2 --actor ui --json` |
|
|
1688
1693
|
| `{"action": "set", "key": "retry-budget", "value": "inherit", "task": "reader"}` | `control set <dir> retry-budget inherit --task reader --actor ui --json` |
|
|
1689
1694
|
| `{"action": "set", "key": "summaries", "value": "on"}` (or `off`) | `control set <dir> summaries on --actor ui --json` |
|
|
1695
|
+
| `{"action": "set", "key": "summaries-model", "value": "haiku:low"}` (or `default`) | `control set <dir> summaries-model haiku:low --actor ui --json` |
|
|
1690
1696
|
| `{"action": "set", "key": "summaries", "value": "inherit", "task": "reader"}` (`on` or `off` with `task` too) | `control set <dir> summaries inherit --task reader --actor ui --json` |
|
|
1691
1697
|
| `{"action": "pin", "task": "graph", "spec": "sol:high:codex"}` | `control pin <dir> graph sol:high:codex --actor ui --json` |
|
|
1692
1698
|
| `{"action": "unpin", "task": "graph"}` | `control unpin <dir> graph --actor ui --json` |
|
|
1699
|
+
| `{"action": "models", "tier": "low", "dwarf": "haiku:xhigh,sonnet", "qa": "opus"}` (`dwarf`, `qa` or both; each one spec or a comma-separated pool) | `control models <dir> low --dwarf haiku:xhigh,sonnet --qa opus --actor ui --json` |
|
|
1693
1700
|
| `{"action": "drain"}` | `control drain <dir> --actor ui --json` |
|
|
1694
1701
|
| `{"action": "resume"}` | `control resume <dir> --actor ui --json` |
|
|
1695
1702
|
| `{"action": "stop"}` (or `"now": false`) | `control stop <dir> --actor ui --json` |
|
|
@@ -1707,6 +1714,9 @@ hand, so its CLI is the place to queue it. A success is
|
|
|
1707
1714
|
(`409`) when no scheduler is live. A `retry` only queues: `200 {"queued": true, "request": "<id>"}`.
|
|
1708
1715
|
Its refusals before queueing (not live, a MERGED task, a spec that fails doctor) are the CLI's
|
|
1709
1716
|
`409`/`400`; the scheduler applies or refuses it later, in the `log` line with that `request` id.
|
|
1717
|
+
A `models` change answers like `set`, plus `tasks` (each changed task with its `dwarf` and `qa` as
|
|
1718
|
+
`[before, after]`), `kept` ({task: status} of the tier's tasks that had already started and keep their
|
|
1719
|
+
model) and `models` (the label of each spec given).
|
|
1710
1720
|
|
|
1711
1721
|
### `POST /api/runs/<key>/tasks/<id>/brief/<qid>`
|
|
1712
1722
|
|
|
@@ -1895,6 +1905,17 @@ RunDetail's `scheduler.live`) and `result` is `{"queued": true, "request"}` or `
|
|
|
1895
1905
|
"prepared": true}`. Exit 3 (the task is not `NEEDS_INPUT`) is `409` with the CLI's message. Holds
|
|
1896
1906
|
the run's write lock (`409 busy`); timeout 60 s. Refused under `--read-only` and without the token.
|
|
1897
1907
|
|
|
1908
|
+
### `POST /api/runs/<key>/tasks/<id>/steer`
|
|
1909
|
+
|
|
1910
|
+
Body: `{"text": string, "now"?: boolean}`, checked as for `/answer`. The run must be a plan (`404`
|
|
1911
|
+
otherwise). Runs `control steer <plan> <id> --file - --actor ui --json` with the stripped text on
|
|
1912
|
+
stdin, plus `--now` when `now` is true; the answer is `200` with the CLI's object, `{"ok": true,
|
|
1913
|
+
"queued": true, "task", "waiting", "live", "chars"}`, or with `now` `{"ok": true, "queued": false,
|
|
1914
|
+
"sent": true, "task", "attempt", "waiting", "live": true, "chars"}`. Exit 3 (a MERGED task, 20
|
|
1915
|
+
messages already waiting, or with `now` no implementer running live) is `409` with the CLI's message. Nothing is
|
|
1916
|
+
started: the task's next implementer attempt gets the message (#134). Holds the run's write lock
|
|
1917
|
+
(`409 busy`); timeout 60 s. Refused under `--read-only` and without the token.
|
|
1918
|
+
|
|
1898
1919
|
### `GET /api/models/reviewers`
|
|
1899
1920
|
|
|
1900
1921
|
Runs `dataset reviewers --json` and answers with its object: `horizon_days`, `min_landed`,
|
|
@@ -1918,7 +1939,7 @@ ProjectRow = {id, name, root, exists, runs, live, last, path_only (runs tied by
|
|
|
1918
1939
|
Project = {id, name, root, exists, live, last, path_only, memory_off_runs,
|
|
1919
1940
|
checkouts: [{path, exists, branch, runs, root}], runs: [RunSummary + identity_source, dataset_uid, no_memory]}
|
|
1920
1941
|
ProjectFindings = {id, rows: [Finding], notes: [text], runs, dataset_runs, computed, available,
|
|
1921
|
-
issues_online (true when that listing was the online one), issues_read_at (unix time the listing was read, or null)}
|
|
1942
|
+
issues_online (true when that listing was the online one and asked GitHub: false for a repository with no GitHub remote), issues_read_at (unix time the listing was read, or null)}
|
|
1922
1943
|
Finding = {source: run|dataset, run (key or null), run_id, task, final_review (its dir name, 'final' from the
|
|
1923
1944
|
dataset), attempt, kind: primary|shadow|final, reviewer, verdict, at, id, severity, confidence, location,
|
|
1924
1945
|
summary, text, fp (forge issues' key, null when it cannot parse the line), record_fp (the finding
|
|
@@ -2004,9 +2025,10 @@ Storage = {state: measuring | ready | error | unavailable, error, started, progr
|
|
|
2004
2025
|
data: Report | null (the last measurement, kept while the next one runs)}
|
|
2005
2026
|
Report = {repo: null, computed, complete, totals: {runs, worktrees, data_home, reclaimable, snapshots, logs, strays},
|
|
2006
2027
|
runs: [{path, run_id, repo, updated, total, snapshots, snapshot_count, logs, gz, compressible, strays,
|
|
2007
|
-
|
|
2028
|
+
other, reclaimable, complete, key: forge-ui run key | null (not in the run list), commands: [{label, command}]}],
|
|
2008
2029
|
strays: [{path, bytes, kind: dependencies | git, run}], worktrees: [{repo, run_id, path, bytes, complete}],
|
|
2009
2030
|
data_home: {path, bytes, parts: {dataset, blobs, archive, exports, legacy, storage, other}} | null,
|
|
2031
|
+
removed: [{name, path, bytes, since, complete}] (what a removed part of forge left on disk: today Fractal's state dir),
|
|
2010
2032
|
commands: [{label, command, bytes?}]}
|
|
2011
2033
|
```
|
|
2012
2034
|
|
|
@@ -2150,7 +2172,7 @@ Plain scripts unless noted; each defines one global and none parses API text as
|
|
|
2150
2172
|
|---|---|---|
|
|
2151
2173
|
| `runmodel.js` | `ForgeRunModel` | pure data, no DOM: the plate layout (archivision's `plate()`), the atlas, plan and execution models, forge-schedule's rules projected forward, the critical path, concurrency, the state of every node at a time `t` (replay, verification lanes included), the finish node's verification LEDs (`verifyLeds`: one per lane in lanes mode, else one per run), filters. Also a CommonJS module, for `node --test` |
|
|
2152
2174
|
| `gantt.js` | `ForgeGantt` | `render(container, run, {now, onSelect, sel, replay, critical, ghosts})`: attempts on wall-clock time in lanes; `strip(container, run, {now, replay})`: busy attempts and model calls against `max_parallel`. Under the attempts, the finish rows: `verify` (single-command verifications; the newest split into its runs back to back from its start, dashed because that placement is approximate), a `verify · <lane>` row per lane of a lanes verification (each run and rerun at its own time; a run with no exit is UNKNOWN once it ended, never FAIL) and `final review`. A lane or run item opens the verification inspector |
|
|
2153
|
-
| `panel.js` | `ForgePanel` | `render(host, ctx)`: the inspector for a run, task, execution, final review, verification
|
|
2175
|
+
| `panel.js` | `ForgePanel` | `render(host, ctx)`: the inspector for a run, task, execution, final review, verification or integration; a split task's `Decomposition` section lists its subtasks (`decompositionSection`); for a task it opens on its `header` (its Prompt, Approach and Acceptance criteria texts, from the lazy detail once loaded), then its `trail`, its `summary` with the `summaries_override` switch, and `ForgeBrief`'s questions; fetches the lazy endpoints once per node; `ctx.diffHash(spec)` links into the diff viewer, `ctx.onFractal(task, TaskFractal)` hands a task's tree to the stage |
|
|
2154
2176
|
| `verifyview.js` | `ForgeVerify` | `render(host, {run, now, fetchJSON, rerender})`: the verification inspector panel.js delegates to: while it runs, the elapsed time, step, last line and a flag past 5 minutes without output, and a live tail of the followed lane's log (or the single log) read again each poll; when it failed, the failing tests first, grouped by lane with new or known, each opening its lane's log at its line (in an export, the tail); a lanes table (state, time, reruns, counts). Pure helpers (`model`, `laneRow`, `groupFailing`, `idleWarning`, `openStep`, `tailLane`, `logPath`, `linesPath`, `tailLines`) are a CommonJS module too |
|
|
2155
2177
|
| `checksview.js` | `ForgeChecks` | where each task stands and the checks its agents ran: `cell(task, now, ctx)` (the task table's Now column: the running call and for how long, a `quiet N min` flag past 5 minutes without output, or why it waits), `nowSection`, `execSection` and the attempts' checks and acceptance-criteria lines (`taskChecks`, `underExecution`, `attemptCriteria`) for panel.js, `schedulerFields` (the run inspector), `banner(head, ctx)` (the run header: environment problems more than one task met, read again at most every 15 s while tasks run) and `tick(root, now)`, which app.js calls each refresh to move `data-since`, `data-until` and `data-quiet` times. Pure helpers (`nowModel`, `waitingModel`, `nowRank`, `checkRow`, `countsText`, `coverageModel`, `bannerProblems`, `schedulerModel`, `quietText`, `untilText`) are a CommonJS module too |
|
|
2156
2178
|
| `controls.js` | `ForgeControls` | the run and task control panels that panel.js mounts (`mountRun`, `mountTask`) and the pure model under them: what each key is called and where it applies (`KEYS`), `prepare` (a draft's request body and confirm text), `bodyFor`, `savedText` and `agoText`. Every change goes through `ForgeUI` (uikit.js) to `POST /api/runs/<key>/controls`. Also a CommonJS module |
|
|
@@ -2173,10 +2195,10 @@ Routes (the URL hash): `#/` the map of every run; `#/cloud`, `#/cloud/runs/<key>
|
|
|
2173
2195
|
selected), `#/cloud/projects/<id>` (a project in focus), `#/cloud/models/<alias>` (the cloud
|
|
2174
2196
|
filtered to that model); `#/models` the leaderboard; `#/runs/<key>`; `…/tasks/<id>`;
|
|
2175
2197
|
`…/tasks/<id>/executions/<name>`; `…/executions/<name>` (an execution that belongs to no
|
|
2176
|
-
task); an agent's conversation, `…/executions/<name>/conversation[/event/<n>]` after either; `…/final-review[/<name>]`; `…/verification`; `…/integration`;
|
|
2198
|
+
task); an agent's conversation, `…/executions/<name>/conversation[/event/<n>]` after either; `…/final-review[/<name>]`; `…/verification`; `…/integration`; a subtask is a task of its sub-plan's run, `#/runs/<sub-plan key>/tasks/<id>`;
|
|
2177
2199
|
and the diff viewer: `…/tasks/<id>/diff[/<source>][/file/<path>]` (`source` is `current`, `prev`,
|
|
2178
|
-
`committed`, `existing` or an execution)
|
|
2179
|
-
|
|
2200
|
+
`committed`, `existing` or an execution) and `…/final-review/<name>/diff[/file/<path>]`
|
|
2201
|
+
(`path` percent-encoded whole).
|
|
2180
2202
|
|
|
2181
2203
|
Kept in the browser (localStorage, every access guarded): `forge-ui-view`, `-mode`, `-overlay`,
|
|
2182
2204
|
`-speed`, `-map-filter`; `forge-ui-cloud` (filter, layout, shape, panel) and
|