clearotron 0.7.0 → 0.8.0-beta.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 (98) hide show
  1. package/THIRD-PARTY-NOTICES.md +71 -2
  2. package/build-info.json +2 -2
  3. package/demo/multi-country-focus-search/run/common-law-grid.json +1 -1
  4. package/docs/CLIENT-MCP.md +17 -0
  5. package/docs/assets/README.md +19 -3
  6. package/docs/assets/portal-clearance-report.jpg +0 -0
  7. package/docs/assets/portal-conflict-landscape.jpg +0 -0
  8. package/docs/assets/portal-new-clearance.png +0 -0
  9. package/driver/CHANGELOG.md +48 -0
  10. package/driver/config-inventory.mjs +15 -2
  11. package/driver/dev-portal.mjs +2 -0
  12. package/driver/effort-model.mjs +34 -4
  13. package/driver/engine/CONTRACT.md +8 -0
  14. package/driver/engine/anthropic-agent.mjs +74 -16
  15. package/driver/engine/jx-turn.mjs +11 -3
  16. package/driver/engine/openai-agent.mjs +33 -7
  17. package/driver/engine/run-choices.mjs +28 -7
  18. package/driver/engine/speed.mjs +107 -0
  19. package/driver/enqueue-schema.mjs +8 -0
  20. package/driver/enqueue.mjs +14 -2
  21. package/driver/jx-units.mjs +2 -2
  22. package/driver/jx.mjs +1 -1
  23. package/driver/knockout-plain-language.mjs +96 -0
  24. package/driver/ladder/attempt-record.mjs +14 -2
  25. package/driver/ladder/dispatch.mjs +2 -2
  26. package/driver/ladder/form-repair.mjs +1 -1
  27. package/driver/ladder/stage.mjs +7 -1
  28. package/driver/mark-logos.mjs +6 -1
  29. package/driver/order-receipt.mjs +184 -0
  30. package/driver/package.json +4 -1
  31. package/driver/picture-shrink-worker.mjs +21 -0
  32. package/driver/picture-thumbnail.mjs +132 -0
  33. package/driver/pipeline-knockout.mjs +14 -0
  34. package/driver/portal-confirmation.mjs +3 -0
  35. package/driver/portal-report.mjs +44 -1
  36. package/driver/portal-routes/run.mjs +19 -9
  37. package/driver/portal-runs.mjs +118 -63
  38. package/driver/portal-service.mjs +17 -2
  39. package/driver/predelivery-lint.mjs +3 -3
  40. package/driver/progress.mjs +33 -5
  41. package/driver/publish/column-queries.mjs +86 -0
  42. package/driver/publish/index.mjs +4 -4
  43. package/driver/publish/knockout.mjs +35 -8
  44. package/driver/publish/page-shell.mjs +5 -1
  45. package/driver/publish/read-document.mjs +3 -0
  46. package/driver/publish/render-knockout.mjs +61 -16
  47. package/driver/publish/render.mjs +171 -30
  48. package/driver/publish/search-depth.mjs +45 -1
  49. package/driver/publish/strings.mjs +23 -0
  50. package/driver/publish/templates/report.css +73 -0
  51. package/driver/research-answers.mjs +17 -6
  52. package/driver/research-checks.mjs +22 -4
  53. package/driver/research-records.mjs +81 -0
  54. package/driver/run-quote.mjs +3 -0
  55. package/driver/run-speed.mjs +89 -0
  56. package/driver/runner.mjs +50 -21
  57. package/driver/saved-register-pages.mjs +23 -22
  58. package/driver/stage-freshness.mjs +5 -0
  59. package/driver/stages.mjs +2 -2
  60. package/driver/steps/open-run.mjs +12 -1
  61. package/driver/suite-census.json +199 -37
  62. package/driver/tokens.mjs +3 -0
  63. package/driver/urgent-count.mjs +54 -0
  64. package/driver/usage-ledger.mjs +8 -2
  65. package/driver/web-pictures.mjs +532 -0
  66. package/mcp-server/CHANGELOG.md +16 -0
  67. package/mcp-server/lib/document-reads.mjs +28 -0
  68. package/mcp-server/lib/events.mjs +21 -12
  69. package/mcp-server/lib/findings.mjs +2 -1
  70. package/mcp-server/lib/knockout.mjs +3 -2
  71. package/mcp-server/lib/ops.mjs +103 -6
  72. package/mcp-server/lib/options.mjs +4 -0
  73. package/mcp-server/lib/plan.mjs +38 -4
  74. package/mcp-server/lib/result-shapes.mjs +66 -0
  75. package/mcp-server/lib/runs.mjs +46 -44
  76. package/mcp-server/lib/urgent.mjs +29 -0
  77. package/mcp-server/package.json +1 -1
  78. package/mcp-server/result-shapes.json +2978 -0
  79. package/mcp-server/server.mjs +67 -14
  80. package/package.json +4 -1
  81. package/portal-ui/dist/assets/{index-qNDhqCw9.js → index-DEkVU2FD.js} +1909 -766
  82. package/portal-ui/dist/assets/{index-CxAkJXIT.css → index-W6SAoDkS.css} +238 -1
  83. package/portal-ui/dist/index.html +2 -2
  84. package/portal-ui/package.json +1 -1
  85. package/providers/jx/src/turn-envelope.mjs +3 -1
  86. package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
  87. package/providers/oauth-mcp-bridge/package.json +1 -1
  88. package/providers/signa/src/core.js +54 -12
  89. package/scripts/README.md +3 -0
  90. package/scripts/e2e-first-time.mjs +2 -2
  91. package/scripts/mint-result-shapes.mjs +199 -0
  92. package/scripts/readme-pictures.mjs +227 -0
  93. package/scripts/render-check.mjs +4 -1
  94. package/scripts/report-sections-render-check.mjs +191 -0
  95. package/scripts/settings-render-check.mjs +68 -11
  96. package/shared/brand.mjs +8 -0
  97. package/skills/clearotron-account/SKILL.md +24 -0
  98. package/skills/clearotron-ops/SKILL.md +23 -9
@@ -269,6 +269,70 @@ html.anon-on [data-anon='mark']:not(.anon-clear) {
269
269
  padding: 10px 0 12px;
270
270
  border-bottom: 1px solid var(--border-hairline);
271
271
  }
272
+ .report-head-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 2px; }
273
+ .report-head-name { font-size: 19px; font-weight: 700; margin: 0; color: var(--text-strong); }
274
+ .report-head-gap { flex: 1; }
275
+
276
+ /* ONE HEADER, TWO STATES, on a desktop width (board ReportHeader, approved 2026-11-25). At the top of the
277
+ page the header sits in the page and scrolls with it; once the reader is past it, the same header is pinned
278
+ under the topbar as one row. Its slot keeps the full header's height meanwhile, so nothing under it moves.
279
+ A phone keeps the pinned header above. No transition, so a reader who asked for reduced motion gets none
280
+ and nobody else gets any either. */
281
+ .report-head-slot { position: relative; }
282
+ .report-head-sentinel { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; pointer-events: none; }
283
+ /* A PHONE KEEPS THE PINNED HEADER, and a sticky box sticks only inside its parent: the slot would carry the
284
+ header away with it. Below the desktop width the slot is no box at all, and the sentinel is not drawn. */
285
+ @media (max-width: 899px) {
286
+ .report-head-slot { display: contents; }
287
+ .report-head-sentinel { display: none; }
288
+ }
289
+ @media (min-width: 900px) {
290
+ .report-head { position: static; }
291
+ .report-head.compact {
292
+ position: fixed; top: 56px; z-index: 20;
293
+ padding: 8px 0; box-sizing: border-box;
294
+ }
295
+ .report-head.compact .report-head-row { flex-wrap: nowrap; gap: 10px; margin-bottom: 0; }
296
+ .report-head.compact .report-head-name {
297
+ font-size: 15px; flex: 0 1 auto; min-width: 3ch; max-width: 24ch;
298
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
299
+ }
300
+ .report-head.compact .report-sections { flex: 1 1 auto; min-width: 0; }
301
+ /* Where the pinned row cannot hold the name, the sections and both actions, the full header is pinned instead. */
302
+ .report-head.pinned-full { position: fixed; top: 56px; z-index: 20; box-sizing: border-box; }
303
+ /* "Ask AI" stays one line in the pinned row; where the row cannot hold it whole, the full header is pinned instead. */
304
+ .report-head.compact .ask-ai-btn { white-space: nowrap; flex: none; }
305
+ .report-head.compact .report-head-gap { flex: 0 0 0; }
306
+ }
307
+ .btn-ghost.report-back-icon { flex: none; padding: 6px 7px; border-color: var(--border-hairline); }
308
+
309
+ /* SEARCH HISTORY, one press away in the pinned row (refinement picture search-history.png). */
310
+ .report-history { position: relative; flex: none; }
311
+ .report-history-btn {
312
+ display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
313
+ padding: 5px 12px; border: 1px solid var(--accent); border-radius: 999px;
314
+ background: var(--accent-wash); color: var(--text-accent); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
315
+ }
316
+ .report-history-list {
317
+ position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 360px;
318
+ max-height: calc(100vh - 140px); overflow-y: auto;
319
+ list-style: none; margin: 0; padding: 6px; display: flex; flex-direction: column; gap: 4px;
320
+ background: var(--surface-float); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-lg);
321
+ }
322
+ .report-history-row {
323
+ width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
324
+ padding: 8px 10px; border: 1px solid transparent; border-radius: 8px;
325
+ background: transparent; color: var(--text-body); font: inherit; cursor: pointer;
326
+ }
327
+ .report-history-row:hover, .report-history-row:focus-visible { background: var(--surface-sunken); }
328
+ .report-history-row.current { background: var(--accent-wash); border-color: var(--accent); }
329
+ .report-history-nodot { width: 7px; height: 7px; flex: none; }
330
+ .report-history-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
331
+ .report-history-search { font-size: 13px; font-weight: 700; color: var(--text-strong); white-space: nowrap; }
332
+ .report-history-date { font-size: 12px; color: var(--text-muted); }
333
+ .report-history-tag { flex: none; }
334
+ .report-history-live { flex: none; font-size: 12px; color: var(--text-muted); }
335
+ .report-history-tick { flex: none; display: inline-flex; color: var(--text-accent); }
272
336
 
273
337
  /* THE HEADER'S LOWER ROWS: which read you are in, then where you are inside it.
274
338
  The Reads strip used to sit BELOW this box and the report's own section breadcrumb inside the frame,
@@ -813,7 +877,7 @@ table.data tr.group-head td {
813
877
  }
814
878
 
815
879
  table.data tr.group-head .owner-name {
816
- font-size: 14px;
880
+ font-size: 19px;
817
881
  font-weight: 600;
818
882
  color: var(--text-strong);
819
883
  letter-spacing: 0;
@@ -1019,6 +1083,7 @@ table.data td.nest-2 {
1019
1083
  }
1020
1084
  /* The bordered Open. One width, whatever its label says: the track decides, not the text. */
1021
1085
  button.row-open {
1086
+ display: inline-flex; align-items: center; justify-content: center; gap: 7px;
1022
1087
  width: 100%;
1023
1088
  padding: 5px 8px;
1024
1089
  border: 1px solid var(--border-strong);
@@ -1603,6 +1668,34 @@ input.filter {
1603
1668
  background: var(--text-faint);
1604
1669
  }
1605
1670
 
1671
+ /* An optional source not set up: the off look, with the dot open (board SettingsProposed, 2026-11-25). */
1672
+ .cfg-dot.off.open {
1673
+ box-sizing: border-box;
1674
+ background: transparent;
1675
+ border: 1.5px solid var(--text-muted);
1676
+ }
1677
+
1678
+ /* Needed and Optional: headings over their categories, each with a rule to the right. */
1679
+ .cfg-group-head {
1680
+ display: flex; align-items: center; gap: 12px; margin: 0;
1681
+ font-size: 15px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text-strong);
1682
+ }
1683
+ .cfg-group-head::after { content: ''; flex: 1; height: 1px; background: var(--border-hairline); }
1684
+
1685
+ /* The command that fixes a row's problem, with Copy at its right (board SettingsCommand, 2026-11-25). */
1686
+ .cfg-cmd {
1687
+ display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 6px 6px 6px 14px;
1688
+ border: 1px solid var(--border-hairline); border-radius: 8px; background: var(--surface-sunken);
1689
+ }
1690
+ .cfg-cmd code { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 13px; color: var(--text-strong); overflow-wrap: anywhere; }
1691
+ .cfg-copy {
1692
+ flex: none; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 7px;
1693
+ background: var(--surface-raised); color: var(--text-strong); font: inherit; font-size: 12.5px; font-weight: 700;
1694
+ display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
1695
+ }
1696
+ .cfg-copy:hover { border-color: var(--accent-ink); color: var(--text-accent); }
1697
+ .cfg-copy.is-copied { color: var(--tone-low); }
1698
+
1606
1699
  /* ── mobile ──────────────────────────────────────────────────────────────────────────────────────── */
1607
1700
 
1608
1701
  @media (max-width: 899px) {
@@ -2902,6 +2995,20 @@ details[open] > .fold-summary .fold-chev {
2902
2995
  .nc-company-name { font-size: 15px; font-weight: 600; color: var(--text-strong); }
2903
2996
  .nc-project { max-width: 340px; flex: 1; }
2904
2997
  .nc-describe-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
2998
+ /* The company's settings as one line, with "Change" (board NewClearanceProposed, 2026-11-25). */
2999
+ .nc-company-line {
3000
+ display: flex; align-items: center; gap: 16px; padding: 16px 18px;
3001
+ border: 1px solid var(--border-hairline); border-radius: 12px; background: var(--surface-raised);
3002
+ }
3003
+ .nc-company-line-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
3004
+ .nc-company-line-value { font-size: 14.5px; color: var(--text-body); overflow-wrap: anywhere; }
3005
+ /* "Change" and "All four searches": real buttons that say whether what they open is open. */
3006
+ .nc-disclose {
3007
+ flex: none; min-height: 44px; padding: 0 18px; border: 1px solid var(--border-strong); border-radius: 8px;
3008
+ background: var(--surface-raised); color: var(--text-strong); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
3009
+ }
3010
+ .nc-disclose:hover { border-color: var(--accent-ink); color: var(--text-accent); }
3011
+ .nc-all-searches { align-self: flex-start; margin-top: 12px; }
2905
3012
  .nc-optional { font-size: 11.5px; color: var(--text-faint); }
2906
3013
  .nc-which-head {
2907
3014
  display: flex;
@@ -3057,6 +3164,19 @@ details[open] > .fold-summary .fold-chev {
3057
3164
  .home2-pip.on.failed { background: var(--tone-high); }
3058
3165
  .home2-pip.on.cancelled { background: var(--text-faint); }
3059
3166
 
3167
+ /* A running card's steps, every one by name (board Main, 2026-11-25). Done: a tick and muted text.
3168
+ Current: bold, with a filled dot in the accent colour, or today's paused colour on a paused card.
3169
+ To come: an open dot and muted text. Names wrap at phone width; nothing clips. */
3170
+ .home2-steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
3171
+ .home2-stepitem { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.35; color: var(--text-muted); }
3172
+ .home2-stepmark { flex: none; width: 14px; height: 14px; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); }
3173
+ .home2-stepname { min-width: 0; overflow-wrap: anywhere; }
3174
+ .home2-stepitem.current { font-size: 14.5px; font-weight: 700; color: var(--text-strong); }
3175
+ .home2-stepitem.current .home2-stepmark { margin-top: 2px; }
3176
+ .home2-stepitem.current .home2-stepdot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-accent); }
3177
+ .home2-steps.paused .home2-stepitem.current .home2-stepdot { background: var(--tone-medium); }
3178
+ .home2-stepitem.todo .home2-stepdot { width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--border-strong); }
3179
+
3060
3180
  .home2-card-foot {
3061
3181
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-hairline);
3062
3182
  display: flex; align-items: center; gap: 10px;
@@ -3640,3 +3760,120 @@ ol.steps > li::before {
3640
3760
  color: var(--text-faint);
3641
3761
  font-size: 12px;
3642
3762
  }
3763
+
3764
+ /* ── CLEARANCES (board Clearances, approved 2026-11-25) ─────────────────────────────────────────────────
3765
+ The title counts its names and carries "Group names"; under it, Find a name and Filters, the narrowing
3766
+ in force as chips, the status tabs, then the list. A company is a full-width band with its count; a
3767
+ family and a name are indented within it. */
3768
+ .clr-title-count { margin-left: 10px; font-size: 13px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
3769
+ .btn-ghost.clr-group-btn { display: inline-flex; align-items: center; gap: 8px; border-color: var(--border-strong); }
3770
+ .clr-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
3771
+ .clr-find {
3772
+ display: inline-flex; align-items: center; gap: 8px; flex: 0 1 220px; min-width: 0;
3773
+ padding: 0 12px; height: 38px; border: 1px solid var(--border-hairline); border-radius: 8px; background: var(--surface-raised);
3774
+ color: var(--text-muted);
3775
+ }
3776
+ .clr-find input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text-strong); outline: none; }
3777
+ .btn-ghost.clr-filters-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; border-color: var(--border-strong); }
3778
+ .clr-filters-count {
3779
+ display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
3780
+ background: var(--accent); color: var(--text-on-accent); font-size: 11px; font-weight: 700;
3781
+ }
3782
+ .clr-filters {
3783
+ display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-top: 10px; padding: 14px;
3784
+ border: 1px solid var(--border-hairline); border-radius: 10px; background: var(--surface-raised);
3785
+ }
3786
+ .clr-filter { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
3787
+ .clr-filter-check { padding-bottom: 8px; }
3788
+ .clr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
3789
+ .chip.clr-chip { cursor: pointer; font: inherit; font-size: 12.5px; }
3790
+ .clr-tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 14px 0 6px; border-bottom: 1px solid var(--border-hairline); }
3791
+ .clr-tab {
3792
+ padding: 6px 0 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; margin-bottom: -1px;
3793
+ font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-muted); cursor: pointer;
3794
+ }
3795
+ .clr-tab[aria-pressed='true'] { color: var(--text-accent); border-bottom-color: var(--accent); }
3796
+ .clr-tab-count { margin-left: 5px; font-weight: 500; }
3797
+ .clr-note { margin: 8px 0 0; font-size: 13px; color: var(--text-body); }
3798
+ .clr-meta { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
3799
+ .clr-family-icon { display: inline-flex; vertical-align: -2px; margin-right: 6px; color: var(--text-muted); }
3800
+ .col-actions-head { text-align: right; }
3801
+ .clr-search-name { display: block; font-size: 13.5px; font-weight: 700; color: var(--text-strong); }
3802
+
3803
+ /* The dialogs that replace the browser's own confirm and prompt boxes. */
3804
+ .modal-card.clr-dialog { max-width: 460px; }
3805
+ .clr-dialog-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-strong); }
3806
+ .clr-dialog-body { padding: 14px 24px 4px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--text-body); }
3807
+ .clr-dialog-body p { margin: 0; }
3808
+ .clr-field { display: flex; flex-direction: column; gap: 6px; }
3809
+ .clr-names { margin: 0; padding: 10px 12px; border: 1px solid var(--border-hairline); border-radius: 8px; display: flex; flex-direction: column; gap: 6px; }
3810
+ .clr-name-choice { display: flex; align-items: center; gap: 8px; font-size: 14px; }
3811
+ .clr-quiet { color: var(--text-muted); font-size: 12.5px; }
3812
+
3813
+ /* THE LIST ON A PHONE (board Clearances, phone, approved 2026-11-25): each row is a card, so the name, its
3814
+ status, its risk, its report button and its menu are all in reach without scrolling sideways. The name and
3815
+ its risk share the top line; the status, the report button and the menu share the bottom one. */
3816
+ .clr-phone-only { display: none; }
3817
+ @media (max-width: 699px) {
3818
+ .clr-phone-only { display: inline; color: var(--text-muted); font-weight: 500; }
3819
+ .names-wrap { overflow-x: visible; }
3820
+ /* The 860px floor below 560px was for a table a reader drags sideways; cards need none. */
3821
+ .names-wrap table.data.fixed { display: block; table-layout: auto; min-width: 0; width: 100%; }
3822
+ .names-wrap table.data.fixed colgroup,
3823
+ .names-wrap table.data.fixed thead { display: none; }
3824
+ .names-wrap table.data.fixed tbody { display: block; }
3825
+ .names-wrap table.data.fixed tr {
3826
+ /* The right column holds at most 55% of the card, so a risk with two bands wraps between them instead
3827
+ of squeezing the name and the status until a word breaks inside itself. */
3828
+ display: grid; grid-template-columns: 22px minmax(0, 1fr) fit-content(55%);
3829
+ grid-template-areas: "tw name risk" "tw status actions";
3830
+ align-items: center; column-gap: 8px; row-gap: 6px; padding: 10px 8px;
3831
+ border-bottom: 1px solid var(--border-hairline);
3832
+ }
3833
+ .names-wrap table.data.fixed tr.group-head { display: block; padding: 0; }
3834
+ .names-wrap table.data.fixed td { display: block; padding: 0; border: 0; min-width: 0; }
3835
+ .names-wrap table.data.fixed td.clr-td-twisty { grid-area: tw; align-self: start; }
3836
+ .names-wrap table.data.fixed td.clr-td-name { grid-area: name; }
3837
+ .names-wrap table.data.fixed td.clr-td-risk { grid-area: risk; text-align: right; align-self: start; }
3838
+ .names-wrap table.data.fixed td.clr-td-status { grid-area: status; min-width: 76px; }
3839
+ .names-wrap table.data.fixed td.col-actions { grid-area: actions; }
3840
+ .names-wrap table.data.fixed td.clr-td-status:empty,
3841
+ .names-wrap table.data.fixed td.clr-td-risk:empty { display: none; }
3842
+ .names-wrap table.data.fixed td.col-actions .row-actions-box,
3843
+ .names-wrap table.data.fixed td.col-actions .row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
3844
+ .names-wrap table.data.fixed td.col-actions button.row-open { width: auto; white-space: nowrap; padding: 8px 12px; }
3845
+ .names-wrap table.data.fixed tr.read-row { background: var(--surface-sunken); }
3846
+ .names-wrap table.data.fixed tr.read-row > td { background-color: transparent; }
3847
+ /* The Retired tab's searches as cards too: the name and Restore on the top line, the status beneath. */
3848
+ .table-wrap table.data.clr-retired-table { display: block; min-width: 0; width: 100%; }
3849
+ .table-wrap table.data.clr-retired-table thead { display: none; }
3850
+ .table-wrap table.data.clr-retired-table tbody { display: block; }
3851
+ .table-wrap table.data.clr-retired-table tr.row {
3852
+ display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name actions" "status status";
3853
+ align-items: start; column-gap: 8px; row-gap: 6px; padding: 10px 8px; border-bottom: 1px solid var(--border-hairline);
3854
+ }
3855
+ .table-wrap table.data.clr-retired-table tr.row > td { display: block; padding: 0; border: 0; min-width: 0; }
3856
+ .table-wrap table.data.clr-retired-table td.clr-td-name { grid-area: name; }
3857
+ .table-wrap table.data.clr-retired-table td.clr-td-status { grid-area: status; }
3858
+ .table-wrap table.data.clr-retired-table td.col-actions { grid-area: actions; }
3859
+ }
3860
+
3861
+
3862
+ /* HOW SOON (board Urgent clearance, approved 2026-11-25): two options side by side in Which search's
3863
+ chosen-card style, stacked on a phone. */
3864
+ .nc-how-soon .nc-how-soon-note { margin: 0; }
3865
+ .nc-speed-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
3866
+ /* The look of a Which search row (.pick-row), under its own name so nothing that counts the searches counts these. */
3867
+ .nc-speed {
3868
+ display: flex; align-items: flex-start; gap: 10px; text-align: left; font: inherit; color: inherit; cursor: pointer;
3869
+ padding: 13px 15px; border-radius: 10px; border: 1px solid var(--border-hairline); background: var(--surface-raised);
3870
+ }
3871
+ .nc-speed:hover { border-color: var(--accent-ink); }
3872
+ .nc-speed-on { border-color: var(--accent); background: var(--accent-wash); }
3873
+ .nc-speed-off { background: var(--surface-sunken); border-style: dashed; cursor: default; }
3874
+ .nc-speed-off:hover { border-color: var(--border-hairline); }
3875
+ .nc-speed-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
3876
+ .nc-speed-label { color: var(--text-strong); font-size: 14px; }
3877
+ .nc-speed-line { color: var(--text-body); font-size: 13px; }
3878
+ .nc-speed-note { color: var(--text-muted); font-size: 12.5px; line-height: 1.45; }
3879
+ @media (max-width: 560px) { .nc-speed-pair { grid-template-columns: 1fr; } }
@@ -36,8 +36,8 @@
36
36
  chosen anywhere in the product holds everywhere in it.
37
37
  -->
38
38
  <script>(function(){try{var t=localStorage.getItem('cordillera-theme');if(t==='dark'||t==='light')document.documentElement.setAttribute('data-theme',t);}catch(e){}})();</script>
39
- <script type="module" crossorigin src="/portal/assets/index-qNDhqCw9.js"></script>
40
- <link rel="stylesheet" crossorigin href="/portal/assets/index-CxAkJXIT.css">
39
+ <script type="module" crossorigin src="/portal/assets/index-DEkVU2FD.js"></script>
40
+ <link rel="stylesheet" crossorigin href="/portal/assets/index-W6SAoDkS.css">
41
41
  </head>
42
42
  <body>
43
43
  <div id="root"></div>
@@ -2,7 +2,7 @@
2
2
  "name": "portal-ui",
3
3
  "private": true,
4
4
  "type": "module",
5
- "version": "0.7.0",
5
+ "version": "0.8.0-beta.0",
6
6
  "license": "AGPL-3.0-only",
7
7
  "description": "The unified trademark portal UI. One address, one login: who you are decides what you see. Built as a static bundle, served by driver/portal-service.mjs — the browser never reaches profile-service or recipe-service.",
8
8
  "engines": {
@@ -119,7 +119,7 @@ export function envelopeFromTurnText(text, toolName) {
119
119
  */
120
120
  export async function runJxTurn({ body, turn, kind, started, truncatedCause, parse }) {
121
121
  const t0 = Number.isFinite(started) ? started : Date.now();
122
- const blank = { tookMs: 0, model: null, vendor: null, authMode: null, cloud: null, usage: null };
122
+ const blank = { tookMs: 0, model: null, vendor: null, authMode: null, cloud: null, usage: null, speed: null };
123
123
  if (typeof turn !== "function") return { ok: false, cause: `${kind}: no turn runner was supplied`, ...blank };
124
124
 
125
125
  const { prompt, toolName } = promptFromRequest(body);
@@ -135,6 +135,8 @@ export async function runJxTurn({ body, turn, kind, started, truncatedCause, par
135
135
  // cache and total tokens from the rollup, and a zeroed object in place of null would report a
136
136
  // measurement nobody took. Tokens only — never currency.
137
137
  usage: r?.usage ?? null,
138
+ // The turn's speed record, whole, as the driver's turn runner handed it over; null where none was.
139
+ speed: r?.speed ?? null,
138
140
  };
139
141
  if (!r?.ok) return { ok: false, cause: r?.cause || `${kind}: the turn did not complete`, ...attribution };
140
142
  // The truncation degrade, carried across the transport change. It was `stop_reason: "max_tokens"` on
@@ -1,5 +1,9 @@
1
1
  # trademark-oauth-mcp-bridge
2
2
 
3
+ ## 0.8.0-beta.0
4
+
5
+ No changes in this release.
6
+
3
7
  ## 0.7.0
4
8
 
5
9
  No changes in this release.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trademark-oauth-mcp-bridge",
3
- "version": "0.7.0",
3
+ "version": "0.8.0-beta.0",
4
4
  "license": "AGPL-3.0-only",
5
5
  "private": true,
6
6
  "description": "OAuth 2.1 MCP stdio bridge used by the engine's case-law gather stage (courtlistener / legaldatahunter).",
@@ -491,6 +491,16 @@ const httpsUrlOrNull = (v) => {
491
491
  // Map a raw Signa record → the NEUTRAL normalized shape the driver + skill consume. officeHint = the
492
492
  // office of the synthetic ref the caller cited (keeps cited==logged); record's jurisdiction_code is the
493
493
  // fallback (Signa records carry an ISO jurisdiction_code directly, so no office map is needed).
494
+ /**
495
+ * A FILING'S RECORD FROM THE SEARCH ROW THE RUN ALREADY HOLDS. A Signa search answer carries the whole trademark record,
496
+ * and a Knockout never makes the separate record fetch, so its page had no record to open and no logo to draw. The row is
497
+ * read with the same normaliser the record fetch uses and marked as a search result; nothing is asked of the register,
498
+ * and a field the row lacks stays missing. Null for a row with no record in it. PURE.
499
+ */
500
+ export function recordFromSearchRow(row) {
501
+ return row?.raw && typeof row.raw === "object" ? { ...normalizeRecord(row.raw, row.office || null), _source: "search_row" } : null;
502
+ }
503
+
494
504
  export function normalizeRecord(rec, officeHint = null) {
495
505
  if (!rec || typeof rec !== "object") return rec;
496
506
  const office = officeHint || rec.jurisdiction_code || rec.office_code || "xx";
@@ -951,23 +961,55 @@ export function skippedChannels(body, requested) {
951
961
  // back is kept only if it opens as an image (mark-logos.mjs). A record with no such link asks nothing (`notTried`). In a test of 2026-11-17 the link opened without a key and charged no credits; the
952
962
  // answer's own credits header is ledgered all the same, as every call's is.
953
963
  const IMAGE_ENDPOINT = "GET /v1/trademarks/{id}/media/{id}";
954
- export async function doMarkImage(base, link, tctx) {
964
+ export async function doMarkImage(base, link, tctx, { sleep = pause } = {}) {
955
965
  let url;
956
966
  try { url = new URL(String(link ?? "")); } catch { return { ok: false, notTried: true, cause: "the record names no image link" }; }
957
967
  if (url.protocol !== "https:" || url.host !== new URL(base).host)
958
968
  return { ok: false, notTried: true, cause: "the record's image link is not on this register's own host" };
959
- const t0 = Date.now();
960
- let resp, bytes;
961
- try {
962
- resp = await fetch(url, { headers: { Accept: "image/*" }, signal: AbortSignal.timeout(30_000) });
963
- bytes = Buffer.from(await resp.arrayBuffer());
964
- } catch (e) {
965
- logCall(tctx, { http_status: resp?.status ?? 0, ok: false, attempts: 1, took_ms: Date.now() - t0, bytes: 0, cache_hit: false, endpoint: IMAGE_ENDPOINT, credits_charged: null });
966
- return { ok: false, cause: `the request threw: ${String(e?.message ?? e).slice(0, 120)}` };
969
+ // ASKED ONCE MORE, AT MOST (owner, 2026-11-26: at most one extra image request per failed logo). Only where the register
970
+ // says the failure is retryable, or a server error comes with no body to read, after the searches' own 1.5-second pause.
971
+ let last = null;
972
+ for (let attempt = 1; attempt <= 2; attempt++) {
973
+ const t0 = Date.now();
974
+ let resp, bytes;
975
+ try {
976
+ resp = await fetch(url, { headers: { Accept: "image/*" }, signal: AbortSignal.timeout(30_000) });
977
+ bytes = Buffer.from(await resp.arrayBuffer());
978
+ } catch (e) {
979
+ logCall(tctx, { http_status: resp?.status ?? 0, ok: false, attempts: attempt, took_ms: Date.now() - t0, bytes: 0, cache_hit: false, endpoint: IMAGE_ENDPOINT, credits_charged: null });
980
+ return { ok: false, cause: `the request threw: ${String(e?.message ?? e).slice(0, 120)}` };
981
+ }
982
+ logCall(tctx, { http_status: resp.status, ok: resp.ok, attempts: attempt, took_ms: Date.now() - t0, bytes: bytes.length, cache_hit: false, endpoint: IMAGE_ENDPOINT, credits_charged: creditsCharged(resp) });
983
+ if (resp.ok) return { ok: true, bytes, contentType: resp.headers.get("content-type") };
984
+ last = { status: resp.status, bytes };
985
+ if (attempt === 2 || !worthAskingAgain(resp.status, bytes)) break;
986
+ await sleep(1500);
967
987
  }
968
- logCall(tctx, { http_status: resp.status, ok: resp.ok, attempts: 1, took_ms: Date.now() - t0, bytes: bytes.length, cache_hit: false, endpoint: IMAGE_ENDPOINT, credits_charged: creditsCharged(resp) });
969
- if (!resp.ok) return { ok: false, cause: `HTTP ${resp.status}` };
970
- return { ok: true, bytes, contentType: resp.headers.get("content-type") };
988
+ return { ok: false, cause: imageFailureCause(last.status, last.bytes) };
989
+ }
990
+
991
+ /** Whether a failed image is asked once more: the register's error says it is retryable, or a 5xx has no JSON body. PURE. */
992
+ export function worthAskingAgain(status, bytes) {
993
+ let body = null;
994
+ try { body = JSON.parse(Buffer.from(bytes ?? []).toString("utf8")); } catch { body = null; }
995
+ const err = body && typeof body === "object" ? (body.error && typeof body.error === "object" ? body.error : body) : null;
996
+ if (err && typeof err.retryable === "boolean") return err.retryable;
997
+ return status >= 500 && !err;
998
+ }
999
+
1000
+ /**
1001
+ * Why an image request failed, as the register said it: its status and, where the body is Signa's JSON error, the
1002
+ * error's `type` and `detail` and whether it called itself retryable, where a bare "HTTP 503" says neither which part of
1003
+ * the register failed nor whether asking again could help. PURE.
1004
+ */
1005
+ export function imageFailureCause(status, bytes) {
1006
+ let body = null;
1007
+ try { body = JSON.parse(Buffer.from(bytes ?? []).toString("utf8")); } catch { body = null; }
1008
+ const err = body && typeof body === "object" ? (body.error && typeof body.error === "object" ? body.error : body) : null;
1009
+ const one = (v) => String(v ?? "").replace(/\s+/g, " ").trim().slice(0, 160);
1010
+ const parts = [err?.type ? one(err.type) : null, err?.detail ? one(err.detail) : null,
1011
+ typeof err?.retryable === "boolean" ? (err.retryable ? "retryable" : "not retryable") : null].filter(Boolean);
1012
+ return parts.length ? `HTTP ${status}: ${parts.join(" — ")}` : `HTTP ${status}`;
971
1013
  }
972
1014
 
973
1015
  // ── Record fetch ─────────────────────────────────────────────────────────────────────────────────
package/scripts/README.md CHANGED
@@ -20,6 +20,7 @@ The axis is *what the script assumes exists*, not where it happens to be run.
20
20
  | `report-print-check.mjs` | Shows what the exported PDF actually renders under print media. Run by CI. |
21
21
  | `report-offline-render-check.mjs` | Opens every demo report, from disk and served under the portal's report policy, and every pool index, and fails on any request to another machine or an embedded font that did not load. Run by CI. |
22
22
  | `report-overflow-check.mjs` | Checks the same two kinds of report for sideways overflow on screen — the print check cannot see a width, because print sets the watermark to `display:none` and the watermark was the overflow. Kept outside this repository. |
23
+ | `readme-pictures.mjs` | Retakes the README's three portal pictures from this checkout's own demo: New clearance, a finished report and its conflict landscape. By hand, whenever a change alters one of those screens; see `docs/assets/README.md`. |
23
24
  | `portal-lifecycle-check.mjs` | Asks whether the portal names a brand owner and whether a person can manage their searches. Run by CI. |
24
25
  | `portal-strings.mjs` | Reads every string the portal can show out of its source, as a reader meets it. `--check <approved list>` refuses a string on a screen that is neither approved nor in `portal-ui/strings-backlog.json`; `--backlog-shrinks --base <ref>` refuses a backlog line the base did not have. The approved list is kept with the designs, outside this repository. CI runs the backlog half. |
25
26
  | `validate-profiles.mjs` | Validates a customer-config store's profile bundles. Read-only. |
@@ -188,6 +189,7 @@ row that names a file this folder does not hold.
188
189
  | `mint-plugin-folder.mjs` | by hand |
189
190
  | `mint-public-residue.mjs` | by hand |
190
191
  | `mint-reference-strip-backlog.mjs` | by hand |
192
+ | `mint-result-shapes.mjs` | by hand |
191
193
  | `mint-search-level-tags.mjs` | by hand |
192
194
  | `mint-source-pin-census.mjs` | by hand |
193
195
  | `mint-suite-census.mjs` | CI |
@@ -234,6 +236,7 @@ row that names a file this folder does not hold.
234
236
  | `report-header-render-check.mjs` | CI |
235
237
  | `report-offline-render-check.mjs` | CI |
236
238
  | `report-print-check.mjs` | CI |
239
+ | `readme-pictures.mjs` | by hand |
237
240
  | `report-screenshot.mjs` | by hand |
238
241
  | `report-sections-render-check.mjs` | CI |
239
242
  | `report-theme-render-check.mjs` | CI |
@@ -223,7 +223,7 @@ export const NOT_COUNTED_EVENTS = {
223
223
  // wrong, a question re-asked or an attempt repeated, so it does not bear on "first time" (515).
224
224
  // The target moved off this line to the run's own, above: the bar is about a run and this span is
225
225
  // one stage of it.
226
- "knockout-sweep-total", "level-scope-note",
226
+ "knockout-plain-language", "knockout-sweep-total", "level-scope-note",
227
227
  "named-band-merged", "named-band-remerged", "late-evidence", "one-shot-stamp-settled", "order-probe", "output-snapshot", "owner-screen-derived",
228
228
  "placement-borderline", "placement-form-written", "plan-execution", "plan-execution-census",
229
229
  "plan-execution-refresh", "plan-qids-deferred",
@@ -238,7 +238,7 @@ export const NOT_COUNTED_EVENTS = {
238
238
  "register-presence-skipped", "register-xcheck", "register-xcheck-decided", "run-integrity",
239
239
  "scope-facts", "scope-frontmatter", "scope-ledger-derived", "scope-ledger-skipped", "screen-gate-clean", "screen-gate-evidence",
240
240
  "seam-reapplied", "search-policy", "searched-jurisdictions", "senior-rights", "skip",
241
- "stage-contract", "stage-limit-derived", "stage-stamps-reconciled", "start", "supplemental-fold", "token-rollup",
241
+ "speed-rollup", "stage-contract", "stage-limit-derived", "stage-stamps-reconciled", "start", "supplemental-fold", "token-rollup",
242
242
  "turnaround-reconciliation", "uncovered-market-rows", "unit-band-seeded-empty", "verdict", "verdict-conditions-followed", "verdict-conditions-recorded", "verdict-floors-pass", "verdict-frontmatter",
243
243
  "verdict-recomputed-steps-withdrawn", "whatif-settled-on-archive", "write-up-forms",
244
244
  ],