@giamme/forge 0.21.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 +81 -0
- package/README.md +25 -15
- package/SKILL.md +137 -216
- package/VERSION +1 -1
- package/bin/forge.js +104 -0
- 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 +12 -10
- package/docs/forge-ui.md +33 -4
- package/docs/install.md +127 -6
- package/docs/memory.md +6 -1
- package/docs/models.md +36 -10
- package/docs/reviews.md +50 -29
- package/docs/safety.md +27 -2
- package/docs/troubleshooting.md +8 -11
- package/forge +29 -4
- package/forge.cmd +56 -0
- package/package.json +6 -3
- 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 +148 -13
- 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 +781 -51
- package/scripts/forge-dispatch.sh +202 -42
- package/scripts/forge-du.py +13 -3
- package/scripts/forge-guard.py +137 -6
- package/scripts/forge-handoff.py +221 -39
- package/scripts/forge-install-ripwire.sh +100 -24
- package/scripts/forge-install.sh +100 -41
- 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 +179 -0
- package/scripts/forge-lib-group.sh +9 -6
- package/scripts/forge-lib-plans.sh +38 -21
- package/scripts/forge-lib-review.sh +28 -8
- package/scripts/forge-lib-task.sh +263 -69
- package/scripts/forge-lib-verify.sh +59 -10
- package/scripts/forge-memory.sh +83 -4
- package/scripts/forge-metrics.sh +10 -3
- package/scripts/forge-parallel-options.sh +23 -4
- package/scripts/forge-parallel.sh +602 -217
- 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 +39 -14
- package/scripts/forge-schedule.py +141 -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 +39 -58
- package/scripts/forge-sweep.py +3 -2
- package/scripts/forge-ui.py +8 -1
- package/scripts/forge-update.sh +8 -3
- package/scripts/forge-verify.py +17 -1
- package/scripts/forge-version.py +13 -1
- package/scripts/forge-watch.py +7 -2
- package/scripts/forge-win.sh +156 -0
- package/scripts/forge_brief/__init__.py +6 -1
- package/scripts/forge_brief/proposals.py +6 -1
- 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/budget.py +12 -7
- package/scripts/forge_decide/profiles.py +11 -14
- package/scripts/forge_decide/replay.py +9 -4
- package/scripts/forge_decompose.py +987 -0
- package/scripts/forge_flock.py +17 -2
- 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_posix.py +17 -0
- package/scripts/forge_prefs.py +138 -0
- package/scripts/forge_proc.py +108 -0
- package/scripts/forge_registry.py +2 -2
- package/scripts/forge_side/__init__.py +23 -4
- 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 +53 -16
- 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 +462 -60
- 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 +52 -31
- 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
|
@@ -19,6 +19,16 @@ const clamp = v => Math.max(0, Math.min(1, v));
|
|
|
19
19
|
const segT = (v, a, b) => clamp((v - a) / (b - a));
|
|
20
20
|
const ez = t => t < .5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
|
|
21
21
|
const back = t => t <= 0 ? 0 : t >= 1 ? 1 : 1 + 2.2 * Math.pow(t - 1, 3) + 1.2 * Math.pow(t - 1, 2);
|
|
22
|
+
// Opening stagger window on the parent task's progress p (0..1): keeps step 0.05 through
|
|
23
|
+
// 8 slots (maxIdx <= 7) and scales down above that so the last part's window still ends at 1.
|
|
24
|
+
export function partWindow(idx, maxIdx) {
|
|
25
|
+
const step = maxIdx > 7 ? .36 / maxIdx : .05;
|
|
26
|
+
return [.34 + idx * step, .64 + idx * step];
|
|
27
|
+
}
|
|
28
|
+
export function partRise(p, idx, maxIdx) {
|
|
29
|
+
const [a, b] = partWindow(idx, maxIdx);
|
|
30
|
+
return back(segT(p, a, b));
|
|
31
|
+
}
|
|
22
32
|
const MODEL_PALETTE = ['#4e9af1', '#f08c3a', '#6cc070', '#c46fd8', '#e0c341', '#4fc2c0', '#e06a8c', '#9a8cff', '#a3b84a', '#d98f6b'];
|
|
23
33
|
const KIND_H = { dwarf: 24, qa: 13, shadow: 12 };
|
|
24
34
|
|
|
@@ -351,6 +361,8 @@ export async function createStage(host, cb = {}) {
|
|
|
351
361
|
const padX = 10, padT = 22, padB = 10, gx = 8, gy = 7;
|
|
352
362
|
const cw = (w - 2 * padX - (C - 1) * gx) / C, ch = Math.min(46, (d - padT - padB - (R - 1) * gy) / R);
|
|
353
363
|
el.zoneEls = [];
|
|
364
|
+
const partEls = [];
|
|
365
|
+
let maxIdx = 0;
|
|
354
366
|
tp.zones.forEach((z, ci) => {
|
|
355
367
|
const zx = x + padX + ci * (cw + gx), zy = y + padT;
|
|
356
368
|
const zm = E.lmat({ dashed: true, dashSize: 4 * TS, gapSize: 3 * TS });
|
|
@@ -365,7 +377,9 @@ export async function createStage(host, cb = {}) {
|
|
|
365
377
|
const part = tp.parts.find(p => p.id === pid);
|
|
366
378
|
const ph = KIND_H[part.kind] || 14;
|
|
367
379
|
const n = { x: zx, y: zy + ri * (ch + gy), w: cw, d: ch, h: ph };
|
|
368
|
-
const
|
|
380
|
+
const idx = ri + ci * R;
|
|
381
|
+
maxIdx = Math.max(maxIdx, idx);
|
|
382
|
+
const k = newEl('p:' + task.id + ':' + part.id, 'part', G, n, { part, task: task.id, parent: el.id, idx, maxIdx: 0 });
|
|
369
383
|
el.root.remove(k.root); G.add(k.root);
|
|
370
384
|
setStatus(k, part.planned ? 'PENDING' : part.status);
|
|
371
385
|
const r = part.kind === 'qa' ? Math.min(cw, ch) * .3 : Math.min(4, Math.min(cw, ch) * .07);
|
|
@@ -380,9 +394,11 @@ export async function createStage(host, cb = {}) {
|
|
|
380
394
|
const fs = pt.exec && pt.exec.findings || pt.shadow && pt.shadow.findings;
|
|
381
395
|
if (fs && fs.worst) chip(cx, s, Cc, pad, ch - pad - 6 * 1.6, `${fs.worst}×${fs[fs.worst]}`, E.sevHex(fs.worst), { f: Math.min(5, ch * .14) });
|
|
382
396
|
}, 'cover', { x: zx, y: n.y, z: ph });
|
|
397
|
+
partEls.push(k);
|
|
383
398
|
el.kids.push(k);
|
|
384
399
|
});
|
|
385
400
|
});
|
|
401
|
+
for (const k of partEls) k.data.maxIdx = maxIdx;
|
|
386
402
|
el.innerFlows = [];
|
|
387
403
|
for (const l of tp.links) {
|
|
388
404
|
const a = EL.get('p:' + task.id + ':' + l.from), b = EL.get('p:' + task.id + ':' + l.to); if (!a || !b) continue;
|
|
@@ -402,46 +418,46 @@ export async function createStage(host, cb = {}) {
|
|
|
402
418
|
}
|
|
403
419
|
el.innerFlows.push(f);
|
|
404
420
|
}
|
|
405
|
-
|
|
421
|
+
syncSubtasks(el);
|
|
406
422
|
applyLayers();
|
|
407
423
|
}
|
|
408
|
-
/* ----------
|
|
409
|
-
const
|
|
410
|
-
const
|
|
411
|
-
function
|
|
424
|
+
/* ---------- decomposition: an opened split task's subtasks, a small tree floating over it ---------- */
|
|
425
|
+
const SUBTASKS = new Map(); // task id → its decomposition nodes
|
|
426
|
+
const SUB_H = { low: 12, medium: 18, high: 26 };
|
|
427
|
+
function syncSubtasks(el) {
|
|
412
428
|
if (!el || !el.inner || el.kind !== 'task') return;
|
|
413
|
-
const tid = el.data.task.id,
|
|
414
|
-
const sig = JSON.stringify([E.theme, nodes.map(n => [n.id, n.parent, n.
|
|
415
|
-
if (sig === el.
|
|
416
|
-
el.
|
|
417
|
-
if (el.
|
|
429
|
+
const tid = el.data.task.id, nodes = list(SUBTASKS.get(tid));
|
|
430
|
+
const sig = JSON.stringify([E.theme, nodes.map(n => [n.id, n.parent, n.status, n.difficulty, n.model, n.decision])]);
|
|
431
|
+
if (sig === el.subSig) return;
|
|
432
|
+
el.subSig = sig;
|
|
433
|
+
if (el.subG) { PICK = PICK.filter(o => !(o.userData.subtask && o.userData.subtask.task === tid)); E.disposeGroup(el.subG); el.subG = null; }
|
|
418
434
|
if (!nodes.length) return;
|
|
419
|
-
const T = RM.
|
|
435
|
+
const T = RM.nodeTree(nodes), byId = new Map(nodes.map(n => [n.id, n])), { x, y, w, d, h } = el.n;
|
|
420
436
|
const S = 34, DX = 62, DY = 44, tw = S + (T.cols - 1) * DX, td = S + Math.max(0, T.rows - 1) * DY;
|
|
421
437
|
const x0 = x + w / 2 - tw / 2, y0 = y + d / 2 - td / 2, z0 = h + 70;
|
|
422
|
-
const G = el.
|
|
423
|
-
const at = id => { const p = T.pos[id], n = byId.get(id); return { x: x0 + p.col * DX, y: y0 + p.row * DY, w: S, d: S, h:
|
|
438
|
+
const G = el.subG = new THREE.Group(); el.inner.add(G);
|
|
439
|
+
const at = id => { const p = T.pos[id], n = byId.get(id); return { x: x0 + p.col * DX, y: y0 + p.row * DY, w: S, d: S, h: SUB_H[String(n.difficulty || '').toLowerCase()] || 16 }; };
|
|
424
440
|
const cable = E.lmat({ polygonOffsetFactor: -3, polygonOffsetUnits: -8 }); cable.color.copy(E.majorMat.color).lerp(E.accent, .45);
|
|
425
441
|
for (const [pa, ch] of T.edges) { const A = at(pa), B = at(ch), [P, Q] = E.ends(A, B, z0 + A.h / 2, z0 + B.h / 2); E.polyLine(E.curve(P, Q, 3, .1), cable, G); }
|
|
426
442
|
// a stem from the task's floor to each root
|
|
427
443
|
const stem = E.lmat({ dashed: true, dashSize: 4 * TS, gapSize: 3 * TS }); stem.color.copy(cable.color);
|
|
428
444
|
for (const n of nodes) if (T.pos[n.id] && T.pos[n.id].depth === 0) { const A = at(n.id); E.polyLine([[x + w / 2, y + d / 2, 1], [A.x + S / 2, A.y + S / 2, z0]], stem, G).computeLineDistances(); }
|
|
429
445
|
for (const n of nodes) {
|
|
430
|
-
const b = at(n.id), M = E.mats(), col = E.statusColor(n.
|
|
431
|
-
const m = E.solid(b.x, b.y, z0, b.w, b.d, b.h, 6, M, G, {
|
|
432
|
-
E.paint(M,
|
|
446
|
+
const b = at(n.id), M = E.mats(), col = E.statusColor(n.status || 'unknown');
|
|
447
|
+
const m = E.solid(b.x, b.y, z0, b.w, b.d, b.h, 6, M, G, { subtask: { task: tid, node: n.id, run: n.run, id: n.task } });
|
|
448
|
+
E.paint(M, 1, .6, 0, 1, 1, col, .3);
|
|
433
449
|
PICK.push(m);
|
|
434
450
|
const lab = E.tplane(S - 4, 13, E.pxIn(w, d), (cx, sc, C) => {
|
|
435
|
-
E.font(cx, 4.6, sc, 600); cx.fillStyle = C.inkHi; cx.fillText(E.ellipsis(n.id, 12), 1 * sc, 5.4 * sc);
|
|
436
|
-
E.font(cx, 3.6, sc); cx.fillStyle = C.ink; cx.fillText(E.ellipsis(n.
|
|
451
|
+
E.font(cx, 4.6, sc, 600); cx.fillStyle = C.inkHi; cx.fillText(E.ellipsis(n.task || n.id, 12), 1 * sc, 5.4 * sc);
|
|
452
|
+
E.font(cx, 3.6, sc); cx.fillStyle = C.ink; cx.fillText(E.ellipsis(n.model || n.status || '', 14), 1 * sc, 11 * sc);
|
|
437
453
|
}, G, M);
|
|
438
454
|
E.roofAt(lab, b.x + 2, b.y + 2, z0 + b.h);
|
|
439
455
|
}
|
|
440
456
|
}
|
|
441
|
-
E.themeHooks.add(() => { for (const el of EL.values()) if (el.
|
|
457
|
+
E.themeHooks.add(() => { for (const el of EL.values()) if (el.subG) { el.subSig = ''; syncSubtasks(el); } });
|
|
442
458
|
function closeInner(el) {
|
|
443
459
|
if (!el.inner) return;
|
|
444
|
-
if (el.kind === 'task') { const tid = el.data.task.id; PICK = PICK.filter(o => !(o.userData.
|
|
460
|
+
if (el.kind === 'task') { const tid = el.data.task.id; PICK = PICK.filter(o => !(o.userData.subtask && o.userData.subtask.task === tid)); el.subG = null; el.subSig = ''; }
|
|
445
461
|
for (const k of el.kids || []) { EL.delete(k.id); PICK = PICK.filter(o => o.userData.el !== k.id); }
|
|
446
462
|
PICK = PICK.filter(o => !(o.userData.floor && o.userData.el === el.id));
|
|
447
463
|
E.disposeGroup(el.inner); el.inner = null; el.kids = []; el.innerFlows = [];
|
|
@@ -729,12 +745,12 @@ export async function createStage(host, cb = {}) {
|
|
|
729
745
|
function selIds() {
|
|
730
746
|
const s = st.sel, out = new Set(); if (!s) return out;
|
|
731
747
|
if (st.view === 'atlas') { if (s.kind === 'run') out.add('r:' + s.key); return out; }
|
|
732
|
-
const tid = s.kind === 'task' ? s.id : s.kind === 'execution'
|
|
748
|
+
const tid = s.kind === 'task' ? s.id : s.kind === 'execution' ? s.task : null;
|
|
733
749
|
if (tid) {
|
|
734
750
|
out.add('t:' + tid);
|
|
735
751
|
if (s.kind === 'execution') for (const el of EL.values()) if (el.kind === 'part' && el.data.task === tid && el.data.part.exec && el.data.part.exec.id === s.exec) out.add(el.id);
|
|
736
752
|
}
|
|
737
|
-
if (s.kind === 'task' || s.kind === 'execution'
|
|
753
|
+
if (s.kind === 'task' || s.kind === 'execution') {
|
|
738
754
|
for (const el of EL.values()) {
|
|
739
755
|
const it = el.data && el.data.item; if (!it) continue;
|
|
740
756
|
if (s.kind !== 'execution' ? it.task === tid : it.id === s.exec || list(it.segs).some(g => g.id === s.exec)) out.add(el.id);
|
|
@@ -753,7 +769,7 @@ export async function createStage(host, cb = {}) {
|
|
|
753
769
|
return new THREE.Color().copy(E.statusColor('pending')).lerp(E.accent, Math.sqrt(v / mx));
|
|
754
770
|
}
|
|
755
771
|
function retarget() {
|
|
756
|
-
const sel = selIds(), tsel = st.sel && (st.sel.kind === 'task' ? st.sel.id : st.sel.kind === 'execution'
|
|
772
|
+
const sel = selIds(), tsel = st.sel && (st.sel.kind === 'task' ? st.sel.id : st.sel.kind === 'execution' ? st.sel.task : null), open = tsel && st.mode === 'plan' && st.view === 'run' ? 't:' + tsel : null;
|
|
757
773
|
const crit = st.overlay.critical && st.crit ? new Set(st.crit.ids.map(id => 't:' + id)) : new Set();
|
|
758
774
|
// the route: what the chosen task waits on and what waits on it, lit like a route set on a signal box desk
|
|
759
775
|
const route = new Set();
|
|
@@ -952,7 +968,7 @@ export async function createStage(host, cb = {}) {
|
|
|
952
968
|
let lift = 0, ob = 1, ol = 1;
|
|
953
969
|
const pr = PROG.get(el.id);
|
|
954
970
|
if (pr) { const p = pr.p; lift = ez(segT(p, .04, .46)); ob = 1 - segT(p, .06, .3); ol = 1 - segT(p, .14, .46); }
|
|
955
|
-
if (el.kind === 'part') { const par = EL.get(el.data.parent), pp = par && PROG.get(par.id); const p = pp ? pp.p : 0; const
|
|
971
|
+
if (el.kind === 'part') { const par = EL.get(el.data.parent), pp = par && PROG.get(par.id); const p = pp ? pp.p : 0; const q = partRise(p, el.data.idx, el.data.maxIdx); el.q = q; el.root.visible = q > .001; el.cover.scale.y = Math.max(.001, q); }
|
|
956
972
|
el.cover.visible = ol > .003;
|
|
957
973
|
el.cover.position.y = (el.kind === 'task' ? 120 : 0) * lift * TS;
|
|
958
974
|
if (el.kind === 'task' || el.kind === 'finish') el.cover.scale.y = Math.max(.05, c.hk);
|
|
@@ -1137,7 +1153,7 @@ export async function createStage(host, cb = {}) {
|
|
|
1137
1153
|
const b = st.view === 'run' ? BEACONS.pick(cx, cy) : null;
|
|
1138
1154
|
if (b) { cb.onFinding && cb.onFinding(b.data); return; }
|
|
1139
1155
|
const o = E.pick(cx, cy, PICK, pickable), el = elOf(o);
|
|
1140
|
-
if (o && o.userData.
|
|
1156
|
+
if (o && o.userData.subtask) { cb.onOpenNode && cb.onOpenNode({ run: o.userData.subtask.run, task: o.userData.subtask.id }); return; }
|
|
1141
1157
|
if (st.view === 'atlas') {
|
|
1142
1158
|
if (el && el.kind === 'run') {
|
|
1143
1159
|
st.sel = { kind: 'run', key: el.data.run.key }; retarget();
|
|
@@ -1219,7 +1235,7 @@ export async function createStage(host, cb = {}) {
|
|
|
1219
1235
|
const span = Math.max(Math.max(...xs) - Math.min(...xs), Math.max(...ys) - Math.min(...ys));
|
|
1220
1236
|
const pad = Math.max(st.mode === 'exec' ? 80 : 40, span * .3);
|
|
1221
1237
|
const opening = st.mode === 'plan' && ids.some(el => el.kind === 'task');
|
|
1222
|
-
const tree = opening && ids.some(el =>
|
|
1238
|
+
const tree = opening && ids.some(el => SUBTASKS.has(el.data && el.data.task && el.data.task.id)) ? hs + 130 : 0; // a subtask tree floats above
|
|
1223
1239
|
E.frameBox([Math.min(...xs) - pad, Math.min(...ys) - pad, 0, Math.max(...xs) + pad, Math.max(...ys) + pad, Math.max(tree, hs * (opening ? 2 : 1.4))], dur, opening ? 52 : 40, dir);
|
|
1224
1240
|
}
|
|
1225
1241
|
|
|
@@ -1421,10 +1437,10 @@ export async function createStage(host, cb = {}) {
|
|
|
1421
1437
|
return c;
|
|
1422
1438
|
},
|
|
1423
1439
|
get cloud() { return cloud; },
|
|
1424
|
-
// a task's
|
|
1425
|
-
|
|
1426
|
-
if (
|
|
1427
|
-
const el = EL.get('t:' + taskId); if (el && el.inner) {
|
|
1440
|
+
// a split task's subtasks (its decomposition nodes, or null), drawn over the task while it is open
|
|
1441
|
+
setSubtasks(taskId, nodes) {
|
|
1442
|
+
if (nodes && nodes.length) SUBTASKS.set(taskId, nodes); else SUBTASKS.delete(taskId);
|
|
1443
|
+
const el = EL.get('t:' + taskId); if (el && el.inner) { syncSubtasks(el); E.invalidate(300); }
|
|
1428
1444
|
},
|
|
1429
1445
|
focus() { E.canvas.focus({ preventScroll: true }); },
|
|
1430
1446
|
// frame again what is shown, in the part of the stage the modules leave free (after a module opens, folds or resizes)
|
|
@@ -1440,6 +1456,11 @@ export async function createStage(host, cb = {}) {
|
|
|
1440
1456
|
return {
|
|
1441
1457
|
view: st.view, mode: st.mode, rebuilds: st.rebuilds, sel: st.sel, prog: [...PROG].map(([id, p]) => [id, p.p, p.t]), fade: !!st.fade,
|
|
1442
1458
|
nodes: [...EL.values()].map(el => ({ id: el.id, kind: el.kind, status: el.status, sel: el.tgt.sel, vis: el.tgt.vis })),
|
|
1459
|
+
parts(taskId) {
|
|
1460
|
+
const prefix = 'p:' + taskId + ':';
|
|
1461
|
+
return [...EL.values()].filter(el => el.kind === 'part' && el.id.startsWith(prefix))
|
|
1462
|
+
.map(el => ({ id: el.id, idx: el.data.idx, maxIdx: el.data.maxIdx, q: el.q, visible: el.root.visible, scaleY: el.cover.scale.y }));
|
|
1463
|
+
},
|
|
1443
1464
|
screenPos(id) { const el = EL.get(id); if (!el) return null; const r = E.canvas.getBoundingClientRect(); const p = E.project(el.n.x + el.n.w / 2, el.n.y + el.n.d / 2, el.n.h); return { x: r.left + p.x, y: r.top + p.y, on: p.on }; },
|
|
1444
1465
|
settle() { for (const el of EL.values()) Object.assign(el.cur, el.tgt); for (const pr of PROG.values()) pr.p = pr.t; E.invalidate(); },
|
|
1445
1466
|
beaconScale: () => ({ unit: BEACONS.unit, ppu: E.pxPerUnit() }),
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
// The same order as forge_decide.profiles. A tier or key the body carries and this list does not still shows, after these.
|
|
99
99
|
const TIERS = ['any', 'low', 'medium', 'high'];
|
|
100
100
|
const POOLS = ['dwarf', 'qa'];
|
|
101
|
-
const ROUTING_ORDER = ['planner', '
|
|
101
|
+
const ROUTING_ORDER = ['planner', 'final_reviewer', 'escalate_after', 'escalate_effort'];
|
|
102
102
|
const POLICY_ORDER = ['qa_threshold', 'retry_failed', 'infra_retries', 'verify_retries', 'timeout', 'explore', 'shadow_rate', 'shadow_qa', 'fast'];
|
|
103
103
|
const BUDGET_PAIRS = [['run', 'run_tokens', 'run_usd'], ['daily', 'daily_tokens', 'daily_usd']];
|
|
104
104
|
const PROFILE_LEVELS = ['user', 'repo', 'builtin'];
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
function breakdown(data) {
|
|
86
86
|
const t = (data && data.totals) || {}, runs = list(data && data.runs);
|
|
87
87
|
const sum = f => runs.reduce((n, r) => n + (Number(f(r)) || 0), 0);
|
|
88
|
-
const bytes = { snapshots: sum(r => r.snapshots), logs: sum(r => (r.logs || 0) + (r.gz || 0)), other: sum(r =>
|
|
88
|
+
const bytes = { snapshots: sum(r => r.snapshots), logs: sum(r => (r.logs || 0) + (r.gz || 0)), other: sum(r => r.other || 0),
|
|
89
89
|
strays: sum(r => r.strays), worktrees: t.worktrees || 0, home: (data && data.data_home && data.data_home.bytes) || 0 };
|
|
90
90
|
const total = Object.values(bytes).reduce((a, b) => a + b, 0);
|
|
91
91
|
return PARTS.map(p => ({ ...p, bytes: bytes[p.key], share: total ? bytes[p.key] / total : 0 }));
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
const add = (g, key, n) => { n = Number(n) || 0; g.parts[key] += n; g.total += n; };
|
|
103
103
|
for (const r of list(data && data.runs)) {
|
|
104
104
|
const g = at(r.repo);
|
|
105
|
-
add(g, 'snapshots', r.snapshots); add(g, 'logs', (r.logs || 0) + (r.gz || 0)); add(g, 'other',
|
|
105
|
+
add(g, 'snapshots', r.snapshots); add(g, 'logs', (r.logs || 0) + (r.gz || 0)); add(g, 'other', r.other); add(g, 'strays', r.strays);
|
|
106
106
|
}
|
|
107
107
|
for (const w of list(data && data.worktrees)) add(at(w.repo), 'worktrees', w.bytes);
|
|
108
108
|
return Array.from(out.values()).filter(g => g.total > 0).sort((a, b) => b.total - a.total);
|
|
@@ -106,11 +106,11 @@
|
|
|
106
106
|
an outdated review, waiting for you */
|
|
107
107
|
.st-merged, .st-pass, .st-accepted, .st-nochanges { --st: var(--lamp-green); --st-lit: var(--lit-green); }
|
|
108
108
|
.st-running, .st-interrupted { --st: var(--lamp-amber); --st-lit: var(--lit-amber); }
|
|
109
|
-
.st-pending, .st-none, .st-unknown, .st-invalidated, .st-outdated { --st: var(--lamp-off); --st-lit: var(--lamp-off); }
|
|
109
|
+
.st-pending, .st-none, .st-unknown, .st-invalidated, .st-outdated, .st-stale { --st: var(--lamp-off); --st-lit: var(--lamp-off); }
|
|
110
110
|
.st-fail, .st-error, .st-conflict, .st-infra, .st-timeout, .st-blocked, .st-bounced, .st-incomplete { --st: var(--lamp-red); --st-lit: var(--lit-red); }
|
|
111
111
|
.st-needs_input, .st-needs_decision, .st-waiting, .st-implemented { --st: var(--lamp-wait); --st-lit: var(--lit-wait); }
|
|
112
112
|
[class^="st-"], [class*=" st-"] { --st-fill: var(--st); --st-ring: var(--lamp-edge); }
|
|
113
|
-
.st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated, .st-needs_input, .st-needs_decision, .st-waiting, .st-implemented { --st-fill: transparent; --st-ring: var(--st); }
|
|
113
|
+
.st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated, .st-stale, .st-needs_input, .st-needs_decision, .st-waiting, .st-implemented { --st-fill: transparent; --st-ring: var(--st); }
|
|
114
114
|
/* verification lanes: flaky passed on a rerun (amber, hollow), known passed with only baseline failures (green, hollow) */
|
|
115
115
|
.st-flaky { --st: var(--lamp-amber); --st-lit: var(--lit-amber); --st-fill: transparent; --st-ring: var(--st); }
|
|
116
116
|
.st-known { --st: var(--lamp-green); --st-lit: var(--lit-green); --st-fill: transparent; --st-ring: var(--st); }
|
|
@@ -579,6 +579,8 @@ dialog.keys-sheet::backdrop { background: light-dark(rgb(17 22 19 / .35), rgb(0
|
|
|
579
579
|
.tasks-switch .sum-msgs { flex-basis: 100%; }
|
|
580
580
|
.tasks-switch .sum-model { display: inline-flex; }
|
|
581
581
|
.tasks-switch .sum-state { font-weight: 600; }
|
|
582
|
+
.tasks-switch .sum-model-form { display: inline-flex; gap: var(--s-1); align-items: center; }
|
|
583
|
+
.tasks-switch .sum-model-form input { width: 14ch; font-family: var(--mono, monospace); }
|
|
582
584
|
body[data-tasks=closed] .tasks-module :is(.run-tasks, .splitter, .dt-tools, .tasks-switch, .run-questions) { display: none; }
|
|
583
585
|
body[data-tasks=closed] .tasks-module .module-head { border-bottom: 0; }
|
|
584
586
|
.run-tasks .dt, .run-tasks .dt-frame, .run-tasks .table-scroll { height: 100%; }
|
|
@@ -608,6 +610,9 @@ body[data-tasks=closed] .tasks-module .module-head { border-bottom: 0; }
|
|
|
608
610
|
.insp-section { margin: var(--s-5) 0 0; }
|
|
609
611
|
.inspector > .insp-section:first-child { margin-top: var(--s-1); }
|
|
610
612
|
.insp-section h3 { margin: 0 0 var(--s-2); }
|
|
613
|
+
.handoff-notes { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
|
|
614
|
+
.handoff-notes li { margin: 0 0 var(--s-2); }
|
|
615
|
+
.handoff-notes li > div { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
611
616
|
.fields { display: grid; grid-template-columns: minmax(96px, 128px) minmax(0, 1fr); gap: 5px var(--s-4); margin: 0 0 var(--s-3); font-size: var(--t-sm); }
|
|
612
617
|
dt { color: var(--muted); }
|
|
613
618
|
dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; font-variant-numeric: tabular-nums; }
|
|
@@ -750,11 +755,10 @@ a.check-cmd { color: var(--ink); text-underline-offset: 2px; }
|
|
|
750
755
|
.ph-snapshot { background: var(--ph-3); }
|
|
751
756
|
.ph-verification { background: var(--ph-4); }
|
|
752
757
|
.ph-finalization { background: var(--ph-2); }
|
|
753
|
-
.
|
|
758
|
+
.node-tree { list-style: none; margin: var(--s-2) 0; padding: 0; display: grid; gap: 3px; }
|
|
754
759
|
.ft-node { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: var(--t-sm); }
|
|
755
760
|
.ft-node > a { font-family: var(--mono); font-weight: 600; }
|
|
756
761
|
.ft-node > .diff-link.small { margin-left: auto; }
|
|
757
|
-
.ft-node.reserved > a { font-weight: 400; color: var(--muted); }
|
|
758
762
|
.ft-node .muted { font-size: var(--t-xs); }
|
|
759
763
|
.ft-d1 { padding-left: 16px; } .ft-d2 { padding-left: 32px; } .ft-d3 { padding-left: 48px; } .ft-d4 { padding-left: 64px; } .ft-d5 { padding-left: 80px; } .ft-d6 { padding-left: 96px; }
|
|
760
764
|
.ft-node:not(.ft-d0) { border-left: 1px solid var(--rule-2); margin-left: 4px; }
|
|
@@ -766,7 +770,7 @@ p.ui-outcome { display: flex; align-items: flex-start; gap: 7px; margin: 6px 0 0
|
|
|
766
770
|
/* an inline confirm: a strip with Confirm and Cancel keys, its lamp the route lamp (red for a destructive change) */
|
|
767
771
|
.ui-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: var(--s-2) 0 0; padding: 6px var(--s-2); border: 1px solid var(--route); border-radius: var(--r-key); background: var(--key); }
|
|
768
772
|
.ui-confirm.danger { border-color: var(--lamp-red); }
|
|
769
|
-
.ui-confirm-text { flex: 1 1 14em; min-width: 0; font-size: var(--t-sm); overflow-wrap: anywhere; }
|
|
773
|
+
.ui-confirm-text { flex: 1 1 14em; min-width: 0; font-size: var(--t-sm); overflow-wrap: anywhere; white-space: pre-line; }
|
|
770
774
|
.ui-confirm button { min-height: 28px; }
|
|
771
775
|
button.ui-danger { background: var(--lamp-red); border-color: var(--lamp-red); color: light-dark(#fff, #111613); }
|
|
772
776
|
button.ui-danger:hover:not(:disabled) { background: var(--lamp-red); color: light-dark(#fff, #111613); opacity: .9; }
|
|
@@ -796,6 +800,13 @@ p.ctl-why::before { content: ''; width: 7px; height: 7px; border-radius: 50%; ba
|
|
|
796
800
|
.ctl-set button, .ctl-pin > button { min-height: 28px; }
|
|
797
801
|
.ctl-set button[aria-pressed=true] { background: var(--key); box-shadow: inset 0 0 0 1px var(--rule-2); color: var(--muted); }
|
|
798
802
|
.ctl-pin-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
|
|
803
|
+
/* models per difficulty (#169) and what a spec runs */
|
|
804
|
+
.ctl-tiers { margin-top: var(--s-1); }
|
|
805
|
+
.ctl-tier-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
|
|
806
|
+
.ctl-role { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
|
|
807
|
+
.ctl-spec { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
|
|
808
|
+
.ctl-model { overflow-wrap: anywhere; }
|
|
809
|
+
.ctl-resolved { overflow-wrap: anywhere; }
|
|
799
810
|
p.ctl-stop { display: flex; align-items: center; gap: 7px; margin: 0; padding: 4px var(--s-2); border-radius: var(--r-small); background: var(--warn-wash); color: var(--warn-ink); font-weight: 600; }
|
|
800
811
|
.ctl-log { margin-top: var(--s-1); }
|
|
801
812
|
/* the run's keys (drain, resume, stop), its drained or stopping state, pauses and a queued retry's answer */
|
|
@@ -825,6 +836,12 @@ p.ctl-request-refused { color: var(--warn-ink); font-weight: 600; }
|
|
|
825
836
|
.sum-bank { justify-self: start; flex-wrap: wrap; max-width: 100%; }
|
|
826
837
|
p.sum-note { margin: 0; font-size: var(--t-xs); }
|
|
827
838
|
.sum-msgs:empty { display: none; }
|
|
839
|
+
.steer-waiting { list-style: none; margin: 0 0 var(--s-1); padding: 0; display: grid; gap: var(--s-1); }
|
|
840
|
+
.steer-waiting .steer-text { white-space: pre-wrap; margin: 0; }
|
|
841
|
+
.steer-box { display: grid; gap: var(--s-1); }
|
|
842
|
+
.steer-box textarea { width: 100%; box-sizing: border-box; font: inherit; }
|
|
843
|
+
.steer-box button { justify-self: start; }
|
|
844
|
+
.tag.steered { margin-left: var(--s-1); }
|
|
828
845
|
/* the one-sentence column: one line, cut off at the cell's edge */
|
|
829
846
|
.sum-col { max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
830
847
|
/* who decided an escalation, on the line that reports it */
|
|
@@ -1495,7 +1512,7 @@ table.wt-grid { width: max-content; min-width: 100%; }
|
|
|
1495
1512
|
.prj-findings td { white-space: nowrap; }
|
|
1496
1513
|
.prj-findings td.prj-wide { white-space: normal; min-width: 26em; }
|
|
1497
1514
|
.prj-summary { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 46em; }
|
|
1498
|
-
.prj-learning { display: inline-block; max-width: 48em; }
|
|
1515
|
+
.prj-learning { display: inline-block; max-width: 48em; white-space: normal; }
|
|
1499
1516
|
.prj-actions { margin-top: var(--s-2); }
|
|
1500
1517
|
.prj-actions .fnd-picked { min-width: 8em; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
|
|
1501
1518
|
.prj-findings td:first-child input[type=checkbox] { margin: 0; }
|
|
@@ -89,8 +89,12 @@
|
|
|
89
89
|
// One sentence for the dry run: how many would go, then each skip (and any failure) with its reason.
|
|
90
90
|
function summaryText(answer) {
|
|
91
91
|
const rows = answerRows(answer);
|
|
92
|
-
const
|
|
93
|
-
|
|
92
|
+
const going = rows.filter(r => r.status === 'would-remove'), n = going.length;
|
|
93
|
+
const branches = going.filter(r => r.action === 'remove+branch').length, folders = going.filter(r => r.action === 'delete-folder').length;
|
|
94
|
+
const plural = (count, one, many) => count + ' ' + (count === 1 ? one : many);
|
|
95
|
+
const extra = [branches && plural(branches, 'merged branch deleted', 'merged branches deleted'),
|
|
96
|
+
folders && plural(folders, 'leftover folder deleted', 'leftover folders deleted')].filter(Boolean);
|
|
97
|
+
let text = plural(n, 'worktree', 'worktrees') + ' would be removed' + (extra.length ? ' (' + extra.join(', ') + ')' : '') + '.';
|
|
94
98
|
const skipped = rows.filter(r => r.status === 'skipped');
|
|
95
99
|
const failed = rows.filter(r => r.status === 'failed');
|
|
96
100
|
if (skipped.length) text += ' Skipped: ' + skipped.map(rowBit).join('; ') + '.';
|
|
@@ -113,7 +117,7 @@
|
|
|
113
117
|
if (line.status === 'failed') return 'failed' + reason;
|
|
114
118
|
return (line.status || '') + reason;
|
|
115
119
|
}
|
|
116
|
-
const confirmQuestion = n => 'Remove ' + n + ' worktrees?';
|
|
120
|
+
const confirmQuestion = n => n === 1 ? 'Remove 1 worktree?' : 'Remove ' + n + ' worktrees?';
|
|
117
121
|
|
|
118
122
|
/* ---------- DOM ---------- */
|
|
119
123
|
function render(host, ctx) {
|
|
@@ -467,5 +471,5 @@
|
|
|
467
471
|
};
|
|
468
472
|
}
|
|
469
473
|
|
|
470
|
-
return { render, filterRows, totals, humanBytes, repoName, shortPath, label, removable, blockReason, selectable, summaryText, resultLines, STATUSES, LABEL };
|
|
474
|
+
return { render, filterRows, totals, humanBytes, repoName, shortPath, label, removable, blockReason, selectable, summaryText, confirmQuestion, resultLines, STATUSES, LABEL };
|
|
471
475
|
});
|
|
@@ -359,6 +359,12 @@ def parse_claude(text, session_file=False):
|
|
|
359
359
|
done.pop('running', None)
|
|
360
360
|
_answered(done, lines.end, t)
|
|
361
361
|
_put(done, 'output', _payload(block.get('content'))[0], OUTPUT_CAP)
|
|
362
|
+
elif kind == 'user' and message and value.get('isReplay'):
|
|
363
|
+
# Live steering (#252): the CLI replays each user message where it took it in. The first, before the
|
|
364
|
+
# model did anything, is the prompt; every later one is a message the user sent while it ran.
|
|
365
|
+
said = ' '.join(b.get('text', '') for b in _blocks(message.get('content')) if b.get('type') == 'text').strip()
|
|
366
|
+
if said and any(ev['kind'] in ('message', 'reasoning', 'command', 'edit', 'tool', 'result') for ev in events):
|
|
367
|
+
events.append(_event('steer', text=said, t=t))
|
|
362
368
|
elif kind == 'user' and message:
|
|
363
369
|
for block in _blocks(message.get('content')):
|
|
364
370
|
bt = block.get('type')
|
package/ui/forge_ui/worktrees.py
CHANGED
|
@@ -221,7 +221,7 @@ def _runs(catalog):
|
|
|
221
221
|
continue
|
|
222
222
|
read = reader._Read(run['path'])
|
|
223
223
|
try:
|
|
224
|
-
live = reader.
|
|
224
|
+
live = reader.run_live(read)
|
|
225
225
|
except Exception:
|
|
226
226
|
live = False
|
|
227
227
|
tasks = {t['id']: t['status'] for t in run.get('task_statuses') or [] if t.get('id')}
|
|
@@ -229,6 +229,18 @@ def _runs(catalog):
|
|
|
229
229
|
out.append(dict(key=run['key'], path=run['path'], run_id=run['run_id'], repo=run['repo'],
|
|
230
230
|
root=run.get('repo_root') or run['repo'], tasks=tasks, live=live,
|
|
231
231
|
integration=read.exists('accepted.integration') or read.exists('integration.base')))
|
|
232
|
+
# The subtasks of a split task (#153) are a plan of their own under it, with its own run id, branches
|
|
233
|
+
# and worktree folder. It is not a listed run, and its worktrees are forge's all the same.
|
|
234
|
+
for sub in reader.sub_plans(run['path']):
|
|
235
|
+
below = reader._Read(sub)
|
|
236
|
+
run_id = below.line('run_id')
|
|
237
|
+
if not run_id:
|
|
238
|
+
continue
|
|
239
|
+
states = {t['id']: t['status'] for t in reader._tasks(below)}
|
|
240
|
+
out.append(dict(key=reader.run_key(sub), path=str(below.path), run_id=run_id, repo=run['repo'],
|
|
241
|
+
root=run.get('repo_root') or run['repo'], tasks=states,
|
|
242
|
+
live=live or any(s == 'RUNNING' for s in states.values()),
|
|
243
|
+
integration=below.exists('integration.base')))
|
|
232
244
|
return out
|
|
233
245
|
|
|
234
246
|
|
package/docs/fractal.md
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
# Fractal execution
|
|
2
|
-
|
|
3
|
-
[← README](../README.md) · [All docs](README.md)
|
|
4
|
-
|
|
5
|
-
Fractal is an optional implementation backend for both solo and decomposed runs. It uses
|
|
6
|
-
the existing Forge dispatcher for Codex, Claude, OpenClaude, OpenCode and Antigravity.
|
|
7
|
-
Each work step gets a fresh model invocation; preserved files and child results provide
|
|
8
|
-
continuity when a parent resumes. Independent QA reviews the complete Forge task diff.
|
|
9
|
-
|
|
10
|
-
`--decompose-level` plans top-level Forge tasks before execution. `--fractal` lets an
|
|
11
|
-
implementer request nested children during execution. They can be used together, and
|
|
12
|
-
solo runs can use Fractal without a top-level decomposition.
|
|
13
|
-
|
|
14
|
-
## Install the optional runtime
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
forge fractal install --dry-run
|
|
18
|
-
forge fractal install --yes --with-prerequisites
|
|
19
|
-
forge fractal doctor --spec sol --spec opus --json
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
The managed runtime pins **Fractal 1.2.0** at revision
|
|
23
|
-
`18793200c0d7e8cdb2db369ea3abe5647a1e15e4`, checks the source archive checksum,
|
|
24
|
-
and includes the required `wiki` executable. It prefers an existing Python 3.12–3.14;
|
|
25
|
-
with prerequisite installation selected, it can provision uv, Python 3.13 and tmux.
|
|
26
|
-
tmux installation uses an existing Homebrew on macOS or apt on Debian/Ubuntu.
|
|
27
|
-
The [installation reference](../references/fractal.md#installation-and-provenance) covers
|
|
28
|
-
consent, supported bootstrap platforms, provenance and failure diagnostics.
|
|
29
|
-
|
|
30
|
-
Installation never enables Fractal for a run, adds no command and leaves your shell startup
|
|
31
|
-
files alone.
|
|
32
|
-
Doctor checks the runtime and advertised harness capabilities without calling a provider.
|
|
33
|
-
|
|
34
|
-
## Start and inspect a run
|
|
35
|
-
|
|
36
|
-
Through the skill:
|
|
37
|
-
|
|
38
|
-
```text
|
|
39
|
-
/forge "add retry with exponential backoff to the HTTP client" --dwarf sol:high --fractal
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Or prepare a solo run directory outside the product repository and invoke the runner:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
FORGE_RUN="$HOME/.local/state/forge/examples/http-client"
|
|
46
|
-
mkdir -p "$FORGE_RUN"
|
|
47
|
-
printf '%s\n' 'Add bounded exponential backoff to the HTTP client and run its tests.' > "$FORGE_RUN/prompt.md"
|
|
48
|
-
bash scripts/forge-solo.sh "$FORGE_RUN" --repo /absolute/path/to/product \
|
|
49
|
-
--dwarf sol:high --qa opus --fractal --fractal-concurrency 3
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Choose a new run directory for unrelated work. Backend selection, routing pools and limits
|
|
53
|
-
are stored with the run; resume and explicit retry retain them. For a prepared, approved
|
|
54
|
-
decomposed plan, select the backend on `run`:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
bash scripts/forge-parallel.sh run /absolute/path/to/plan --fractal --dry-run
|
|
58
|
-
bash scripts/forge-parallel.sh run /absolute/path/to/plan --fractal
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Dry runs show resolved model pools, limits and proposed workspaces without installation
|
|
62
|
-
or provider calls. When a selected runtime is unavailable, interactive runs offer
|
|
63
|
-
installation; unattended runs return an actionable error instead of changing backends.
|
|
64
|
-
|
|
65
|
-
Discover the managed run ID, then inspect it from another terminal:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
forge fractal runs --repo /absolute/path/to/product --json
|
|
69
|
-
forge fractal open # live runs index
|
|
70
|
-
forge fractal status RUN_ID --json
|
|
71
|
-
forge fractal tree RUN_ID --json
|
|
72
|
-
forge fractal logs RUN_ID --follow
|
|
73
|
-
forge fractal report RUN_ID --html /absolute/path/to/report.html
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
`RUN_ID` is the `run-…` identifier returned by `runs`, not the solo directory or plan name.
|
|
77
|
-
The [run inspector](../references/fractal-dashboard.md) opens on progress and problems, then lets
|
|
78
|
-
readers inspect task QA/history or node decisions, logs and changes. It refreshes about every
|
|
79
|
-
two seconds without replacing the workspace; search, selection, focus and scrolling remain in
|
|
80
|
-
place. “Pause live updates” affects the browser only. Browser access is read-only, bound to
|
|
81
|
-
`127.0.0.1` with an ephemeral access token. Closing its server does not stop execution.
|
|
82
|
-
Portable HTML embeds complete captured history and logs, works offline and needs no Fractal
|
|
83
|
-
runtime to read.
|
|
84
|
-
|
|
85
|
-
## Automatic recursive decomposition
|
|
86
|
-
|
|
87
|
-
`--fractal` permits workers to request children. To require a planning decision before
|
|
88
|
-
every eligible node implements, use `--fractal-auto-decompose`:
|
|
89
|
-
|
|
90
|
-
```text
|
|
91
|
-
/forge "<goal>" --dwarf luna:high --qa sol:high --fractal-auto-decompose --fractal-planner sol:xhigh --fractal-depth 3 --fractal-nodes 24
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
After the top-level Forge approval, the planner automatically splits useful work or
|
|
95
|
-
records why it is atomic. Children repeat this decision within the approved ownership
|
|
96
|
-
and frozen limits. `--fractal-planner` selects a separate decision model; when omitted,
|
|
97
|
-
Forge reuses the configured top-level planner, then the task's initial root model.
|
|
98
|
-
Decisions use disposable snapshots, persist for resume, and appear in tree/status/HTML
|
|
99
|
-
reports. Ordinary `--fractal` and existing runs retain their current behavior. Start a
|
|
100
|
-
new run to change policy or planner. See the [full decision contract](../references/fractal.md#automatic-decomposition-decisions).
|
|
101
|
-
|
|
102
|
-
## Bounds, recovery and acceptance
|
|
103
|
-
|
|
104
|
-
Defaults per Forge task are two nesting levels below implementation, three unsettled
|
|
105
|
-
direct children per node, twelve lifetime nodes, six iterations per node per attempt,
|
|
106
|
-
and a 45-minute attempt deadline excluding explicit pauses. Three model slots are shared
|
|
107
|
-
across the whole Forge run, including QA. `--max-parallel` bounds top-level task pipelines;
|
|
108
|
-
`--fractal-concurrency` bounds model invocations across their nested trees.
|
|
109
|
-
|
|
110
|
-
Child difficulty selects a frozen `--dwarf-low`, `--dwarf-medium` or `--dwarf-high` pool,
|
|
111
|
-
falling back to the configured general dwarf, then the parent. Dependencies and owned
|
|
112
|
-
paths constrain admission; overlapping ownership is serialized. Fractal never implies
|
|
113
|
-
`--yolo-dwarf`. Costs are observational; unavailable usage stays unknown and dollar-cap
|
|
114
|
-
requests are rejected.
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
forge fractal pause RUN_ID
|
|
118
|
-
forge fractal resume RUN_ID
|
|
119
|
-
forge fractal stop RUN_ID
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Pause and stop preserve work and diagnostics. Run-level resume recovers recorded execution
|
|
123
|
-
and the Forge pipeline without repeating accepted stages. Use explicit runner retry for
|
|
124
|
-
a new attempt, retaining work and the original Forge QA baseline. Controls also accept
|
|
125
|
-
`--task TASK_ID` and `--task TASK_ID --node NODE_ID`; those IDs come from `tree` output.
|
|
126
|
-
|
|
127
|
-
Managed data lives in `${XDG_STATE_HOME:-$HOME/.local/state}/forge/fractal/`. Solo execution
|
|
128
|
-
uses an isolated snapshot and imports changes only after checking source drift, preserving
|
|
129
|
-
staging and leaving changes uncommitted. Decomposed candidates return to Forge's existing
|
|
130
|
-
review/integration pipeline. **Fractal completion is not Forge acceptance**: QA, repository
|
|
131
|
-
verification and authorization to update the user's branch remain distinct.
|
|
132
|
-
|
|
133
|
-
See the [full Fractal reference](../references/fractal.md) for limits, child requests and
|
|
134
|
-
recovery details, and [verification evidence](../tests/fractal-verification.md) for the tested
|
|
135
|
-
platforms and browser checks. No paid-provider or speed/cost claim follows from fake-CLI tests.
|
|
136
|
-
|
|
137
|
-
## `forge fractal` command group
|
|
138
|
-
|
|
139
|
-
Run it as `forge fractal`, or `forge fractal` from a git checkout.
|
|
140
|
-
This group manages Fractal runs; it does not replace the `/forge` skill or runner scripts.
|
|
141
|
-
|
|
142
|
-
| Command | Purpose |
|
|
143
|
-
| --- | --- |
|
|
144
|
-
| `install [--dry-run] [--yes] [--with-prerequisites]` | preview or install the isolated pinned runtime |
|
|
145
|
-
| `doctor [--spec SPEC] [--json]` | check runtime/hooks/tmux and optional repeated harness specs without provider calls |
|
|
146
|
-
| `runs [--repo DIR] [--json] [--html PATH]` | discover managed runs, optionally filtered by repository |
|
|
147
|
-
| `status\|tree\|activity RUN_ID` | inspect progress, hierarchy and history |
|
|
148
|
-
| `logs\|costs\|messages\|config RUN_ID` | inspect diagnostics, observed accounting, radio traffic and effective settings |
|
|
149
|
-
| `pause\|resume\|stop RUN_ID` | request a control and record its observed state |
|
|
150
|
-
| `open [RUN_ID] [--port PORT]` | open the read-only live dashboard or runs index |
|
|
151
|
-
| `report RUN_ID [--html PATH]` | capture a self-contained HTML report; default filename is `RUN_ID.html` |
|
|
152
|
-
|
|
153
|
-
Inspection commands accept `--task TASK_ID`, `--node NODE_ID`, `--json`, `--html PATH`,
|
|
154
|
-
`--offset N` and `--limit N` (1–1000). They currently return a common JSON run projection;
|
|
155
|
-
the command names do not imply separate output schemas. `logs --follow` follows changes.
|
|
156
|
-
HTML exports capture full history and logs. Controls require an explicit run ID, and a
|
|
157
|
-
node control also requires its task ID; they never guess the latest run. Use each command's
|
|
158
|
-
`--help` for its accepted options. Installation is also available through
|
|
159
|
-
`bash scripts/forge-install-fractal.sh`.
|
|
160
|
-
|
|
161
|
-
Fractal adds a managed workspace alongside the runner artifacts described here:
|
|
162
|
-
|
|
163
|
-
```text
|
|
164
|
-
${XDG_STATE_HOME:-$HOME/.local/state}/forge/fractal/
|
|
165
|
-
runtime/ isolated pinned Fractal and wiki environment
|
|
166
|
-
provenance.json installed versions and source checksum
|
|
167
|
-
installs/ installation attempts and diagnostics
|
|
168
|
-
runs/<run-id>/run.json effective routing, limits and runner binding
|
|
169
|
-
runs/<run-id>/controls/ requested controls and observed results
|
|
170
|
-
runs/<run-id>/tasks/<task-id>/
|
|
171
|
-
request.json / state.json task request and execution checkpoint
|
|
172
|
-
initialization.json control repository and Fractal ledger provenance
|
|
173
|
-
control/ Fractal metadata, separate from product changes
|
|
174
|
-
nodes/<node-id>/product/ isolated product candidate
|
|
175
|
-
nodes/<node-id>/steps/ fresh dispatcher attempts and raw logs
|
|
176
|
-
outcome.json captured Forge acceptance and verification
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
The original solo/plan directory stores `fractal-selection.json`; decomposed plans also
|
|
180
|
-
store `fractal-routing.json`. Prefer `forge fractal runs`, `tree`, `logs` and `report`
|
|
181
|
-
to direct ledger access. Inspection and stop never delete managed work.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Forge run inspector: approved design brief
|
|
2
|
-
|
|
3
|
-
The dashboard and portable HTML report inspect one Fractal run at a time. The interface is dark-only, code-first and read-only. Fractal execution, Forge acceptance, verification and QA remain separate statuses; execution completion does not imply acceptance.
|
|
4
|
-
|
|
5
|
-
## Workspace
|
|
6
|
-
|
|
7
|
-
- A compact header identifies the run. The left pane holds searchable task and node rows with goal excerpts, status, model and parent/child nesting. Search retains ancestors of matching nodes.
|
|
8
|
-
- The right pane opens on the run overview, with progress and problems first. Task views are Summary, QA and History. Node views are Overview, Decomposition, Logs and Changes. Configuration and copyable terminal commands are secondary run views.
|
|
9
|
-
- Decomposition decisions show decision, reason, phase, planner, attempts, bounds and admitted children as fields. Logs are selected by step and file. Candidate changes are shown as line-oriented diffs, and raw text can be downloaded.
|
|
10
|
-
- Run, task, node and view live in the URL. The runs index is reachable even when the server was launched with a run ID. Browser Back and Forward restore selection.
|
|
11
|
-
- At narrow widths, the navigator and details become separate screens with an explicit back action. Keyboard focus is visible and status uses text as well as color. Reduced motion is respected.
|
|
12
|
-
|
|
13
|
-
## Refresh and data
|
|
14
|
-
|
|
15
|
-
Progress is requested about every two seconds. The page keeps its header, navigator, detail pane, selected item, tab, search, expanded rows, focus and scroll positions mounted while fields and rows reconcile by stable identifiers. It does not refocus a control during a refresh. A resource has at most one request in flight; late replies from a previous navigation are ignored.
|
|
16
|
-
|
|
17
|
-
The last successful view stays visible if a request fails. The status says stale/reconnecting and offers Retry. “Pause live updates” stops browser polling and is distinct from pausing run execution. Log follow starts off, turns off when the reader scrolls away, and can be restored with “Jump to latest.”
|
|
18
|
-
|
|
19
|
-
The live `data` endpoint supports `scope=progress`, `scope=runs`, and `scope=artifact` with a selected task and optional node. Artifacts are `task`, `node`, `qa`, `history`, `logs` and `changes`; history also takes `table=events|steps|messages` and a zero-based `offset`. An unscoped `data` request retains the original full projection for compatibility. Heavy files and ledger pages are fetched only for the selected view. The CLI capture schema and commands remain available.
|
|
20
|
-
|
|
21
|
-
The Python renderer inlines the separate CSS and JavaScript assets into each report. Portable reports retain the complete captured history and logs, escape artifact text and open from `file:` without network access. The loopback host check, ephemeral token, read-only HTTP surface and managed-file boundary remain in force. No execution engine, run-state schema or browser execution control is part of this design.
|