fwdloop 0.28.0 → 0.30.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/README.md +1 -1
- package/bin/fwdloop +27 -5
- package/package.json +3 -3
- package/src/added-end.js +60 -0
- package/src/ask.js +1 -1
- package/src/audit-fold.js +9 -1
- package/src/authoring.js +18 -7
- package/src/checked.js +14 -9
- package/src/checkpick.js +318 -0
- package/src/checkwords.js +29 -0
- package/src/citedcheck.js +14 -0
- package/src/closers.js +40 -3
- package/src/declaration.js +102 -5
- package/src/draft-steps.js +3 -3
- package/src/drafter.js +151 -38
- package/src/jobkey.js +3 -1
- package/src/learn.js +1 -1
- package/src/learnstore.js +6 -6
- package/src/memo.js +120 -0
- package/src/model-step.js +103 -25
- package/src/pageask.js +12 -6
- package/src/pagedropwords.js +9 -0
- package/src/panel/author.js +33 -10
- package/src/panel/authorcard.js +59 -6
- package/src/panel/data.js +16 -10
- package/src/panel/index.html +151 -59
- package/src/panel/result.js +28 -7
- package/src/panel/server.js +2 -1
- package/src/pickrecord.js +146 -0
- package/src/plain-checks.js +16 -3
- package/src/provider.js +4 -1
- package/src/repairs.js +38 -0
- package/src/runfile.js +4 -2
- package/src/runner.js +129 -40
- package/src/send.js +71 -4
- package/src/setup.js +13 -1
- package/src/sheetblock.js +2 -1
- package/src/ticket-draft.js +2 -2
- package/src/ticket-labels.js +2 -2
- package/src/try-checks.js +13 -3
- package/src/whole-job.js +71 -0
- package/types/added-end.d.ts +62 -0
- package/types/ask.d.ts +2 -1
- package/types/audit-fold.d.ts +13 -2
- package/types/authoring.d.ts +6 -2
- package/types/checked.d.ts +7 -2
- package/types/checkpick.d.ts +183 -0
- package/types/checkwords.d.ts +18 -0
- package/types/citedcheck.d.ts +6 -0
- package/types/closers.d.ts +6 -3
- package/types/declaration.d.ts +12 -0
- package/types/drafter.d.ts +28 -25
- package/types/learn.d.ts +1 -0
- package/types/learnstore.d.ts +2 -3
- package/types/memo.d.ts +15 -0
- package/types/model-step.d.ts +23 -3
- package/types/pageask.d.ts +9 -2
- package/types/pagedropwords.d.ts +1 -0
- package/types/panel/author.d.ts +1 -1
- package/types/panel/authorcard.d.ts +41 -0
- package/types/panel/data.d.ts +1 -1
- package/types/panel/jobgrid.d.ts +1 -1
- package/types/panel/result.d.ts +9 -3
- package/types/pickrecord.d.ts +88 -0
- package/types/plain-checks.d.ts +9 -1
- package/types/repairs.d.ts +13 -0
- package/types/runfile.d.ts +7 -2
- package/types/runner.d.ts +16 -5
- package/types/send.d.ts +10 -2
- package/types/setup.d.ts +1 -56
- package/types/try-checks.d.ts +1 -7
- package/types/whole-job.d.ts +70 -0
- package/src/attemptdiff.js +0 -118
- package/types/attemptdiff.d.ts +0 -38
package/src/panel/index.html
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
--cap-j:#6b7396; --cap-j-bg:#2a2f45; --cap-j-ink:#c0caf5;
|
|
37
37
|
--cap-r:#2b8a7e; --cap-r-bg:#17332f; --cap-r-ink:#8fdccf;
|
|
38
38
|
--req:#c9a85f;
|
|
39
|
-
--accent:#7aa2f7;
|
|
39
|
+
--accent:#7aa2f7; --search-tint:var(--panel2);
|
|
40
40
|
--btn-bg:#1f2335; --btn-text:#c0caf5;
|
|
41
41
|
--field-bg:var(--bg); --field-soft-bg:var(--bg); --field-border:var(--text-dim);
|
|
42
42
|
--primary-bg:#7aa2f7; --primary-text:#1a1b26; --primary-border:#7aa2f7;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
--cap-s:#2a4fa8; --cap-s-bg:#cfdaf3; --cap-s-ink:#1d3a80;
|
|
83
83
|
--cap-j:#5b6680; --cap-j-bg:#c7cddb; --cap-j-ink:#333c52;
|
|
84
84
|
--cap-r:#2b8a7e; --cap-r-bg:#cdeee8; --cap-r-ink:#14524a; --req:#8a6d2a;
|
|
85
|
-
--accent:#2668c2;
|
|
85
|
+
--accent:#2668c2; --search-tint:#f5f7fc;
|
|
86
86
|
--btn-bg:#e9e9ed; --btn-text:#3760bf;
|
|
87
87
|
--field-bg:#ffffff; --field-soft-bg:#f7f7f9;
|
|
88
88
|
--primary-bg:#2668c2; --primary-text:#e1e2e7; --primary-border:#2668c2;
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
--cap-s:#2a4fa8; --cap-s-bg:#cfdaf3; --cap-s-ink:#1d3a80;
|
|
102
102
|
--cap-j:#5b6680; --cap-j-bg:#c7cddb; --cap-j-ink:#333c52;
|
|
103
103
|
--cap-r:#2b8a7e; --cap-r-bg:#cdeee8; --cap-r-ink:#14524a; --req:#8a6d2a;
|
|
104
|
-
--accent:#2668c2;
|
|
104
|
+
--accent:#2668c2; --search-tint:#f5f7fc;
|
|
105
105
|
--btn-bg:#e9e9ed; --btn-text:#3760bf;
|
|
106
106
|
--field-bg:#ffffff; --field-soft-bg:#f7f7f9;
|
|
107
107
|
--primary-bg:#2668c2; --primary-text:#e1e2e7; --primary-border:#2668c2;
|
|
@@ -226,6 +226,7 @@
|
|
|
226
226
|
.badge.cyan{color:var(--cyan);}
|
|
227
227
|
|
|
228
228
|
.hint{font-size:11px;color:var(--text-faint);margin-top:4px;}
|
|
229
|
+
.hint.jf-added{margin-top:2px;overflow-wrap:anywhere;}
|
|
229
230
|
.hint.money-red{color:var(--red);}
|
|
230
231
|
.btn{padding:8px 14px;min-height:44px;border:1px solid var(--border-strong);background:var(--panel2);color:var(--text);white-space:nowrap;flex:none;position:relative;}
|
|
231
232
|
.btn::before{content:"[ ";color:var(--text-faint);}
|
|
@@ -236,7 +237,7 @@
|
|
|
236
237
|
/* M4b piece 4: the answer doors. Shape/placement from bareloop's mockup Run-tab
|
|
237
238
|
action bar (a row of `.btn`s with a hint line under it), redo is ours. */
|
|
238
239
|
.answer-doors{margin-top:12px;padding-top:8px;border-top:1px solid var(--border);}
|
|
239
|
-
.answer-doors label{display:block;font-size:
|
|
240
|
+
.answer-doors label{display:block;font-size:12px;font-weight:700;color:var(--accent);text-transform:uppercase;letter-spacing:0.04em;margin-bottom:3px;}
|
|
240
241
|
.answer-doors textarea{display:block;width:100%;max-width:100%;box-sizing:border-box;min-height:64px;padding:6px 8px;font:inherit;color:var(--text);background:var(--bg);border:1px solid var(--border-strong);resize:vertical;}
|
|
241
242
|
.answer-doors .actions-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
|
|
242
243
|
.answer-doors .btn{min-width:44px;}
|
|
@@ -306,6 +307,13 @@
|
|
|
306
307
|
.rl-pill-need{border-color:var(--accent);color:var(--accent);}
|
|
307
308
|
.rl-dash{border-top:1px dashed var(--border-strong);margin:10px 0 6px;}
|
|
308
309
|
#panel-runs .rl-faint{margin-bottom:4px;}
|
|
310
|
+
/* Runs tab: the search block is a light card (V1), hamr 2026-11-03 */
|
|
311
|
+
#panel-runs .rl-dash{border:0;margin:12px 0 0;}
|
|
312
|
+
#panel-runs .rl-faint[data-testid="rl-filter-note"]{color:var(--accent);font-weight:700;font-size:12px;letter-spacing:.02em;background:var(--search-tint);padding:8px 10px 6px;margin-bottom:0;border-radius:6px 6px 0 0;}
|
|
313
|
+
#panel-runs .rl-faint[data-testid="rl-filter-note"]::before{content:"SEARCH ";letter-spacing:.08em;}
|
|
314
|
+
#runs-filterbar-anchor{background:var(--search-tint);padding:4px 10px 10px;margin-bottom:12px;border-radius:0 0 6px 6px;}
|
|
315
|
+
#runs-filterbar-anchor input[type="search"],#runs-filterbar-anchor input[type="text"]{border:1px solid var(--accent) !important;background:var(--bg,#fff);font-size:14px;padding:8px 10px;}
|
|
316
|
+
#runs-filterbar-anchor input:focus{outline:2px solid var(--accent);outline-offset:1px;}
|
|
309
317
|
@media (max-width:899px){ .rl-fold{min-height:44px;} }
|
|
310
318
|
|
|
311
319
|
.rp-header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:2px solid var(--border-strong);background:var(--panel);flex-wrap:wrap;gap:8px;}
|
|
@@ -344,11 +352,12 @@
|
|
|
344
352
|
.ended-block.amber,.ended-block.expired,.ended-block.stuck{border-color:var(--amber);}
|
|
345
353
|
.ended-row{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;margin-bottom:6px;}
|
|
346
354
|
.ended-row:last-child{margin-bottom:0;}
|
|
347
|
-
|
|
355
|
+
/* hamr 2026-11-02: Run tab ended/next/schedule and Result tab captions accent bold; Run summary/map +1px */
|
|
356
|
+
.ended-label{color:var(--accent);font-weight:700;font-size:11px;letter-spacing:0.08em;min-width:84px;}
|
|
348
357
|
.ended-text{flex:1 1 220px;min-width:0;overflow-wrap:anywhere;}
|
|
349
358
|
/* M9 am24: a NEXT with several instructions is one per line, label muted, instructions in a second column (shape: bareloop 8cad363, with labels in the muted colour) */
|
|
350
359
|
.next-rows{display:grid;grid-template-columns:max-content minmax(0,1fr);column-gap:10px;row-gap:2px;}
|
|
351
|
-
.next-label{color:var(--
|
|
360
|
+
.next-label{color:var(--accent);font-weight:700;}
|
|
352
361
|
.next-text{min-width:0;overflow-wrap:anywhere;}
|
|
353
362
|
.audit-sched-start{padding:6px 10px;margin-bottom:8px;border:1px solid var(--border-strong);background:var(--panel2);font-size:12px;overflow-wrap:anywhere;}
|
|
354
363
|
.when-sub{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px;}
|
|
@@ -360,10 +369,11 @@
|
|
|
360
369
|
.summary-box.grey,.summary-box.stopped,.summary-box.skipped{border-color:var(--grey-dot);}
|
|
361
370
|
.summary-box.amber,.summary-box.expired,.summary-box.stuck{border-color:var(--amber);}
|
|
362
371
|
.summary-box.magenta{border-color:var(--magenta);}
|
|
363
|
-
.summary-box::before{content:"┤ SUMMARY ├";position:absolute;top:-10px;left:10px;background:var(--panel2);padding:0 6px;font-size:
|
|
372
|
+
.summary-box::before{content:"┤ SUMMARY ├";position:absolute;top:-10px;left:10px;background:var(--panel2);padding:0 6px;font-size:12px;font-weight:700;color:var(--accent);letter-spacing:0.08em;}
|
|
364
373
|
.summary-headline{font-weight:700;margin-bottom:8px;font-size:13px;}
|
|
365
374
|
.summary-row{display:flex;gap:0;padding:2px 0;}
|
|
366
|
-
|
|
375
|
+
/* hamr 2026-11-02: Run summary captions blue, same size */
|
|
376
|
+
.sum-label{flex:none;width:66px;color:var(--accent);font-weight:700;}
|
|
367
377
|
.sum-val{color:var(--text);}
|
|
368
378
|
.summary-box .num{color:var(--accent);font-weight:700;}
|
|
369
379
|
|
|
@@ -371,7 +381,7 @@
|
|
|
371
381
|
wrapping; a name is never cut. A box + its trailing arrow are ONE unit (the arrow never wraps alone); the lead arrow
|
|
372
382
|
of a wrapped line hangs in the container's left padding (absolute, zero layout impact — toggling it moves nothing). */
|
|
373
383
|
.map-box{border:1px solid var(--border-strong);padding:10px;margin-top:16px;margin-bottom:14px;background:var(--panel2);}
|
|
374
|
-
.map-box::before{content:"┤ MAP ├";display:block;font-size:
|
|
384
|
+
.map-box::before{content:"┤ MAP ├";display:block;font-size:12px;font-weight:700;color:var(--accent);letter-spacing:0.08em;margin:-2px 0 8px 0;}
|
|
375
385
|
.map-chips{display:flex;flex-wrap:wrap;gap:8px 4px;align-items:flex-start;padding-left:1.4em;}
|
|
376
386
|
.map-item{position:relative;display:inline-flex;align-items:center;gap:4px;max-width:100%;}
|
|
377
387
|
.map-arrow{color:var(--text-dim);font-size:13px;flex:none;}
|
|
@@ -500,7 +510,7 @@
|
|
|
500
510
|
.audit-tally{color:var(--text-dim);margin:2px 0 4px;}
|
|
501
511
|
.audit-try{margin:4px 0 2px;overflow-wrap:anywhere;}
|
|
502
512
|
.audit-judged{color:var(--text-faint);}
|
|
503
|
-
.audit-fold-label{color:var(--
|
|
513
|
+
.audit-fold-label{color:var(--accent);text-transform:uppercase;font-size:10px;letter-spacing:.05em;margin-top:8px;}
|
|
504
514
|
.audit-fold-body table.rounds-table{width:100%;border-collapse:collapse;margin-top:4px;}
|
|
505
515
|
.audit-fold-body table.rounds-table th{position:sticky;top:0;z-index:1;}
|
|
506
516
|
.audit-fold-body table.rounds-table tr.trysep td{border-top:1px solid var(--border-strong);}
|
|
@@ -526,14 +536,14 @@
|
|
|
526
536
|
.fold-list{margin-top:10px;}
|
|
527
537
|
.fgrid .cell.fail[aria-expanded="true"]{outline:2px solid var(--red);outline-offset:1px;}
|
|
528
538
|
.fx-errors{margin:8px 0 4px;min-width:0;}
|
|
529
|
-
.fx-label{font-size:11px;color:var(--
|
|
539
|
+
.fx-label{font-size:11px;color:var(--accent);text-transform:uppercase;letter-spacing:0.06em;margin-bottom:2px;}
|
|
530
540
|
.fx-row{min-width:0;}
|
|
531
541
|
.fx-rowhead{display:flex;align-items:baseline;gap:8px;width:100%;min-width:0;min-height:32px;padding:3px 4px;border:0;background:none;color:var(--text);font:inherit;font-size:12px;text-align:left;}
|
|
532
542
|
button.fx-rowhead{cursor:pointer;}
|
|
533
543
|
button.fx-rowhead:hover{background:var(--panel2);}
|
|
534
544
|
button.fx-rowhead:focus-visible,.fx-more:focus-visible,.cell.fail:focus-visible{outline:2px solid var(--red);outline-offset:1px;}
|
|
535
545
|
.fx-caret{flex:none;width:12px;color:var(--text-faint);}
|
|
536
|
-
.fx-try{flex:none;font-weight:700;}
|
|
546
|
+
.fx-try{flex:none;font-weight:700;color:var(--accent);}
|
|
537
547
|
.fx-chk{flex:none;white-space:nowrap;}
|
|
538
548
|
.fx-first{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-dim);}
|
|
539
549
|
.fx-faint,.fx-count{color:var(--text-faint);}
|
|
@@ -550,6 +560,8 @@
|
|
|
550
560
|
.btn.hints:focus-visible{outline:2px solid var(--accent);outline-offset:1px;}
|
|
551
561
|
.cell.none{color:var(--text-faint);cursor:default;font-weight:400;}
|
|
552
562
|
tr.hint-row td{color:var(--text-faint);}
|
|
563
|
+
tr.hint-row td.q{color:var(--accent);}
|
|
564
|
+
.audit-group th{color:var(--accent);}
|
|
553
565
|
.fx-row.hintrow.open>.fx-rowhead{background:var(--panel2);}
|
|
554
566
|
.fx-row.hintrow .fx-body{border-left-color:var(--accent);background:var(--panel2);}
|
|
555
567
|
.fx-row.hintrow .fx-try{flex:1 1 auto;min-width:0;overflow-wrap:anywhere;}
|
|
@@ -598,6 +610,7 @@
|
|
|
598
610
|
#result-body .tg-stats{font-size:13px;margin:0 0 8px;overflow-wrap:anywhere;}
|
|
599
611
|
table.grid.tg td.r,table.grid.tg th.r{position:sticky;left:0;background:var(--panel2);z-index:1;min-width:84px;white-space:nowrap;}
|
|
600
612
|
table.grid.tg td.c{min-width:84px;}
|
|
613
|
+
table.grid.tg th{color:var(--accent);font-weight:700;}
|
|
601
614
|
.tg-rowname{display:flex;align-items:center;max-width:min(240px,60vw);}
|
|
602
615
|
table.grid.tg button.tg-name{flex:0 1 auto;min-width:0;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;border:0;background:none;padding:0;min-height:32px;font:inherit;font-size:12px;font-weight:700;color:var(--accent);cursor:pointer;}
|
|
603
616
|
table.grid.tg button.tg-name:hover{text-decoration:underline;}
|
|
@@ -626,12 +639,13 @@
|
|
|
626
639
|
/* M10 am4 item 8 (bareloop never looked on a phone): a long saved-file name wraps inside its button instead of pushing it past the screen */
|
|
627
640
|
#result-body .btn{max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;}
|
|
628
641
|
.field{margin-bottom:10px;}
|
|
629
|
-
|
|
642
|
+
/* hamr 2026-11-02: captions on every page 1px bigger, bold, accent (Chat card keeps its pills) */
|
|
643
|
+
label{display:block;font-size:12px;font-weight:700;color:var(--accent);margin-bottom:2px;text-transform:uppercase;letter-spacing:0.04em;}
|
|
630
644
|
/* hamr's 2026-09-27 exit-check review #3: Ask tab box headers — same
|
|
631
645
|
bold/uppercase weight `label` already gives the Job tab's own fields,
|
|
632
646
|
applied to "draft under review" and each unjudged input's own label
|
|
633
647
|
("resume-text"/"jd-text" etc.), never the faint `.hint` style. */
|
|
634
|
-
.evidence-heading{font-size:
|
|
648
|
+
.evidence-heading{font-size:12px;font-weight:700;color:var(--accent);margin:8px 0 3px;text-transform:uppercase;letter-spacing:0.04em;}
|
|
635
649
|
.evidence-heading:first-child{margin-top:0;}
|
|
636
650
|
/* review #3: the ask's own question, a real heading under the "step ·
|
|
637
651
|
draft N · asked · status" meta line — reuses the box-drawing h4 look
|
|
@@ -679,8 +693,8 @@
|
|
|
679
693
|
@media (max-width:400px){.job-card .radio-row{padding-right:76px;}}
|
|
680
694
|
.cap-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;margin-bottom:6px;}
|
|
681
695
|
.cap-field label{display:block;font-size:11px;font-weight:700;color:var(--text-dim);margin-bottom:1px;}
|
|
682
|
-
/* hamr 2026-11-
|
|
683
|
-
#chat-job-card .field > label:not(.jf-thinking),#chat-job-card .cap-field > label
|
|
696
|
+
/* hamr 2026-11-02 picked variant C: the Chat card's field captions are pill captions (accent text on a tinted pill), no left bar; `required` is small and grey */
|
|
697
|
+
#chat-job-card .field > label:not(.jf-thinking),#chat-job-card .cap-field > label{font-size:13px;font-weight:700;color:var(--accent);text-transform:none;letter-spacing:0;margin:8px 0 6px;padding:2px 8px;border-radius:999px;background:color-mix(in srgb,var(--accent) 16%,transparent);display:inline-block;}
|
|
684
698
|
#chat-job-card .req{font-size:11px;font-weight:400;color:var(--req);margin-left:8px;}
|
|
685
699
|
.cap-field input{width:100%;padding:5px 6px;box-sizing:border-box;}
|
|
686
700
|
.btn.primary{background:var(--primary-bg);color:var(--primary-text);border-color:var(--primary-border);font-weight:700;}
|
|
@@ -780,7 +794,6 @@
|
|
|
780
794
|
.ro-lines{padding:6px 8px;border:1px solid var(--border);background:var(--bg);color:var(--text-dim);font-size:12px;overflow-wrap:anywhere;overflow-y:auto;}
|
|
781
795
|
.ro-lines .ro-line{display:flex;gap:8px;}
|
|
782
796
|
.ro-lines .ro-n{flex:none;min-width:1.4em;color:var(--text-faint);}
|
|
783
|
-
.jf-waitrow{margin-bottom:4px;}
|
|
784
797
|
.jf-err{font-size:11px;color:var(--red);margin-top:2px;overflow-wrap:anywhere;}
|
|
785
798
|
.jf-err:empty{display:none;}
|
|
786
799
|
.dest-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:6px;}
|
|
@@ -892,7 +905,7 @@
|
|
|
892
905
|
.settings-header h2::after{content:" ├";color:var(--text-faint);}
|
|
893
906
|
.money-strip{display:grid;grid-template-columns:repeat(3, 1fr);gap:12px;align-items:end;padding:10px;border:1px solid var(--border-strong);background:var(--panel2);}
|
|
894
907
|
.money-item{min-width:0;}
|
|
895
|
-
.money-item label{display:block;font-size:
|
|
908
|
+
.money-item label{display:block;font-size:12px;font-weight:700;color:var(--accent);margin-bottom:2px;}
|
|
896
909
|
.money-value{font-size:16px;font-weight:700;padding:6px 0;overflow-wrap:anywhere;}
|
|
897
910
|
.money-item input{width:100%;height:44px;box-sizing:border-box;}
|
|
898
911
|
.keyfile-strip{position:relative;border:1px solid var(--border-strong);padding:12px 12px 8px;background:var(--panel2);margin:14px 0;font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
|
|
@@ -921,7 +934,7 @@
|
|
|
921
934
|
.pv-fold{border:0;background:none;color:var(--text);font:inherit;padding:0 4px 0 0;min-width:22px;min-height:24px;cursor:pointer;text-align:left;}
|
|
922
935
|
.pv-krow select,.pv-krow input[type=text]{width:100%;max-width:100%;min-height:28px;box-sizing:border-box;}
|
|
923
936
|
.pv-grid select,.pv-grid input[type=text]{font-size:12px;height:28px;padding:2px 6px;}
|
|
924
|
-
.pv-legacy{display:inline-flex;align-items:center;gap:6px;cursor:pointer;min-height:28px;text-transform:none;letter-spacing:0;font-weight:400;font-size:12px;}
|
|
937
|
+
.pv-legacy{display:inline-flex;align-items:center;gap:6px;cursor:pointer;min-height:28px;color:var(--text-dim);text-transform:none;letter-spacing:0;font-weight:400;font-size:12px;}
|
|
925
938
|
.pv-legacy input,.pv-m-use input{width:16px;height:16px;margin:0;accent-color:var(--accent);cursor:pointer;}
|
|
926
939
|
.pv-tok{text-align:right;font-variant-numeric:tabular-nums;}
|
|
927
940
|
.pv-refcell{display:flex;justify-content:flex-end;}
|
|
@@ -960,7 +973,7 @@
|
|
|
960
973
|
.pv-typed{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:4px;}
|
|
961
974
|
.pv-typed input{flex:1 1 160px;min-width:0;max-width:260px;min-height:28px;box-sizing:border-box;}
|
|
962
975
|
.pv-typed .hint{flex:1 1 100%;margin:0;}
|
|
963
|
-
.field label.jf-thinking{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:6px;margin-top:6px;font-size:12px;text-transform:none;letter-spacing:0;}
|
|
976
|
+
.field label.jf-thinking{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:6px;margin-top:6px;font-size:12px;color:var(--text-dim);text-transform:none;letter-spacing:0;}
|
|
964
977
|
.field label.jf-thinking input{width:auto;min-height:0;margin:0;}
|
|
965
978
|
.hint.bad{color:var(--red);}
|
|
966
979
|
.table-wrap{overflow-x:auto;border:1px solid var(--border-strong);background:var(--panel2);max-width:100%;}
|
|
@@ -1175,7 +1188,9 @@
|
|
|
1175
1188
|
<div class="jf-gut" id="jf-job-gut" data-testid="jf-job-gut" aria-hidden="true"><div class="jf-gut-in"></div></div>
|
|
1176
1189
|
<textarea class="jf-wrap" id="jf-job" rows="6" data-testid="jf-job" autocomplete="off" spellcheck="false" placeholder="Read my resume ~keep it under 600 words Ask: check it with me Write it out"></textarea>
|
|
1177
1190
|
</div>
|
|
1178
|
-
<div class="hint"
|
|
1191
|
+
<div class="hint jf-added" id="jf-added-ask" data-testid="jf-added-ask" hidden></div>
|
|
1192
|
+
<div class="hint jf-added" id="jf-added-write" data-testid="jf-added-write" hidden></div>
|
|
1193
|
+
<div class="hint">One step per line. A line starting with <code>~</code> is a guardrail of the step above it. <code>Ask:</code> stops for you; <code>Ask 2h:</code> sets that ask's own wait. fwdloop adds the last check and the write to your Destination.</div>
|
|
1179
1194
|
<div class="jf-err" id="jf-err-job" data-testid="jf-err-job"></div>
|
|
1180
1195
|
</div>
|
|
1181
1196
|
<div class="field">
|
|
@@ -1217,9 +1232,9 @@
|
|
|
1217
1232
|
<div class="jf-err" id="jf-err-schedule" data-testid="jf-err-schedule"></div>
|
|
1218
1233
|
</div>
|
|
1219
1234
|
<div class="field">
|
|
1220
|
-
<label for="jf-dest-folder">Destination</label>
|
|
1235
|
+
<label for="jf-dest-folder">Destination <span class="req" id="jf-req-destination" data-testid="jf-req-destination">required</span></label>
|
|
1221
1236
|
<input id="jf-dest-folder" type="text" placeholder="/full/path/to/a/folder" autocomplete="off" spellcheck="false" data-testid="jf-dest-folder">
|
|
1222
|
-
<div class="hint">Where the accepted result is placed, at the last step
|
|
1237
|
+
<div class="hint">Where the accepted result is placed, at the last step.</div>
|
|
1223
1238
|
<div class="jf-err" id="jf-err-destination" data-testid="jf-err-destination"></div>
|
|
1224
1239
|
</div>
|
|
1225
1240
|
<div class="cap-row" data-testid="cap-row">
|
|
@@ -1326,11 +1341,14 @@
|
|
|
1326
1341
|
<div class="hint" id="jf-run-left" data-testid="jf-run-left"></div>
|
|
1327
1342
|
<div class="jf-err" id="jf-err-run-capUsd" data-testid="jf-err-run-capUsd"></div>
|
|
1328
1343
|
</div>
|
|
1329
|
-
<div class="cap-field" id="jf-run-waits" data-testid="jf-run-waits"
|
|
1344
|
+
<div class="cap-field" id="jf-run-waits" data-testid="jf-run-waits" hidden>
|
|
1345
|
+
<label for="jf-run-wait">Ask wait</label>
|
|
1346
|
+
<input id="jf-run-wait" class="jf-wait" type="text" placeholder="e.g. 30m" autocomplete="off" spellcheck="false" data-testid="jf-run-wait">
|
|
1347
|
+
</div>
|
|
1330
1348
|
</div>
|
|
1331
1349
|
<div class="jf-err" id="jf-err-run-askWaits" data-testid="jf-err-run-askWaits"></div>
|
|
1332
1350
|
<div class="hint" id="jf-run-sign-hint" data-testid="jf-run-sign-hint">A different destination, cap or ask wait is signed for this run only: two clicks. The flow's own values never change.</div>
|
|
1333
|
-
<div class="field">
|
|
1351
|
+
<div class="field" id="jf-run-id-field" data-testid="jf-run-id-field">
|
|
1334
1352
|
<label for="jf-run-id">Run id</label>
|
|
1335
1353
|
<input id="jf-run-id" type="text" autocomplete="off" spellcheck="false" data-testid="jf-run-id">
|
|
1336
1354
|
<div class="jf-err" id="jf-err-runId" data-testid="jf-err-runId"></div>
|
|
@@ -2772,6 +2790,14 @@
|
|
|
2772
2790
|
return resultField("Page read", '<div class="ro-value" data-testid="' + testid + '" style="overflow-wrap:anywhere"><a href="' + escapeXml(url) +
|
|
2773
2791
|
'" target="_blank" rel="noopener noreferrer">' + escapeXml(url) + '</a><div class="hint" data-testid="result-page-note">' + escapeXml(note || "") + '</div></div>');
|
|
2774
2792
|
}
|
|
2793
|
+
// M15 item 5: the sent file(s), at the top: a link that opens the file, or the server's words (gone / changed) in its place. A run that sent nothing draws nothing.
|
|
2794
|
+
function resultFileLinks(data){
|
|
2795
|
+
return (data.delivered || []).map(function(d){
|
|
2796
|
+
return resultField("Saved", d.words ? '<div class="rs-warn" data-testid="result-file-top-gone">' + escapeXml(d.name) + ' \u2014 ' + escapeXml(d.words) + '</div>'
|
|
2797
|
+
: '<div class="ro-value" data-testid="result-file-top" style="overflow-wrap:anywhere"><a href="/api/runs/' + encodeURIComponent(data.flow) + '/' + encodeURIComponent(data.runId) +
|
|
2798
|
+
'/download?i=' + d.i + '&view=1" target="_blank" rel="noopener noreferrer">' + escapeXml(d.name) + '</a></div>');
|
|
2799
|
+
}).join("");
|
|
2800
|
+
}
|
|
2775
2801
|
// `own` = the Result tab read 2+ pages, so this line's box shows its own page
|
|
2776
2802
|
function resultLineCard(line, own, note){
|
|
2777
2803
|
return '<div class="job-card" data-testid="result-line"><h4>Line ' + escapeXml(String(line.n)) + '</h4>' + resultLineBox(line) +
|
|
@@ -2913,7 +2939,7 @@
|
|
|
2913
2939
|
' \u00b7 ' + escapeXml(detail.checkType) + ' \u00b7 ' + escapeXml(detail.flow + " (" + detail.runId + ")") + '</div>') +
|
|
2914
2940
|
'<div class="field-row">' + resultField("Money", '<div class="ro-value" data-testid="result-counters">' + escapeXml(counters[0] || "") + '</div>') +
|
|
2915
2941
|
resultField("Time", '<div class="ro-value">' + escapeXml((counters[1] || "").replace(/^took /, "")) + '</div>') + '</div>' +
|
|
2916
|
-
((data.pages || []).length === 1 ? resultPageLink(data.pages[0], data.pageNote, "result-page-top") : "") + '</div>';
|
|
2942
|
+
((data.pages || []).length === 1 ? resultPageLink(data.pages[0], data.pageNote, "result-page-top") : "") + resultFileLinks(data) + '</div>';
|
|
2917
2943
|
var ownPages = (data.pages || []).length >= 2;
|
|
2918
2944
|
(data.lines || []).forEach(function(line){ h += resultLineCard(line, ownPages, data.pageNote); });
|
|
2919
2945
|
if(data.gap){
|
|
@@ -3660,7 +3686,7 @@
|
|
|
3660
3686
|
function gridTryOf(t){
|
|
3661
3687
|
var out = {
|
|
3662
3688
|
n: t.n, glyph: t.mark, hint: t.thinking || "", noVerdict: null, known: Array.isArray(t.checks) && t.checks.length > 0, inflight: t.mark === "·",
|
|
3663
|
-
cells: {}, order: [], output: t.output || null, hints: t.hints && t.hints.text ? t.hints : null, red: null
|
|
3689
|
+
cells: {}, order: [], output: t.output || null, hints: t.hints && t.hints.text ? t.hints : null, memo: t.memo && t.memo.text ? t.memo : null, red: null
|
|
3664
3690
|
};
|
|
3665
3691
|
if(out.known){
|
|
3666
3692
|
t.checks.forEach(function(c){
|
|
@@ -3719,6 +3745,13 @@
|
|
|
3719
3745
|
return open;
|
|
3720
3746
|
}
|
|
3721
3747
|
function gridHintsWord(h){ return h.n + (h.n === 1 ? " hint" : " hints"); }
|
|
3748
|
+
// M14 item 7: the memo button's word is the memo's line count (the words "line" and "lines" are the page's own, as in "+N more lines")
|
|
3749
|
+
function gridMemoLines(m){
|
|
3750
|
+
var lines = String(m.text).split("\n");
|
|
3751
|
+
while(lines.length && lines[lines.length - 1].trim() === "") lines.pop();
|
|
3752
|
+
return lines;
|
|
3753
|
+
}
|
|
3754
|
+
function gridMemoWord(m){ var n = gridMemoLines(m).length; return n + (n === 1 ? " line" : " lines"); }
|
|
3722
3755
|
function gridTableHtml(pid, model){
|
|
3723
3756
|
if(model.rows.length === 0) return "";
|
|
3724
3757
|
var head = '<tr><th class="q">check</th>' + model.tries.map(function(t){
|
|
@@ -3730,6 +3763,12 @@
|
|
|
3730
3763
|
return '<td class="c">' + (t.hints ? '<button type="button" class="btn small hints" data-hint="' + t.n + '" aria-expanded="false" aria-controls="fxerr-' + pid + '" title="try ' + t.n + ' · told from earlier runs">' + gridHintsWord(t.hints) + "</button>" : '<span class="cell none">—</span>') + "</td>";
|
|
3731
3764
|
}).join("") + "</tr>";
|
|
3732
3765
|
}
|
|
3766
|
+
// M14 item 7: `told in this run` directly under `told from earlier runs`, one button per try that was handed a memo; it opens the exact text the way the hints do
|
|
3767
|
+
if(model.tries.some(function(t){ return !!t.memo; })){
|
|
3768
|
+
hrow += '<tr class="hint-row memo-row"><td class="q">told in this run</td>' + model.tries.map(function(t){
|
|
3769
|
+
return '<td class="c">' + (t.memo ? '<button type="button" class="btn small hints" data-memo="' + t.n + '" aria-expanded="false" aria-controls="fxerr-' + pid + '" title="try ' + t.n + ' · told in this run">' + gridMemoWord(t.memo) + "</button>" : '<span class="cell none">—</span>') + "</td>";
|
|
3770
|
+
}).join("") + "</tr>";
|
|
3771
|
+
}
|
|
3733
3772
|
var sub = "";
|
|
3734
3773
|
var body = model.rows.map(function(r){
|
|
3735
3774
|
var tds = model.tries.map(function(t){
|
|
@@ -3765,13 +3804,17 @@
|
|
|
3765
3804
|
while(lines.length && lines[lines.length - 1].trim() === "") lines.pop();
|
|
3766
3805
|
return lines;
|
|
3767
3806
|
}
|
|
3768
|
-
// the errors area: the hints texts opened by their buttons, then one line per red try (`try N ✗ <first error line>`).
|
|
3807
|
+
// the errors area: the hints and memo texts opened by their buttons, then one line per red try (`try N ✗ <first error line>`).
|
|
3769
3808
|
// `st` = {open: {tryN: true}, more: {tryN: true}, hint: {tryN: true}, hmore: {tryN: true}}
|
|
3770
3809
|
function gridErrorsHtml(pid, model, st){
|
|
3771
3810
|
var hrows = model.tries.filter(function(t){ return t.hints && st.hint[t.n]; }).map(function(t){
|
|
3772
3811
|
return '<div class="fx-row hintrow open"><button type="button" class="fx-rowhead" id="fxhint-' + pid + "-" + t.n + '" data-hrow="' + t.n + '" aria-expanded="true"><span class="fx-caret">▾</span><span class="fx-try">try ' + t.n + " · told from earlier runs · " + gridHintsWord(t.hints) + '</span></button><div class="fx-body">' +
|
|
3773
3812
|
gridLinesHtml(gridHintLines(t.hints), !!st.hmore[t.n], "data-hmore", t.n) + "</div></div>";
|
|
3774
3813
|
}).join("");
|
|
3814
|
+
var mrows = model.tries.filter(function(t){ return t.memo && st.memo[t.n]; }).map(function(t){
|
|
3815
|
+
return '<div class="fx-row hintrow open"><button type="button" class="fx-rowhead" id="fxmemo-' + pid + "-" + t.n + '" data-mrow="' + t.n + '" aria-expanded="true"><span class="fx-caret">▾</span><span class="fx-try">try ' + t.n + " · told in this run · " + gridMemoWord(t.memo) + '</span></button><div class="fx-body">' +
|
|
3816
|
+
gridLinesHtml(gridMemoLines(t.memo), !!st.mmore[t.n], "data-mmore", t.n) + "</div></div>";
|
|
3817
|
+
}).join("");
|
|
3775
3818
|
var rows = model.tries.map(function(t){
|
|
3776
3819
|
if(t.noVerdict){
|
|
3777
3820
|
return '<div class="fx-row fx-row-q"><span class="fx-rowhead"><span class="fx-caret"></span><span class="fx-try">try ' + t.n + '</span><span class="fx-chk">' + gridGlyph("?") + '</span><span class="fx-first fx-faint" title="' + escapeXml(t.noVerdict) + '">' + escapeXml(t.noVerdict) + "</span></span></div>";
|
|
@@ -3787,7 +3830,7 @@
|
|
|
3787
3830
|
var body = open ? '<div class="fx-body">' + gridLinesHtml(lines, !!st.more[t.n], "data-fxmore", t.n) + "</div>" : "";
|
|
3788
3831
|
return '<div class="fx-row' + (open ? " open" : "") + '">' + head + body + "</div>";
|
|
3789
3832
|
}).join("");
|
|
3790
|
-
return hrows + rows ? '<div class="fx-label">errors</div>' + hrows + rows : "";
|
|
3833
|
+
return hrows + mrows + rows ? '<div class="fx-label">errors</div>' + hrows + mrows + rows : "";
|
|
3791
3834
|
}
|
|
3792
3835
|
// the rounds, folded per try: each fold builds its own try's rows (20 a page) the first time it opens
|
|
3793
3836
|
function gridRoundsHtml(model){
|
|
@@ -3821,12 +3864,15 @@
|
|
|
3821
3864
|
Array.prototype.forEach.call(wrap.querySelectorAll("[data-hint]"), function(b){
|
|
3822
3865
|
b.setAttribute("aria-expanded", st.hint[b.getAttribute("data-hint")] ? "true" : "false");
|
|
3823
3866
|
});
|
|
3867
|
+
Array.prototype.forEach.call(wrap.querySelectorAll("[data-memo]"), function(b){
|
|
3868
|
+
b.setAttribute("aria-expanded", st.memo[b.getAttribute("data-memo")] ? "true" : "false");
|
|
3869
|
+
});
|
|
3824
3870
|
}
|
|
3825
3871
|
// a model step's body below its tally: the grid (hints row, every-step row, the close's checks), the errors area, the judged line, then the rounds folds
|
|
3826
3872
|
function buildGridEl(g){
|
|
3827
3873
|
var pid = String(g.step).replace(/[^A-Za-z0-9_-]/g, "_");
|
|
3828
3874
|
var model = gridModelOf(g.fold);
|
|
3829
|
-
var st = { open: gridDefaultOpen(model), more: {}, hint: {}, hmore: {} };
|
|
3875
|
+
var st = { open: gridDefaultOpen(model), more: {}, hint: {}, hmore: {}, memo: {}, mmore: {} };
|
|
3830
3876
|
var wrap = document.createElement("div");
|
|
3831
3877
|
wrap.setAttribute("data-fxpart", pid);
|
|
3832
3878
|
wrap.setAttribute("data-testid", "audit-grid-" + g.step);
|
|
@@ -3849,6 +3895,33 @@
|
|
|
3849
3895
|
if(hagain) hagain.focus();
|
|
3850
3896
|
return;
|
|
3851
3897
|
}
|
|
3898
|
+
var mmore = e.target.closest("[data-mmore]");
|
|
3899
|
+
if(mmore){
|
|
3900
|
+
var mk = mmore.getAttribute("data-mmore");
|
|
3901
|
+
st.mmore[mk] = !st.mmore[mk];
|
|
3902
|
+
renderGridErrors(wrap, pid, model, st);
|
|
3903
|
+
var magain = wrap.querySelector('[data-mmore="' + mk + '"]');
|
|
3904
|
+
if(magain) magain.focus();
|
|
3905
|
+
return;
|
|
3906
|
+
}
|
|
3907
|
+
var mrow = e.target.closest("[data-mrow]");
|
|
3908
|
+
if(mrow){
|
|
3909
|
+
var mn = mrow.getAttribute("data-mrow");
|
|
3910
|
+
st.memo[mn] = false;
|
|
3911
|
+
renderGridErrors(wrap, pid, model, st);
|
|
3912
|
+
var mb = wrap.querySelector('[data-memo="' + mn + '"]');
|
|
3913
|
+
if(mb) mb.focus();
|
|
3914
|
+
return;
|
|
3915
|
+
}
|
|
3916
|
+
var memo = e.target.closest("[data-memo]");
|
|
3917
|
+
if(memo){
|
|
3918
|
+
var mn2 = memo.getAttribute("data-memo");
|
|
3919
|
+
st.memo[mn2] = !st.memo[mn2];
|
|
3920
|
+
renderGridErrors(wrap, pid, model, st);
|
|
3921
|
+
var me = document.getElementById("fxmemo-" + pid + "-" + mn2);
|
|
3922
|
+
if(me) me.scrollIntoView({ block: "nearest" });
|
|
3923
|
+
return;
|
|
3924
|
+
}
|
|
3852
3925
|
var hrow = e.target.closest("[data-hrow]");
|
|
3853
3926
|
if(hrow){
|
|
3854
3927
|
var hn = hrow.getAttribute("data-hrow");
|
|
@@ -5472,7 +5545,9 @@
|
|
|
5472
5545
|
var capNoteEl = document.getElementById("jf-cap-note");
|
|
5473
5546
|
var runDestEl = document.getElementById("jf-run-dest"); // Run a signed flow: the open Destination box (amendment 5)
|
|
5474
5547
|
var runCapEl = document.getElementById("jf-run-cap"); // ... and the open Cap $ box
|
|
5475
|
-
var runWaitsEl = document.getElementById("jf-run-waits"); // ... and one wait box
|
|
5548
|
+
var runWaitsEl = document.getElementById("jf-run-waits"); // ... and its one Ask wait box (M13 am7)
|
|
5549
|
+
var runWaitEl = document.getElementById("jf-run-wait");
|
|
5550
|
+
var runSignedWaits = {}; // the signed wait of each ask line of the picked job, line -> "1h"; ONE writer: paintRunFlow
|
|
5476
5551
|
var resumeBox = document.getElementById("jf-resume"); // the "Resume run-<n>" form (amendment 4 item 4): only Cap $ is open
|
|
5477
5552
|
var resumeCapEl = document.getElementById("jf-resume-cap");
|
|
5478
5553
|
var modeRow = document.getElementById("jf-mode-row");
|
|
@@ -5873,9 +5948,10 @@
|
|
|
5873
5948
|
paintRequired();
|
|
5874
5949
|
inputsHintEl.textContent = (generic || tickets) ? "The Inputs line says what to read; it may be empty for a generic MCP job." : INPUTS_HINT_PLAIN;
|
|
5875
5950
|
}
|
|
5876
|
-
// M13 am5: the one writer of the required marks. Inputs is optional only for an MCP job; the Run card's mark shows when the flow has input rows
|
|
5951
|
+
// M13 am5/am6: the one writer of the required marks. Destination is required for every flow type (am6). Inputs is optional only for an MCP job; the Run card's mark shows when the flow has input rows
|
|
5877
5952
|
function paintRequired(){
|
|
5878
5953
|
byId("jf-req-inputs").textContent = flowTypeEl.value === "mcp" ? "optional for MCP" : "required";
|
|
5954
|
+
byId("jf-req-destination").textContent = "required";
|
|
5879
5955
|
byId("jf-run-req-inputs").hidden = runInputsEl.children.length === 0;
|
|
5880
5956
|
}
|
|
5881
5957
|
function setFlow(type, server, sched){
|
|
@@ -5916,11 +5992,21 @@
|
|
|
5916
5992
|
...(reuseOf !== null ? {reuseOf: reuseOf} : {})
|
|
5917
5993
|
};
|
|
5918
5994
|
}
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5995
|
+
// M13 am7: the one Ask wait box is the wait of every ask that does not set its own. The job's shared wait is its commonest signed wait (first ask on a
|
|
5996
|
+
// tie); an ask signed with a different wait sets its own and keeps it. An empty box changes nothing.
|
|
5997
|
+
function sharedAskWait(signed){
|
|
5998
|
+
var count = {}, best = "";
|
|
5999
|
+
Object.keys(signed).forEach(function(l){ count[signed[l]] = (count[signed[l]] || 0) + 1; });
|
|
6000
|
+
Object.keys(signed).forEach(function(l){ if(best === "" || count[signed[l]] > count[best]) best = signed[l]; });
|
|
6001
|
+
return best;
|
|
6002
|
+
}
|
|
6003
|
+
function askWaitsFrom(signed, text){
|
|
6004
|
+
var t = String(text).trim(), out = {}, base = sharedAskWait(signed);
|
|
6005
|
+
if(t === "") return out;
|
|
6006
|
+
Object.keys(signed).forEach(function(l){ if(signed[l] === base) out[l] = t; });
|
|
6007
|
+
return out;
|
|
6008
|
+
}
|
|
6009
|
+
function runWaits(){ return askWaitsFrom(runSignedWaits, runWaitEl.value); }
|
|
5924
6010
|
function currentRun(){
|
|
5925
6011
|
return {
|
|
5926
6012
|
flow: pickedFlow || "", inputs: readRows(runInputsEl), runId: (byId("jf-run-id").value.trim() === autoRunId ? "" : byId("jf-run-id").value.trim()),
|
|
@@ -5963,8 +6049,8 @@
|
|
|
5963
6049
|
}
|
|
5964
6050
|
var c = currentCard();
|
|
5965
6051
|
var v = Number(c.capUsd);
|
|
5966
|
-
// M13 am5: Inputs is required except for an MCP job (item 4); the server still judges what is in it
|
|
5967
|
-
return c.flowName !== "" && c.job.trim() !== "" && (flowTypeEl.value === "mcp" || c.inputs.trim() !== "") && c.capUsd !== "" && isFinite(v) && v > 0;
|
|
6052
|
+
// M13 am6: Destination is required for every flow type. M13 am5: Inputs is required except for an MCP job (item 4); the server still judges what is in it
|
|
6053
|
+
return c.flowName !== "" && c.job.trim() !== "" && c.destination !== "" && (flowTypeEl.value === "mcp" || c.inputs.trim() !== "") && c.capUsd !== "" && isFinite(v) && v > 0;
|
|
5968
6054
|
}
|
|
5969
6055
|
|
|
5970
6056
|
// ---- the money note under Cap (M4e amendment 4 items 1-2) ----
|
|
@@ -6080,7 +6166,18 @@
|
|
|
6080
6166
|
clearBtn.textContent = b.text;
|
|
6081
6167
|
clearBtn.disabled = b.disabled;
|
|
6082
6168
|
}
|
|
6169
|
+
// M13 am8: the end code adds, in grey under the Job box (the server's `addEnd` is the one writer; this only shows it): an Ask unless the last step is already one, then the write.
|
|
6170
|
+
function paintAddedEnd(){
|
|
6171
|
+
var steps = jobEl.value.split("\n").map(function(l){ return l.trim(); }).filter(function(l){ return l !== "" && l.charAt(0) !== "~"; });
|
|
6172
|
+
var on = destEl.value.trim() !== "" && steps.length > 0;
|
|
6173
|
+
var needAsk = on && !/^ask[: ]/i.test(steps[steps.length - 1]);
|
|
6174
|
+
var askEl = byId("jf-added-ask"), writeEl = byId("jf-added-write");
|
|
6175
|
+
askEl.hidden = !needAsk; writeEl.hidden = !on;
|
|
6176
|
+
askEl.textContent = "+ Ask " + (askWaitEl.value.trim() || "1h") + ": check the result";
|
|
6177
|
+
writeEl.textContent = "+ Write to Destination";
|
|
6178
|
+
}
|
|
6083
6179
|
function refreshStartEnabled(){
|
|
6180
|
+
paintAddedEnd();
|
|
6084
6181
|
paintRequired();
|
|
6085
6182
|
startOk = startReady();
|
|
6086
6183
|
syncCardLock();
|
|
@@ -6123,7 +6220,9 @@
|
|
|
6123
6220
|
return b;
|
|
6124
6221
|
}
|
|
6125
6222
|
function paintReuseKind(){
|
|
6223
|
+
// M13 am7: the name that will be true. The server's answer (the one that picks the button) shows the new name OR the Run id, never both
|
|
6126
6224
|
newNameField.hidden = !(mode === "run" && reuseKind === "draft" && !reuseRunOf);
|
|
6225
|
+
byId("jf-run-id-field").hidden = !newNameField.hidden;
|
|
6127
6226
|
}
|
|
6128
6227
|
function checkReuse(){
|
|
6129
6228
|
if(mode !== "run" || !selectedFlow()){ reuseKind = null; reuseBusy = false; paintReuseKind(); return; }
|
|
@@ -6152,8 +6251,7 @@
|
|
|
6152
6251
|
if(!f || mode !== "run" || cardLocked() || sessionLive) return;
|
|
6153
6252
|
reuseOf = reuseRunOf ? {flow: f.flow, fromRun: pickedRun ? pickedRun.runId : ""} : {flow: f.flow, fromRun: pickedRun ? pickedRun.runId : undefined};
|
|
6154
6253
|
var rows = readRows(runInputsEl);
|
|
6155
|
-
var
|
|
6156
|
-
var firstWait = Object.keys(waits).map(function(k){ return waits[k]; }).filter(function(w){ return w !== ""; })[0] || "1h";
|
|
6254
|
+
var firstWait = runWaitEl.value.trim() || "1h";
|
|
6157
6255
|
var pk = runPickChoice();
|
|
6158
6256
|
setMode("new");
|
|
6159
6257
|
setVal("jf-name", reuseRunOf ? f.flow : newNameEl.value.trim()); setVal("jf-job", jobBoxEl.value); setVal("jf-cap-money", runCapEl.value.trim());
|
|
@@ -6202,18 +6300,9 @@
|
|
|
6202
6300
|
runDestEl.classList.toggle("locked", !(f && f.hasSend));
|
|
6203
6301
|
byId("jf-run-dest-hint").textContent = !f ? "" : (f.hasSend ? "Where the accepted result is placed, at the last step. A different folder is signed for this run only." : "This flow has no send step, so there is no destination to set.");
|
|
6204
6302
|
runCapEl.value = f ? String(f.values.capUsd) : ""; // M6 am11: the job's SIGNED cap, never what an earlier run was capped at after drafting (v)
|
|
6205
|
-
|
|
6206
|
-
Object.keys(
|
|
6207
|
-
|
|
6208
|
-
row.className = "jf-waitrow";
|
|
6209
|
-
var lab = document.createElement("label");
|
|
6210
|
-
lab.textContent = "Ask wait \u00b7 line " + line;
|
|
6211
|
-
var inp = makeInput("jf-wait", "e.g. 30m", v.askWaits[line]);
|
|
6212
|
-
inp.setAttribute("data-line", line);
|
|
6213
|
-
inp.setAttribute("data-testid", "jf-run-wait-" + line);
|
|
6214
|
-
row.appendChild(lab); row.appendChild(inp);
|
|
6215
|
-
runWaitsEl.appendChild(row);
|
|
6216
|
-
});
|
|
6303
|
+
runSignedWaits = (v && v.askWaits) || {};
|
|
6304
|
+
runWaitsEl.hidden = Object.keys(runSignedWaits).length === 0;
|
|
6305
|
+
runWaitEl.value = sharedAskWait(runSignedWaits);
|
|
6217
6306
|
paintRunRows(f, pickedRun ? pickedRun.sources : (f ? f.lastSources : null));
|
|
6218
6307
|
autoRunId = f && f.nextRunId ? f.nextRunId : "";
|
|
6219
6308
|
byId("jf-run-id").value = autoRunId;
|
|
@@ -6961,15 +7050,18 @@
|
|
|
6961
7050
|
// Re-attach after a page load/refresh or a panel restart: the server reads the newest unsigned draft from its files, so ask it.
|
|
6962
7051
|
// If one exists, this tab takes it over as if it had started it: the card filled from the draft's own copy, the poll loop, the
|
|
6963
7052
|
// progress list, the readout and the main button. A signed or abandoned draft never comes back (empty card).
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
openNewCard();
|
|
6967
|
-
setMode("new");
|
|
7053
|
+
// ONE writer of the New-job boxes from a draft's card (attach, and Revise opening on the newest card)
|
|
7054
|
+
function fillCardFields(c){
|
|
6968
7055
|
setVal("jf-name", c.flowName); setVal("jf-job", c.job); setVal("jf-cap-money", c.capUsd);
|
|
6969
7056
|
setModelPick(c.provider || "", c.model || ""); thinkingEl.checked = c.thinking === true && !thinkingNone;
|
|
6970
7057
|
refreshCapNote();
|
|
6971
7058
|
setVal("jf-dest-folder", typeof c.destination === "string" ? c.destination : ""); setVal("jf-inputs", typeof c.inputs === "string" ? c.inputs : ""); setVal("jf-ask-wait", c.askWait || "1h");
|
|
6972
7059
|
setFlow(c.flowType, c.mcp, c.schedule);
|
|
7060
|
+
}
|
|
7061
|
+
function attachSession(d){
|
|
7062
|
+
openNewCard();
|
|
7063
|
+
setMode("new");
|
|
7064
|
+
fillCardFields(d.card || {});
|
|
6973
7065
|
sessionId = d.draftId;
|
|
6974
7066
|
sessionLive = CLIENT_TERMINAL_PHASES.indexOf(d.phase) === -1;
|
|
6975
7067
|
renderThread(d);
|
|
@@ -7003,7 +7095,7 @@
|
|
|
7003
7095
|
resetCard();
|
|
7004
7096
|
});
|
|
7005
7097
|
// Revise (amendment 14 item 2): opens every card field, filled as last submitted; nothing is sent
|
|
7006
|
-
reviseBtn.addEventListener("click", function(){ if(reviseBtn.disabled) return; reviseOpen = true; refreshStartEnabled(); });
|
|
7098
|
+
reviseBtn.addEventListener("click", function(){ if(reviseBtn.disabled) return; if(lastState && lastState.card) fillCardFields(lastState.card); reviseOpen = true; refreshStartEnabled(); fitCardBoxes(); });
|
|
7007
7099
|
// Start over (amendment 14 item 3): the same draft call as Draft, from the card as it is now; the old draft's files stay (a new draft id, 2 new revises)
|
|
7008
7100
|
startOverBtn.addEventListener("click", function(){ if(!startOverBtn.disabled) doDraft(sessionId); });
|
|
7009
7101
|
qSend.addEventListener("click", doAnswer);
|
|
@@ -7496,7 +7588,7 @@
|
|
|
7496
7588
|
var shown = more ? s.check.tools : s.check.tools.slice(0, MCP_TOOLS_SHOWN);
|
|
7497
7589
|
list = '<div class="pv-mhead mc-t" aria-hidden="true"><span>TOOL</span><span>HINT</span><span class="n">USED</span></div>' +
|
|
7498
7590
|
shown.map(function(t){
|
|
7499
|
-
return '<div class="pv-mrow mc-t" tabindex="-1" data-testid="mcp-tool"><span class="pv-m-name"><code>' + escapeXml(t.name) + '</code></span><span>' + escapeXml(t.hint || "—") + '</span><span class="n">' + ((s.use && s.use.tools && s.use.tools[t.name]) || 0) + '</span></div>';
|
|
7591
|
+
return '<div class="pv-mrow mc-t" tabindex="-1" data-testid="mcp-tool"><span class="pv-m-name"><code>' + escapeXml(t.name) + '</code></span><span>' + escapeXml(t.hint || "—") + '</span><span class="n">' + ((s.use && s.use.tools && Object.prototype.hasOwnProperty.call(s.use.tools, t.name) && s.use.tools[t.name]) || 0) + '</span></div>';
|
|
7500
7592
|
}).join("") +
|
|
7501
7593
|
(s.check.tools.length > shown.length ? '<div class="pv-more"><button class="pv-add" type="button" data-more="' + pi + "-" + si + '">+' + (s.check.tools.length - shown.length) + ' more</button></div>' : "");
|
|
7502
7594
|
} else if(s.check) list = '<div class="pv-more"><span class="hint bad">' + escapeXml(s.check.error || "") + '</span></div>';
|
package/src/panel/result.js
CHANGED
|
@@ -15,7 +15,8 @@ import { readFileInside } from '../flow.js';
|
|
|
15
15
|
import { isCellsPath } from '../closers.js';
|
|
16
16
|
import { readAcceptedHashesByEmits } from '../ask.js';
|
|
17
17
|
import { NOT_CHECKED_LABEL } from '../checked.js';
|
|
18
|
-
import { checkSendDestination } from '../runner.js';
|
|
18
|
+
import { checkSendDestination, readArtifactResult } from '../runner.js';
|
|
19
|
+
import { flowTypeOf } from '../declaration.js';
|
|
19
20
|
import { isAgree, readingOfQuestion } from '../pageask.js';
|
|
20
21
|
import { lineRules } from '../pagebits.js';
|
|
21
22
|
import { readLineSection, LINE_CHECKS_FILE } from '../line-checks.js';
|
|
@@ -49,6 +50,15 @@ export function isResultRun(arbiter) {
|
|
|
49
50
|
return sources.some((s) => s && (s.kind === 'page' || (isStr(s.path) && (isCellsPath(s.path) || s.path.toLowerCase().endsWith('.docx')))));
|
|
50
51
|
}
|
|
51
52
|
|
|
53
|
+
/**
|
|
54
|
+
* M15 item 1: the ONE decider of the Result tab and of its cards. Every job has it; a Tickets MCP job keeps what it had (M13 am2: the grid, and M10's cards only when
|
|
55
|
+
* it reads a page, a CSV or a .docx). Read off the signed declaration and arbiter.
|
|
56
|
+
* @param {any} arbiter @param {any} declaration @returns {boolean}
|
|
57
|
+
*/
|
|
58
|
+
export function hasResultCards(arbiter, declaration) {
|
|
59
|
+
return flowTypeOf(declaration) === 'tickets' ? isResultRun(arbiter) : true;
|
|
60
|
+
}
|
|
61
|
+
|
|
52
62
|
/** The run's check type: its distinct close classes, in step order (`hitl + softgreen`). `—` for a declaration with none.
|
|
53
63
|
* @param {any} declaration @returns {string} */
|
|
54
64
|
export function checkTypeOf(declaration) {
|
|
@@ -166,9 +176,9 @@ export function readDelivered(rec) {
|
|
|
166
176
|
}
|
|
167
177
|
|
|
168
178
|
/**
|
|
169
|
-
* The files this run's signed sends wrote: for each signed send whose send step ended green in the audit, the file `<flow>-<runId>-<emits>.
|
|
170
|
-
* in the signed folder
|
|
171
|
-
* send itself checked). No accepted hash = recorded as null, which reads as "changed", never as ok.
|
|
179
|
+
* The files this run's signed sends wrote: for each signed send whose send step ended green in the audit, the file `<flow>-<runId>-<emits>.md`
|
|
180
|
+
* in the signed folder with the sha256 the send recorded for it (M15), or, for a send older than M15, `.json` with the sha256 the human's accept recorded for the ask that
|
|
181
|
+
* send reads (`readAcceptedHashesByEmits`, the same record the send itself checked). No accepted hash = recorded as null, which reads as "changed", never as ok.
|
|
172
182
|
* @returns {{path: string, dir: string|null, name: string, sha256: string|null}[]}
|
|
173
183
|
*/
|
|
174
184
|
export function deliveredOf({
|
|
@@ -181,13 +191,16 @@ export function deliveredOf({
|
|
|
181
191
|
const out = [];
|
|
182
192
|
for (const send of arbiter?.sends ?? []) {
|
|
183
193
|
const step = steps.find((s) => s.fromLine === send.line);
|
|
184
|
-
|
|
185
|
-
|
|
194
|
+
const sentRow = step ? auditRows.findLast((r) => r.step === step.emits && r.verdict === 'green') : undefined;
|
|
195
|
+
if (!step || !sentRow) continue; // eslint-disable-line no-continue
|
|
196
|
+
// M15 item 4: a send since M15 wrote `<emits>.md` and recorded that file's own sha256 on its green audit row; an older send wrote the JSON, bound to the accept's hash
|
|
197
|
+
const plain = isStr(sentRow.sentSha256) && sentRow.sentSha256 !== '';
|
|
198
|
+
const name = `${flow}-${runId}-${step.emits}.${plain ? 'md' : 'json'}`;
|
|
186
199
|
const dest = checkSendDestination(`${send.target.kind}:${send.target.path}`, { root, runDir });
|
|
187
200
|
const [askId] = (step.reads ?? []).filter((id) => askEmits.has(id));
|
|
188
201
|
out.push({
|
|
189
202
|
path: join(dest.ok ? dest.dir : send.target.path, name), dir: dest.ok ? dest.dir : null, name,
|
|
190
|
-
sha256: hashes.ok && askId !== undefined ? (hashes.byEmits.get(askId) ?? null) : null,
|
|
203
|
+
sha256: plain ? sentRow.sentSha256 : (hashes.ok && askId !== undefined ? (hashes.byEmits.get(askId) ?? null) : null),
|
|
191
204
|
});
|
|
192
205
|
}
|
|
193
206
|
return out;
|
|
@@ -242,6 +255,14 @@ export function buildResult({
|
|
|
242
255
|
checks: checksOfLine((declaration?.steps ?? []).filter((st) => st.fromLine === l.n), diary),
|
|
243
256
|
sheet: sheetBlocks.find((b) => b.line === l.n) ?? null,
|
|
244
257
|
};
|
|
258
|
+
// M15 item 2: a line whose step wrote text (no facts) shows that text, from the step's own artifact (`{text}`); a sheet line keeps its block
|
|
259
|
+
if (!c && out.sheet === null) {
|
|
260
|
+
const written = (declaration?.steps ?? []).filter((st) => st.fromLine === l.n).map((st) => {
|
|
261
|
+
const a = readArtifactResult(runDir, st.emits);
|
|
262
|
+
return a.ok && isStr(a.value?.text) && a.value.text !== '' ? a.value.text : null;
|
|
263
|
+
}).filter((x) => x !== null);
|
|
264
|
+
if (written.length > 0) out.answer = written.join('\n\n');
|
|
265
|
+
}
|
|
245
266
|
if (c) {
|
|
246
267
|
out.source = c.source;
|
|
247
268
|
out.page = urls.get(c.source) ?? null;
|