@giamme/forge 0.13.0 → 0.14.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/SKILL.md +17 -11
  3. package/VERSION +1 -1
  4. package/docs/artifacts.md +1 -0
  5. package/docs/commands.md +121 -7
  6. package/docs/development.md +3 -0
  7. package/docs/forge-ui.md +7 -1
  8. package/docs/reviews.md +2 -0
  9. package/docs/troubleshooting.md +5 -1
  10. package/forge +28 -1
  11. package/package.json +1 -1
  12. package/references/dataset.md +3 -1
  13. package/references/decision-models.md +5 -1
  14. package/references/decompose.md +199 -61
  15. package/references/runtime.md +29 -0
  16. package/references/ui.md +10 -0
  17. package/scripts/forge-compare.py +491 -0
  18. package/scripts/forge-config.py +3 -3
  19. package/scripts/forge-contract.py +34 -8
  20. package/scripts/forge-control.py +105 -13
  21. package/scripts/forge-dispatch.sh +9 -5
  22. package/scripts/forge-jev-options.sh +17 -4
  23. package/scripts/forge-ledger.py +387 -0
  24. package/scripts/forge-lib-plans.sh +16 -2
  25. package/scripts/forge-lib-task.sh +390 -28
  26. package/scripts/forge-parallel-options.sh +20 -4
  27. package/scripts/forge-parallel.sh +118 -12
  28. package/scripts/forge-plan-check.py +68 -3
  29. package/scripts/forge-pr.py +276 -0
  30. package/scripts/forge-route.py +350 -34
  31. package/scripts/forge-runs.py +18 -1
  32. package/scripts/forge-runtime.py +23 -7
  33. package/scripts/forge-schedule.py +303 -46
  34. package/scripts/forge-solo.sh +1 -0
  35. package/scripts/forge-ui-options.sh +25 -0
  36. package/scripts/forge-verify-failed.py +111 -0
  37. package/scripts/forge-watch.py +372 -0
  38. package/scripts/forge_dataset/export.py +87 -41
  39. package/scripts/forge_dataset/harvest.py +3 -1
  40. package/scripts/forge_decide/budget.py +39 -8
  41. package/scripts/forge_decide/doctor.py +49 -0
  42. package/scripts/forge_fractal/cli.py +23 -6
  43. package/scripts/forge_infra.py +274 -0
  44. package/scripts/forge_jev/client.py +13 -9
  45. package/ui/docs/api.md +83 -15
  46. package/ui/forge_ui/control.py +11 -3
  47. package/ui/forge_ui/export.py +6 -2
  48. package/ui/forge_ui/models.py +16 -16
  49. package/ui/forge_ui/reader.py +217 -13
  50. package/ui/forge_ui/repos.py +428 -0
  51. package/ui/forge_ui/static/app.js +24 -5
  52. package/ui/forge_ui/static/checksview.js +20 -7
  53. package/ui/forge_ui/static/cloudmodel.js +8 -5
  54. package/ui/forge_ui/static/controls.js +6 -3
  55. package/ui/forge_ui/static/modelstats.js +12 -8
  56. package/ui/forge_ui/static/panel.js +69 -4
  57. package/ui/forge_ui/static/runmodel.js +55 -10
  58. package/ui/forge_ui/static/scene3d.js +3 -2
  59. package/ui/forge_ui/static/settings.js +147 -29
  60. package/ui/forge_ui/static/style.css +49 -7
@@ -42,7 +42,7 @@
42
42
  --lamp-green: light-dark(#1d7a39, #5bd57d);
43
43
  --lamp-amber: light-dark(#9c6c00, #f4c443);
44
44
  --lamp-red: light-dark(#bf3127, #ff5f53);
45
- --lamp-wait: light-dark(#0b7285, #5fd0e4); /* waiting for you (NEEDS_INPUT): stopped, not failed */
45
+ --lamp-wait: light-dark(#0b7285, #5fd0e4); /* waiting for you (NEEDS_INPUT, NEEDS_DECISION): stopped, not failed */
46
46
  --lamp-edge: light-dark(rgb(0 0 0 / .18), rgb(0 0 0 / .4));
47
47
  /* the same lamps lit on the 3D plate: on a pale panel a lit lamp is saturated, not darkened for text */
48
48
  --lit-green: light-dark(#2fae55, #5bd57d);
@@ -93,16 +93,16 @@
93
93
  :root[data-theme=dark] { color-scheme: dark; }
94
94
 
95
95
  /* status: the lamp behind each forge state. One meaning each (--st; --st-lit on the 3D plate): four lamps, and the
96
- waiting lamp for a task that waits for the user (NEEDS_INPUT, and an integration that only waits for answers).
96
+ waiting lamp for a task that waits for the user (NEEDS_INPUT, NEEDS_DECISION, and an integration that only waits for the user).
97
97
  A hollow lamp is that lamp's family but not its plain case: passed without a merge, stopped, failed outside the code,
98
98
  an outdated review, waiting for you */
99
99
  .st-merged, .st-pass, .st-accepted, .st-nochanges { --st: var(--lamp-green); --st-lit: var(--lit-green); }
100
100
  .st-running, .st-interrupted { --st: var(--lamp-amber); --st-lit: var(--lit-amber); }
101
101
  .st-pending, .st-none, .st-unknown, .st-invalidated, .st-outdated { --st: var(--lamp-off); --st-lit: var(--lamp-off); }
102
102
  .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); }
103
- .st-needs_input, .st-waiting { --st: var(--lamp-wait); --st-lit: var(--lit-wait); }
103
+ .st-needs_input, .st-needs_decision, .st-waiting { --st: var(--lamp-wait); --st-lit: var(--lit-wait); }
104
104
  [class^="st-"], [class*=" st-"] { --st-fill: var(--st); --st-ring: var(--lamp-edge); }
105
- .st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated, .st-needs_input, .st-waiting { --st-fill: transparent; --st-ring: var(--st); }
105
+ .st-accepted, .st-nochanges, .st-interrupted, .st-infra, .st-timeout, .st-blocked, .st-outdated, .st-needs_input, .st-needs_decision, .st-waiting { --st-fill: transparent; --st-ring: var(--st); }
106
106
  /* verification lanes: flaky passed on a rerun (amber, hollow), known passed with only baseline failures (green, hollow) */
107
107
  .st-flaky { --st: var(--lamp-amber); --st-lit: var(--lit-amber); --st-fill: transparent; --st-ring: var(--st); }
108
108
  .st-known { --st: var(--lamp-green); --st-lit: var(--lit-green); --st-fill: transparent; --st-ring: var(--st); }
@@ -307,6 +307,13 @@ body.resizing.rows { cursor: row-resize; }
307
307
  .run-sub { display: flex; gap: var(--s-2); align-items: baseline; font-size: var(--t-xs); color: var(--muted); min-width: 0; white-space: nowrap; }
308
308
  .run-sub .mono { font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
309
309
  .run-sub .repo { color: var(--ink-2); font-weight: 600; flex: none; }
310
+ /* the repository name and, for a worktree run, its checkout: the name never gives way; the worktree's leaf truncates first, its branch keeps its place */
311
+ .repo-line { display: inline-flex; align-items: baseline; max-width: 100%; min-width: 0; overflow: hidden; vertical-align: baseline; }
312
+ .repo-line > .repo { flex: none; }
313
+ .run-sub .repo-line { flex: 0 1 auto; }
314
+ .repo-wt { display: flex; align-items: baseline; min-width: 0; color: var(--muted); font-weight: 400; white-space: nowrap; }
315
+ .repo-leaf { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; } /* shrinks far more than the branch, which only gives way once the leaf is gone */
316
+ .repo-branch { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
310
317
  .run-sub .updated { margin-left: auto; flex: none; }
311
318
  .run-item .chips { margin-top: 3px; }
312
319
  .run-item .chip { font-size: .786rem; padding: 0 5px 0 4px; }
@@ -500,11 +507,15 @@ dialog.keys-sheet::backdrop { background: light-dark(rgb(17 22 19 / .35), rgb(0
500
507
  .run-title-row { display: flex; align-items: center; gap: 6px var(--s-3); min-width: 0; }
501
508
  .run-title-row > .lamp { margin-right: -4px; }
502
509
  .run-title-row > h2 { flex: 1 1 auto; min-width: 14ch; margin: 0; font-size: var(--t-md); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
503
- .run-where { flex: none; white-space: nowrap; color: var(--muted); font-size: var(--t-sm); } /* the id is copied: only the goal gives way */
510
+ .run-where { flex: 0 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 0 var(--s-2); white-space: nowrap; color: var(--muted); font-size: var(--t-sm); } /* the id is copied: only the goal and the worktree give way */
511
+ .run-where > .mono { flex: none; }
504
512
  .run-where .repo { font-weight: 600; color: var(--ink-2); }
513
+ .run-where > .repo { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
514
+ .run-where .repo-wt { max-width: 36ch; } /* a long worktree name must not take the goal's room */
505
515
  .run-title-row > .describer { flex: none; }
506
516
  @container (max-width: 860px) {
507
517
  .run-title-row { flex-wrap: wrap; } .run-title-row > h2 { flex-basis: calc(100% - 24px); }
518
+ .run-title-row > .run-where { flex: 0 1 auto; min-width: 0; max-width: 100%; } /* on its own line, the repository and its worktree give way before the id */
508
519
  .run-title-row > .describer { flex: 0 1 auto; max-width: 100%; flex-wrap: wrap; white-space: normal; row-gap: 2px; }
509
520
  }
510
521
  .run-actions { display: flex; gap: 6px; flex: none; margin-left: auto; }
@@ -572,6 +583,12 @@ ul.plain li.current { font-weight: 650; }
572
583
  pre.cmd { max-height: none; }
573
584
  .waiting-cmd { display: flex; align-items: flex-start; gap: var(--s-2); }
574
585
  .waiting-cmd pre { flex: 1; min-width: 0; }
586
+ /* a task that waits for a decision (panel.js decisionSection): its reasons as the heading, and its review ledger */
587
+ .insp-section h3.decision-reasons { white-space: normal; }
588
+ .ledger-wrap { overflow-x: auto; margin: var(--s-2) 0; }
589
+ .ledger th, .ledger td { padding: var(--s-1) var(--s-2) var(--s-1) 0; }
590
+ .ledger td.num { font-variant-numeric: tabular-nums; }
591
+ .ledger tr.failed td:first-child { box-shadow: inset 3px 0 0 var(--lamp-red); }
575
592
  /* the verification inspector (verifyview.js): live state, failing tests, lanes and their logs */
576
593
  .vfy-num { font-variant-numeric: tabular-nums; }
577
594
  .vfy-live { margin: var(--s-3) 0 0; padding: var(--s-3); border-radius: var(--r-key); background: var(--module-2); box-shadow: inset 0 0 0 1px var(--rule); }
@@ -632,6 +649,7 @@ pre.cmd { max-height: none; }
632
649
  .now-live .vfy-idle { margin: 0; }
633
650
  .now-live .vfy-idle[hidden] { display: none; }
634
651
  .now-split summary { cursor: pointer; font-size: var(--t-xs); color: var(--muted); }
652
+ .pause-needs { display: block; flex-basis: 100%; } /* a pause's "needs you" line stands on its own */
635
653
  .checks-of { margin: 0 0 6px 2px; padding-left: 10px; border-left: 1px solid var(--rule-2); }
636
654
  .checks { gap: 2px; margin: 2px 0; }
637
655
  /* a check: its lamp, kind and command on one line, what it printed under them */
@@ -1328,7 +1346,31 @@ dialog.del-dialog::backdrop { background: light-dark(rgb(17 22 19 / .35), rgb(0
1328
1346
  .set-head { display: flex; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
1329
1347
  .set-lede { margin: 0; font-size: var(--t-sm); }
1330
1348
  .set-picker-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); }
1331
- .set-picker select { min-width: 22em; max-width: 100%; }
1349
+ /* the run picker: a button drawn as a field, and its listbox of runs grouped by repository */
1350
+ button.set-run { justify-content: flex-start; align-items: baseline; gap: var(--s-2); min-width: 22em; max-width: 100%; padding: 6px 28px 6px 10px;
1351
+ border-color: var(--rule-2); box-shadow: none; text-align: left;
1352
+ font-family: inherit; font-weight: 400; font-size: inherit; letter-spacing: normal; text-transform: none; line-height: 1.3; }
1353
+ /* the select's drawn chevron, also on hover: the base button:hover sets the whole background */
1354
+ button.set-run, button.set-run:hover:not(:disabled) { background-color: var(--field);
1355
+ background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
1356
+ background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
1357
+ button.set-run:hover:not(:disabled) { border-color: var(--ink-2); }
1358
+ button.set-run:active:not(:disabled) { scale: 1; }
1359
+ button.set-run[aria-expanded=true] { border-color: var(--route); }
1360
+ .set-run-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1361
+ .set-run .repo-wt, .set-run-opt .repo-wt { flex: none; font-size: var(--t-sm); }
1362
+ .set-run-pop { margin: 0; inset: auto; position: fixed; max-width: min(640px, calc(100vw - 16px)); max-height: min(60vh, 480px); overflow: auto; padding: 6px;
1363
+ border: 1px solid var(--rule); border-radius: var(--r-module); background: var(--module); color: var(--ink); box-shadow: var(--ply-2); }
1364
+ .set-run-list { display: grid; gap: 2px; outline: none; }
1365
+ .set-run-group { display: grid; gap: 1px; }
1366
+ .set-run-group + .set-run-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--rule); }
1367
+ .set-run-group-name { display: flex; align-items: baseline; gap: var(--s-2); min-width: 0; padding: 4px 10px 2px; font-size: var(--t-xs); }
1368
+ .set-run-group-name .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1369
+ .set-run-opt { position: relative; display: flex; align-items: baseline; gap: var(--s-2); min-height: 36px; padding: 9px 10px 9px 14px; border-radius: var(--r-key); cursor: pointer; }
1370
+ .set-run-opt[aria-selected=true]::before { content: ''; position: absolute; left: 4px; top: 9px; bottom: 9px; width: 2px; border-radius: 1px; background: var(--route); }
1371
+ .set-run-opt[aria-selected=true] .set-run-label { font-weight: 650; }
1372
+ .set-run-opt.is-active { background: var(--wash); box-shadow: inset 0 0 0 1px var(--rule-2); }
1373
+ .set-run-list:focus-visible .set-run-opt.is-active { box-shadow: inset 0 0 0 2px var(--route); }
1332
1374
  .set-field { display: inline-flex; align-items: center; }
1333
1375
  .set-repo-path, .set-why, .set-state-line, .set-file-status { display: flex; align-items: flex-start; gap: 7px; margin: var(--s-2) 0 0; font-size: var(--t-sm); overflow-wrap: anywhere; }
1334
1376
  .set-repo-path .lamp, .set-why .lamp, .set-state-line .lamp, .set-file-status .lamp { margin-top: .42em; }
@@ -1348,7 +1390,7 @@ button.set-switch { gap: 8px; padding: 0 10px 0 4px; }
1348
1390
  .set-switch-knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--key); box-shadow: 0 0 0 1px var(--lamp-edge); transition: translate var(--relay); }
1349
1391
  button.set-switch[aria-checked=true] .set-switch-knob { background: var(--lamp-green); }
1350
1392
  button.set-switch[aria-checked=true] .set-switch-knob::after { translate: 12px 0; }
1351
- button.set-switch:focus-visible, .set-editor:focus-visible, .set-picker select:focus-visible, .set-gate select:focus-visible, .set-gate input:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
1393
+ button.set-switch:focus-visible, .set-editor:focus-visible, button.set-run:focus-visible, .set-gate select:focus-visible, .set-gate input:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
1352
1394
  .set-file { display: grid; gap: var(--s-2); width: 100%; padding: var(--s-3); border: 1px solid var(--rule); border-radius: var(--r-key); background: var(--module-2); }
1353
1395
  .set-file > * { margin-block: 0; }
1354
1396
  .set-file-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }