clearotron 0.7.0-beta.4 → 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 +162 -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 +22 -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 +8 -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
@@ -9,13 +9,13 @@ file rather than a courtesy.
9
9
  production tree; `--check` fails when it no longer matches. Development dependencies are excluded:
10
10
  they are not distributed, so they carry no obligation for anyone who installs this.
11
11
 
12
- 176 packages.
12
+ 179 packages.
13
13
 
14
14
  > **Declared but NOT INSTALLED, so not distributed and not attributed below:** `@cfworker/json-schema`.
15
15
  > npm lists these with no version and no path — an unmet or optional peer. Recorded because a name
16
16
  > silently missing from this file reads the same as one that was never declared.
17
17
 
18
- > **Declaring a licence but shipping no licence file:** `binary@0.3.0`, `chainsaw@0.1.0`, `isarray@1.0.0`, `saxes@5.0.1`.
18
+ > **Declaring a licence but shipping no licence file:** `binary@0.3.0`, `chainsaw@0.1.0`, `isarray@1.0.0`, `omggif@1.0.10`, `saxes@5.0.1`.
19
19
  > The declaration is reproduced below; there is no notice text to reproduce with it.
20
20
 
21
21
  ---
@@ -2811,6 +2811,40 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2811
2811
  SOFTWARE.
2812
2812
  ```
2813
2813
 
2814
+ ## jpeg-js@0.4.4
2815
+
2816
+ - **Licence declared:** `BSD-3-Clause`
2817
+ - **Repository:** https://github.com/eugeneware/jpeg-js
2818
+ - **Licence file:** `LICENSE`
2819
+
2820
+ ```
2821
+ Copyright (c) 2014, Eugene Ware
2822
+ All rights reserved.
2823
+
2824
+ Redistribution and use in source and binary forms, with or without
2825
+ modification, are permitted provided that the following conditions are met:
2826
+
2827
+ 1. Redistributions of source code must retain the above copyright
2828
+ notice, this list of conditions and the following disclaimer.
2829
+ 2. Redistributions in binary form must reproduce the above copyright
2830
+ notice, this list of conditions and the following disclaimer in the
2831
+ documentation and/or other materials provided with the distribution.
2832
+ 3. Neither the name of Eugene Ware nor the names of its contributors
2833
+ may be used to endorse or promote products derived from this software
2834
+ without specific prior written permission.
2835
+
2836
+ THIS SOFTWARE IS PROVIDED BY EUGENE WARE ''AS IS'' AND ANY
2837
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2838
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2839
+ DISCLAIMED. IN NO EVENT SHALL EUGENE WARE BE LIABLE FOR ANY
2840
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2841
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2842
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2843
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2844
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2845
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2846
+ ```
2847
+
2814
2848
  ## json-schema-traverse@1.0.0
2815
2849
 
2816
2850
  - **Licence declared:** `MIT`
@@ -4699,6 +4733,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4699
4733
  SOFTWARE.
4700
4734
  ```
4701
4735
 
4736
+ ## omggif@1.0.10
4737
+
4738
+ - **Licence declared:** `MIT`
4739
+ - **Repository:** https://github.com/deanm/omggif
4740
+ - **Licence file:** none shipped
4741
+
4702
4742
  ## on-finished@2.4.1
4703
4743
 
4704
4744
  - **Licence declared:** `MIT`
@@ -4925,6 +4965,35 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4925
4965
  SOFTWARE.
4926
4966
  ```
4927
4967
 
4968
+ ## pngjs@7.0.0
4969
+
4970
+ - **Licence declared:** `MIT`
4971
+ - **Repository:** git://github.com/pngjs/pngjs
4972
+ - **Licence file:** `LICENSE`
4973
+
4974
+ ```
4975
+ pngjs original work Copyright (c) 2015 Luke Page & Original Contributors
4976
+ pngjs derived work Copyright (c) 2012 Kuba Niegowski
4977
+
4978
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4979
+ of this software and associated documentation files (the "Software"), to deal
4980
+ in the Software without restriction, including without limitation the rights
4981
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
4982
+ copies of the Software, and to permit persons to whom the Software is
4983
+ furnished to do so, subject to the following conditions:
4984
+
4985
+ The above copyright notice and this permission notice shall be included in
4986
+ all copies or substantial portions of the Software.
4987
+
4988
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4989
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
4990
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
4991
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
4992
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
4993
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
4994
+ THE SOFTWARE.
4995
+ ```
4996
+
4928
4997
  ## process-nextick-args@2.0.1
4929
4998
 
4930
4999
  - **Licence declared:** `MIT`
package/build-info.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "commit": "9e95c9d5d165996deeef9e96262debd3b8dab998",
3
- "version": "0.7.0-beta.4"
2
+ "commit": "10ba73b208425fac64c303d7f19808f07225996e",
3
+ "version": "0.8.0-beta.0"
4
4
  }
@@ -3190,7 +3190,7 @@
3190
3190
  "url": "https://qdro.com/company-qdro/VE/"
3191
3191
  },
3192
3192
  {
3193
- "title": "FDA points to liver injury with Amgen's Tavneos",
3193
+ "title": "FDA points to liver injury with Tavneos",
3194
3194
  "url": "https://pharmaphorum.com/news/fda-points-liver-injury-amgens-tavneos"
3195
3195
  },
3196
3196
  {
@@ -28,6 +28,23 @@ each its own. The ops face is never on the internet. If you are looking for the
28
28
  use, it is the Client face. The API-key door is that same client face reached with a credential instead of a
29
29
  browser login — see "The API-key door" below.
30
30
 
31
+ ## What each tool answers
32
+
33
+ Every tool lists the shape of its answer as an `outputSchema` and returns that answer as
34
+ `structuredContent`, beside the same text block as before. A host that reads only the text sees no
35
+ change. The shapes are in `mcp-server/result-shapes.json`, one entry per tool, so a change to an answer
36
+ shows in a diff of that file.
37
+
38
+ - A tool whose answer differs by session has two entries: `client` for sessions on the Client face and the
39
+ API-key door, whose answers are the scrubbed cut, and `staff` for every other session.
40
+ - The six tools that change something (`start_run`, `stop_run`, `feed_context`, `what_if_run`,
41
+ `mark_sent`, `ack_event`) add an `outcome` field that says whether it happened. A refusal answers
42
+ `outcome: "refused"`, with the refusal's sentence in `reason`.
43
+ - The six report readers (`brief`, `list_findings`, `get_finding`, `list_evidence`, `list_searches`,
44
+ `get_search_coverage`) add a `document` field naming the report document version they read, such as
45
+ `report-document/clearance-1`, or null where they read the run's own files.
46
+ - A list goes out under `items`, because a structured answer is an object.
47
+
31
48
  ## The two principals outside your staff
32
49
 
33
50
  **`user` — a run-bound report link.** A read-only token pinned to one run, no enumeration. The scope
@@ -8,9 +8,9 @@ written down here rather than left in a commit message.
8
8
  |---|---|---|
9
9
  | `clearotron-banner-light.svg` | The README masthead, light scheme | Hand-made brand source |
10
10
  | `clearotron-banner-dark.svg` | The same masthead for `prefers-color-scheme: dark` | Hand-made brand source |
11
- | `portal-clearance-report.jpg` | A finished clearance report — verdict, risk band, the four answers | Portal screenshot |
12
- | `portal-conflict-landscape.jpg` | Findings placed by mark similarity against goods proximity, with rights-holders by jurisdiction | Portal screenshot |
13
- | `portal-new-clearance.png` | The intake screen — classes, marketplaces, search depth | Portal screenshot |
11
+ | `portal-clearance-report.jpg` | A finished clearance report — verdict, risk band, the four answers | Clearotron 0.8.0, taken on its line before the first beta: `node scripts/readme-pictures.mjs` |
12
+ | `portal-conflict-landscape.jpg` | Findings placed by mark similarity against goods proximity, with rights-holders by jurisdiction | Clearotron 0.8.0, taken on its line before the first beta: `node scripts/readme-pictures.mjs` |
13
+ | `portal-new-clearance.png` | The intake screen — classes, marketplaces, search depth | Clearotron 0.8.0, taken on its line before the first beta: `node scripts/readme-pictures.mjs` |
14
14
 
15
15
  ## Two things worth knowing before changing anything here
16
16
 
@@ -23,6 +23,22 @@ quietly showing a hole.
23
23
  not produces a page whose image cannot load — a defect that shipped here once already, and one the test
24
24
  above now asserts against directly rather than leaving to review.
25
25
 
26
+ ## Retaking the three portal pictures
27
+
28
+ `portal-new-clearance.png`, `portal-clearance-report.jpg` and `portal-conflict-landscape.jpg` show the
29
+ portal, so they go stale whenever it changes. One command retakes all three from this checkout's own demo:
30
+
31
+ ```sh
32
+ npm run build:ui
33
+ node scripts/readme-pictures.mjs
34
+ ```
35
+
36
+ It starts the demo in a throwaway home, signs in, and captures New clearance, the demo's Global
37
+ preliminary search report, and that report's conflict landscape. The captures are in the light theme at
38
+ 1,332 × 778 CSS pixels and device scale 1.5. It writes over the three files here and prints the line for
39
+ the table above. Only the committed demo is on screen. Run it whenever a change alters one of those
40
+ screens or regenerates `demo/`, look at each picture before committing it, and never edit one by hand.
41
+
26
42
  ## Adding one
27
43
 
28
44
  Put the file here, embed it in the document that needs it, and add a row above. A new image **type**
@@ -1,5 +1,167 @@
1
1
  # clearotron-driver
2
2
 
3
+ ## 0.8.0-beta.0
4
+
5
+ ### Minor Changes
6
+
7
+ - New: In the portal, each full conflict card of a clearance or Knockout report has a "Copy link" control beside "Ask AI about this finding", which copies an address that opens the report at that card.
8
+ - New: On a clearance report's conflict cards, the registered logos sit in a frame labelled "Register", so a reader can tell where those pictures come from.
9
+ - New: On a clearance report's conflict chart, pointing at a dot or moving keyboard focus to it shows that conflict's mark, rating, owner and country beside it, and a screen reader hears the same.
10
+ - Fixed: On Claude, a step stopped at its time limit while still working now resumes where it was. Before, Claude refused to resume it, and the step's retry was used up on that refusal.
11
+ - New: On a wide or laptop screen, pressing a conflict number in a clearance report's verdict opens that conflict's card in a panel beside the text, so the reader keeps their place; on a laptop the report's column narrows to make room.
12
+ - Fixed: Two companies, or two organisations under Generic, that order the same mark and classes on the same day each get their search. Only the same account's repeat order is held as a duplicate, and its notice names only that account's earlier order.
13
+ - New: On a Knockout report, each register filing's card shows that filing's registered logo in a frame labelled "Register", where the run fetched one.
14
+ - Fixed: A Knockout resumed after a failed attempt now carries on from the step that failed. It used to run every step again from the reading of the order, which could frame the order differently the second time.
15
+ - Fixed: On an installation that uses Signa, a logo image the register could not serve for a moment is asked for once more, so fewer cards lose a logo to a brief outage.
16
+ - New: An order marked Urgent is quoted at 30 minutes to 1 hour for a clearance and 3 to 6 minutes for a Knockout, and counts as two searches against the account's daily and monthly allowance. Where the installation's AI service has no faster setting, the order runs at Standard and counts as one search. With one search left today, an Urgent order is refused with "1 search left today." rather than run at Standard.
17
+ - New: The Clearances list shows each company, family, name and search on its own row, on a desktop and on a phone. A name with one report has an "Open report" button, a name with several opens its latest report, and each earlier search opens its own report.
18
+
19
+ New: Find a name, then narrow the list under Filters by company, search type, sort order and company grouping. Each filter in force shows as a chip that removes it.
20
+
21
+ New: "Group names" makes a family from names in one company, and a family's menu adds names or ungroups it. Retiring a search, or every search of a name, asks first and says what moves. The Retired tab lists each retired search with Restore, and a failed search restores to Failed.
22
+ - For operators: an order retried with the id of one that was already refused, parked or finished is no longer queued a second time. `enqueue` exits 3, as it already did for an order still waiting, and prints what became of the first order: its state, the reason it was refused, and its run id. The connector's `start_run` refuses the retry and says the same.
23
+ - Fixed: "Expand all" and "Collapse all" reach every fold of a clearance or Knockout report, the register records' term lists included; the key's common-law row no longer runs its label under its count; and a PDF's folded-list header counts only the cards it prints.
24
+ - New: A running search's card on Home now lists every step by name, ticking those done and marking the one in progress, in place of a row of unlabelled bars.
25
+
26
+ New: A Global preliminary or Multi-country focus search now names its sixth step "Checking the conclusions" on Home, in the Clearances list and in its status, since neither search reads case law.
27
+ - New: Installation settings now groups its sources under Needed and Optional, so a source a search can run without no longer reads as a fault, and the common-law row says a Knockout search can still run while its key is missing.
28
+
29
+ New: A row on Installation settings that the setup wizard fixes now shows its command, with a Copy button, beside the Setup guide.
30
+ - New: New clearance folds the company's settings into one line with a "Change" button, and Which search shows the chosen search with the other three behind "All four searches"; every control is still there.
31
+
32
+ New: On an installation that cannot read a brief, New clearance no longer offers a box to write one in, so typing starts at Names to clear.
33
+ - New: New clearance has a How soon choice below Which search. Standard is chosen by default, and Urgent runs the same search on the AI fast mode setting, at increased cost, and uses 2 searches. Each option shows its turnaround and how many searches it uses, and the footer and the review show the chosen one. Where the installation's AI service has no faster setting, Urgent is shown but cannot be chosen, and says why. With one search left today, Urgent cannot be chosen either, and says "1 search left today." beside its cost.
34
+
35
+ New: The footer's Uses figure says how many searches the account has left today.
36
+ - Fixed: The README's three pictures of the portal show today's screens, taken from the demo: New clearance, a finished report, and its conflict landscape.
37
+ - New: Once a reader scrolls past a report's header, it becomes one pinned row with the section links, Ask AI, Export and a "Search history" button listing the name's other searches. Where the window is too narrow for that row, the whole header stays pinned instead.
38
+
39
+ New: The label over a report's other searches now reads "Search history", and the list tells apart two reports of one day by their time, marks the latest report and shows a search still running.
40
+ - Fixed: On an installation that uses Signa, a Knockout report's listed filings open their register record, read from the search the run already holds, so the report asks the register nothing more.
41
+ - New: When a search finishes or stops while the portal's tab is out of view, the tab's title leads with a count, such as "(1)", until the tab is looked at again.
42
+ - New: In a clearance report, the folded list of lower-rated conflicts has a "Show all" control with its count at the right of its header, and looks like a pile of cards while folded, so it is harder to miss.
43
+ - Fixed: A clearance report's list of web and marketplace names prints every name its count includes, links each one only to a web address, opening in a new tab, and no longer lists a search note as a name.
44
+ - Fixed: In the dark theme, the addresses in a clearance report's list of web and marketplace names are drawn in the page's link colour instead of dark red on the dark background.
45
+
46
+ ### Patch Changes
47
+
48
+ - Fixed: On an install that names its workspaces with its own prefix, the portal's run list now shows the searches in progress there. It used to show none of them, while the connector listed them.
49
+ - Fixed: The portal's list of retired searches shows retired searches only. It used to show every search still waiting to start as well.
50
+
51
+ ## 0.7.0
52
+
53
+ ### Minor Changes
54
+
55
+ - New: On a clearance report, each conflict now opens its cited registrations with the register's own record, before the analysis. A closed "Register record" drop-down lists, for each registration, the mark and its type, the goods and services, the owner and the owner's country, the country, the status with its dates, and the register number. Goods show in English: the register's own where it has it, otherwise the provider's machine translation, marked as one. A card lists up to eight registrations and points to the audit workbook for the rest. Drop-down titles now read clearly in the dark theme.
56
+ - New: A clearance report shows the logo of each cited registration that has one, on a line of its own under the owner, captioned with its register. The logo is saved with the search and carried inside the report. A row in "Marks that can coexist" shows up to three small logos.
57
+ - New: On a Knockout report, each listed filing whose record the search saved opens it in a "Register record" drop-down under its row, with the same facts a clearance report shows. A filing with a logo shows it under the mark name.
58
+ - New: On a clearance report, full cards stay for the conflicts that set the report's risk. The conflicts rated lower become short cards behind one closed heading, such as "7 more conflicts rated Manageable", and are left out of the exported PDF unless you tick them. Each short card still opens to its full detail.
59
+ - New: The data file published beside each report now names which of its two shapes it is: `report-data/clearance-1` for a clearance, `report-data/knockout-1` for a Knockout. Each shape has a JSON Schema in the documentation, so a firm building its own screens on the data can check a file against it. Reports published before this keep `report-data/1`: a published file is never rewritten.
60
+ - New: An exported clearance PDF now prints each ticked conflict whole, with its register record and reasoning, and every other part of the report as it reads on screen: a section you left closed prints its heading only. A Knockout PDF still prints everything open.
61
+
62
+ ### Patch Changes
63
+
64
+ - Fixed: An assistant connected to a clearance, asked what was searched, now gets the searches the report lists under "Left open", and only those. It listed a follow-up search that the report leaves out because another open row already reports that search. It left out the native-script searches the report lists as not completed, and now names them with the places they count.
65
+ - Fixed: A client's assistant connected to Clearotron now gets instructions that match what the connector does. It reads a report's own product and coverage before describing the work, and no longer calls every search a preliminary one. It is no longer asked for a requester key or offered a model choice that its account cannot set, and no longer claims a native-language reading on searches that never run one. A report link for a Knockout screen is now pointed to the brief and the report for its findings, which the findings list there cannot show. The reader of an order's brief is now told to leave the choice of search to the person ordering it when more than one would fit.
66
+ - Fixed: When an order fails before its search starts, or is refused before it runs, the notice now reaches an integration whose access is limited to that order's company, as notices about started searches already did. A client who placed the order is told that the search was not started, without the technical reason.
67
+ - Fixed: The connector's evidence list now says a register record was retrieved when the search fetched and saved it. A finding that named its registration but carried no link of its own was listed as not retrieved, as though it rested on the write-up alone, although the record had been fetched. A link now counts only when it names the saved record exactly: a registration whose number merely begins with a saved one's no longer reads as retrieved. On the sample searches, 17 records now read as retrieved.
68
+ - For operators: A step that starts a fresh model session now receives its manuals in its opening message, on both engines. It used to be told which manual files to read, and opened each one itself. A resumed session is not sent them again. Each attempt's record in the run log lists the manuals it carried.
69
+ - Fixed: A Knockout of close variations no longer risks rating each name alone. The intake must now say which names belong together, listing unrelated names on their own, before its plan is saved. Before, a plan that left the groups out was accepted, and every name was then rated in isolation. Once a plan is saved, a correction to one of its fields or one of its names is now accepted on its own, where before it was refused.
70
+ - Fixed: A Knockout report now lists, under "Left open" on a name's page, a register search for that name that got no answer. Before, the failure showed only as "not available" in the counts table, and a name whose other searches found filings read as if it had been searched in full. A register count that gets no answer is now asked once more before it is left open, so a dropped connection no longer leaves a gap on its own.
71
+ - Fixed: Each name in a Knockout now opens with its overall rating and the goods or services the rating is for, and says how the advice differs for other goods. Before, a name's first paragraphs could describe the name and its market without giving the rating, so a reader could not tell which of the requested goods the rating applied to.
72
+ - Fixed: A Knockout search of several names is rated sooner. Close variations of one name are rated together, and every other name on its own, all at the same time, rather than all in one long step.
73
+ - Fixed: An assistant opened on a Knockout report link now reads the name's findings in the brief and the delivered report. It no longer asks for finding cards that a Knockout does not have.
74
+ - Fixed: A Knockout is delivered sooner. Its review now checks the report's facts against their sources and how its findings on registered marks are rated. A report the review corrected is not reviewed a second time. A passing web mention with no sign of trade no longer gets a card of its own.
75
+ - Fixed: An assistant connected to a Knockout now gets the report's own answers. Asked what was searched, it now lists what each name's report lists under "Left open", in the same words and for that name. It no longer calls searched a register reading that stopped part-way, or a name whose automated research was unavailable. Asked for a finding by an identifier the list of findings gave it, it was told the finding did not exist. It now gets the finding, the register filing with its record, or the search that found nothing. Both answers describe the report as it was published, until it is published again.
76
+ - Fixed: On a Knockout report, a listed filing whose register record shows a logo now shows that logo under the mark name, where the installation's register serves logos. Before, the search never fetched a logo for a Knockout's filings: it looked for their records only where a clearance keeps them.
77
+ - Fixed: A Knockout of the same order now asks the market the same questions every time it runs. Each name is searched as written, with its words joined, and with its words hyphenated, together with one use phrase taken from the request. A name the client gives a different use keeps its own phrase. Before, the spellings and the use words were chosen afresh on every run, so a listing found only under the hyphenated spelling could be missed.
78
+ - Fixed: Where a logo could not be fetched, the report no longer draws a dashed "Logo not retrieved" box in its place. It shows nothing there, on a clearance report's cards and rows and in a Knockout's filings table. The card's "Register record" still gives the mark's type and register number.
79
+ - Fixed: On a clearance for named countries, the audit workbook's register searches were headed "vendor register, worldwide". They are now headed "REGISTER", and the rows beneath say where each search ran.
80
+ - Fixed: A search ordered while the worker is idle now starts within a few seconds. It used to wait for the worker's next check, up to 90 seconds later, wherever the worker is started by `clearotron start` rather than by systemd, which includes every Mac.
81
+ - Fixed: A large search no longer slows down each time a step looks up a register record the search has already fetched. On the largest searches these lookups could add several minutes, and a search that had fetched a very large number of records could fail to find them at all.
82
+ - Fixed: On a large clearance, a register record's text could show a garbled character (�) where the record holds an accented or non-Latin letter. Records now keep every letter as the register holds it.
83
+ - Fixed: A register search that stops answering partway through a clearance is no longer run again at full cost; the searches it could not finish are delivered as left open.
84
+ - Fixed: The steps that write a report now follow one set of writing rules. The summary and every line a reader sees first are asked for in plain words a client reads, with no sentence over 25 words, while the detail behind a fold keeps its legal language. Before, the same rules were stated several times and disagreed about who the reader was.
85
+ - Fixed: On a phone, a report's labelled rows now put each label above its text, so the verdict, the reasons, the request details and the searched lists use the full width of the screen instead of a narrow column. Wider screens and the exported PDF are unchanged.
86
+ - Fixed: A clearance report no longer names a local script as searched without saying where its search did not complete. When a script was searched in some territories and not in others, Left open names those territories, or counts them with the full list when there are four or more. It also says when a planned worldwide search in that script did not complete, and when a planned search in it did not complete and its territory was not recorded.
87
+ - Fixed: A local-script search that named no territory of its own is now read with the matter's territories, as it was sent to the register. Left open no longer says its territory was not recorded when the matter records it.
88
+ - Fixed: Logos now reach the report on both registers. A cited registration on a clearance report, and a listed filing on a Knockout report, shows its logo where its register record shows one. Before, an installation on Clarivate had its logo requests refused, so a logo's place read "Logo not retrieved", and an installation on Signa never fetched a logo.
89
+ - Fixed: Stopping a search now stops its spending. A Knockout stopped while it read the register went on to search its filings' owners on the web, a paid search each, until the service itself was stopped. Now a stopped search, Knockout or clearance, starts no further register request, web search or record fetch, and ends as stopped. A request already under way still finishes, and a stop pressed once the report is being published does not prevent its delivery, as before.
90
+ - Fixed: An order now searches the same register office however it spells a territory, on Signa, Corsearch and Clarivate. "UK" searches the UK register as "GB" and "United Kingdom" do, "INT" searches WIPO's international register, and "EM" searches the EU register on Signa as it already did on the other two. Names such as "England", "Holland" and "Czech Republic" are recognised instead of being reported as an unknown territory. Before, a Signa installation reported a "UK" or "EM" order as not searched, a Corsearch installation sent "UK" where the other spellings sent "GB", and a Clarivate search could refuse a name such as "Singapore".
91
+ - Fixed: When an order's id is too long, the refusal now states the 128-character limit and the id's own length. Before, it named only the allowed characters, so a caller could not tell what to fix.
92
+ - Fixed: A what-if memo is now offered only on a delivered clearance report whose findings can be read, never on a search still running, one stopped or never delivered, or a Knockout screen. A request outside that is declined when it is asked rather than after it was accepted. Asking to re-run a step of a delivered report now points to the memo instead of only refusing.
93
+ - Fixed: When the review withdraws a finding, an open coverage row that still cites it is now sent back to the writer for correction before delivery. Such a row could otherwise print under "Left open" with the withdrawn finding's owner, though the report carries no card for that finding.
94
+ - Fixed: The portal's About page now names the bracket mark, the product's own mark, in its trade-mark notice. It used to name a mountain mark that the product does not carry.
95
+ - Fixed: An assistant placing an order through the connector now tells the requester the search is submitted, not that it is starting, and confirms it only once the order has been accepted. It reports a start only once the search has a status of its own, and checks that status rather than reading silence as progress.
96
+ - Fixed: An earlier right that could not be rated, because its record does not show which goods it covers, no longer drops out of the report. It is listed under "Left open" on the report page and in the audit workbook, with the right named and the reason it could not be rated, and it is not counted among the rated conflicts.
97
+ - Fixed: When a report's overall assessment could not be completed, its "Left open" list states a shared reason once, followed by the searches it covers. It printed the same sentence once for every search.
98
+ - Fixed: On clearance and Knockout reports, the band word on a risk pill and the small grey labels now meet the WCAG AA contrast minimum, in both themes and in print. Pills on the lighter bands print dark text, where they printed white.
99
+ - Fixed: A clearance's "conditional on" list no longer includes three notes the search wrote about its own steps, such as "the lawyer judged a material slice not fully cleared" or "follow-ups left open this run". Those notes stay in the run's own record. Nothing is written in their place, and the report, the portal, the email and the assistant's summary all leave them out.
100
+ - Fixed: A clearance report now names a country where it printed a bare code, such as AR, CO or CZ. The names show in the rows of where the mark stands and when you point at a country's chip. The register counts also read EU and UK where they printed the register's own EM and GB, and two counts for one country show as one.
101
+ - Fixed: Wherever a register search is told how to narrow a crowded result, it is now pointed to the section that holds those steps. The register guides now say that the coverage record is where a market the register cannot reach is recorded and disclosed.
102
+ - Fixed: In the dark theme, the section link for the part of the report you are reading can now be read. It printed near-black on the dark bar, on clearance and Knockout reports alike.
103
+ - Fixed: When nothing on an install can search yet, `clearotron doctor` now ends as it opens: with the sentence that says what is missing and the command that sets it up, before its list of what is still unfinished.
104
+ - Fixed: Each step of a clearance is now given only the instructions for its own part of the work. A register or marketplace step no longer receives instructions written for another step, and the review that checks the gathered findings is given its instructions directly instead of being told to open a file.
105
+ - Fixed: In a clearance report, every link to a finding now leads to it. Links from the rights-holders key, the chart and the rating's finding numbers reach findings shown as a one-line row or ruled out, and the link to the common-law findings reaches them. The rating no longer cites a withdrawn finding the report does not show.
106
+ - Fixed: A Knockout conflict card now cites a register filing by its office and number, such as EU 018765432, linked to the office's own page where it has one. It printed the register service's internal record path, which opens nothing, while the filings table on the same page already named the filing this way.
107
+ - Fixed: A Knockout report labels things as a clearance report does. The links under a conflict read "Sources:", where they read "Evidence:", which the clearance uses only for how well a value is evidenced. The fold that argues a rating is "Risk assessment", and the rating line reads "Overall risk" followed by the framework's name.
108
+ - Fixed: A Knockout report now lists under "Left open" each register search that did not complete, and each name whose automated research was unavailable, as a clearance report does. A name whose register search failed no longer reads as a clean name.
109
+ - Fixed: A Knockout report's export menu offers "Download full audit (Excel)", as a clearance report's does. The page referred readers to the audit workbook and gave no way to open it.
110
+ - Fixed: On a phone, a Knockout report's risk scale no longer prints its band words on top of one another. It shows the scale's two end words, and the pill above the needle names the name's own band.
111
+ - Fixed: "Left open" no longer lists an unfinished register search twice when the search records which kind of search it was and one open row already reports it. Where the record cannot say which search a row is, both rows stay.
112
+ - Fixed: A clearance report no longer says "the name searched in local script" in its summary. Under "What was searched", "Local-script spellings" now rests on searches of the name in a non-Latin script that completed, and reads Not searched when the search's record shows none did. A report without that record makes no claim either way.
113
+ - Fixed: A clearance now fetches logos only for the registrations its report draws, at most eight per finding. A finding citing more registrations no longer pays the register for logos that no page shows.
114
+ - Fixed: A link the assessment writes into a report now shows as a link, not as bracketed text with its address. This covers the ruled-out names, the coverage notes left open and the mark assessment on a clearance report, the Knockout's assessment, and the same paragraphs in the portal. Bold, italic and code read the same way on both reports.
115
+ - Fixed: A worldwide clearance report lists the Chinese-, Japanese- and Korean-script register equivalents it did not search as one item under "Left open", with the offer of the native-language investigation once. It listed three near-identical items.
116
+ - Fixed: On a clearance report, "What happens next" now comes directly after the verdict, before the conflicts, so a reader who forwards the first pages forwards the actions too. Its words are unchanged, and the section links at the top follow the new order.
117
+ - Fixed: On a clearance report, a single conflict rated below the report's risk now sits behind its own closed heading, "1 more conflict rated Manageable", like several do, where it printed as a full card.
118
+ - Fixed: On New clearance, taking a company's places down to one country no longer drops that country too. Where showed Worldwide while the bar below still named the company's full list, and the search could not be ordered until the reader added back a country they had kept. The country left now stays, and Where and the bar name it.
119
+ - Fixed: A clearance report's "Left open" list groups its items under their state, such as "Partially covered" or "Open item", with a count for each group. Every item is still listed.
120
+ - Fixed: A report's "Left open" list reads in plain words. A search not run is "Not searched", the list's heading is "Next steps & monitoring" alone, and a question from the client's request is headed "Question from the request", not by an internal label. A source left unsearched, and a full native-language search that ran only its first step, each say so in one plain sentence. Under a conflict, "If enforced:" no longer ends "for the client to consider", and the client's own marks are cited as "Search of the client's own marks."
121
+ - Fixed: On a Knockout of several names, each name's page no longer repeats its full assessment in a "Read the full assessment" fold under the one it opens with.
122
+ - Fixed: A register record now names the language of the goods it holds for registrations from Signa, and for Clarivate's Chinese, Greek and Swedish records. On a phone, a Knockout filing's register record and the counts card's close-variations line now fit the screen without scrolling sideways.
123
+ - Fixed: On clearance and Knockout reports, each finding's title is now a heading, so a screen reader can move from finding to finding, and the report's content is marked as the page's main region. A report also stops scrolling smoothly when the reader's system asks for reduced motion. The page looks the same.
124
+ - Fixed: A clearance report's footer no longer ends with the "Rated under" and "Run under project" lines. They showed only when the report file was opened outside the portal. The run keeps both facts in its own record.
125
+ - Fixed: On a clearance report, the section links at the top now use each heading's own words: Summary, What happens next, Conflicts, Also considered and What was searched. Conflicts opens the list of conflicts, not the chart above it. The fold under the answer is labelled "What this depends on", and the section of marks that can sit beside yours is headed "Marks that can coexist".
126
+ - Fixed: On a worldwide clearance report, "Where searched" in About this request gives the number of focus territories, and the full list moves to "What was searched". Places where nothing was found read as one list of names, not a chip each with codes past twelve. "XS" reads "US state registers", and the unspecified code "ZZ" no longer appears in these lists. Each conflict's export checkbox and the conflict chart now have names a screen reader announces.
127
+ - Fixed: A printed or exported report no longer ends a page on a section heading whose content starts the next page. A report's page source also no longer carries the developers' stylesheet notes, which made each report about 17 KB larger.
128
+ - Fixed: A report exported to PDF now prints on A4 paper. It followed the browser's own paper setting, which could be Letter.
129
+ - Fixed: Setup now picks the one AI it finds ready on the machine as the default. When the free tier's EU credential is skipped, it offers the US-only register instead of leaving none. It asks for the USPTO download key before offering to build the US index, and says a US index not built yet is only present, not that its check passed. It says nothing about the EU register when the chosen register has no EU half. `clearotron run` with nothing after it, or with `--help`, now says how to run a clearance from a job file. In the portal, a suggested search names the project when the places came from the project, and removing all of a company's places shows Worldwide. A project that lists fewer marketplaces than its company can now be saved; the company's marketplaces are still searched. A company's run limits read "Runs a day" and "Waiting at once".
130
+ - Fixed: Setup that ends with no AI chosen now says so at the end, as it does for a missing register, with the one command that adds one. Pressing Enter at every question still installs nothing.
131
+ - Fixed: Setup's closing lines now suggest a knockout search on the EU register as the first real clearance, as the Quickstart does, in place of a multi-country search that takes hours. The example job it names ships with the package.
132
+ - Fixed: On a clearance report, the Similarity meter no longer prints an evidence word under it, matching the audit workbook. The other meters keep theirs.
133
+ - Fixed: A link written into the opening paragraphs of the report's assessment of the mark now shows as a link, as it already did in the rows below them, instead of as markup.
134
+ - Fixed: The audit workbook's Coverage & gaps sheet now lists every gap the report leaves open. A local script that was not searched in some territories is listed with those territories, and the Summary's count of open coverage includes it.
135
+ - Fixed: An unfinished search the report lists once is now one row on the audit workbook's Coverage & gaps sheet, not two, and that row keeps the reason the search did not complete.
136
+ - Fixed: In the audit workbooks, the Knockout's long text columns are now wide enough to read. A search left over its limit no longer shows an internal identifier in its note. The Use column no longer says a website's evidence was checked against the register, and a value nobody checked now reads "not checked", as the report says.
137
+ - Fixed: The audit workbook now uses the report's words. Each driver says how its value is evidenced as the report does: "verified", "not yet verified", "inferred" or "not checked", with no evidence word under Similarity. Coverage notes open with "Partially covered" or "Not searched", the main search is "main register search", and the coverage block is headed "How coverage was judged". The Knockout workbook's Audit Trail no longer shows the engine's call number, timing and OK/Degraded columns.
138
+ - Fixed: On New clearance, removing every one of a company's places now leaves the bar below saying what Where says. Where read Worldwide while the bar still named the places the reader had removed.
139
+ - Fixed: The Chinese-language review now reads the Chinese register records the search found, with their goods where held, so a conflict it spots in them can reach the report instead of only a suggestion to search further.
140
+ - New: The Clearances list shows which kind of search is behind each name: a tag under the name for each kind it has (KO, Prelim, Multi or Full), with the search's full name on hover. A new filter beside the status filter shows one kind of search at a time, and each name then shows the result of that kind of search.
141
+ - Fixed: The configuration reference now has a row for every setting the product reads. It used to leave out about one setting in two, among them the portal, profile and recipe services' ports and sign-in settings and the delivery retry timings, so a reader who looked one up there could conclude it did not exist.
142
+ - Fixed: An assistant connected to a clearance now gets the report's own answers about a finding and about what was searched. Asked about a finding, it was given the owner, status and classes the assessment wrote, even where the report showed different ones from the register's saved record. It now gets the ones the report shows, with each registration the finding cites listed separately. Asked what was searched, it listed a row twice that the report shows once. A Knockout's answer about what was searched now uses the register results the report was published with.
143
+ - Fixed: A clearance's cover email now states the same rating as its report. Where the assessment did not complete, the report states no rating, but the email still gave one, and the "Only you can close these" box that goes with a conditional rating. Both came from a verdict saved by the unfinished assessment. The email now gives no rating, and lists what the report lists under "Before you can rely on this result", under that heading, where the report lists anything there. On a report whose saved verdict predates the derived rating, the email used the label written into the report and now uses the rating the report derives. A Knockout's cover email now states the same register counts as its report: a Knockout resumed after its report was published could email counts the report showed as not available.
144
+ - Fixed: In the dark theme, the outline that shows which control has keyboard focus was a dark red that was hard to see against the page, menus and dialogs. It is now a lighter red that stands out on all of them. The portal also marks its main content area, so a screen reader can jump straight to it.
145
+ - For operators: `clearotron doctor` now makes one real call to the configured AI engine, on its cheapest model, and fails when the engine refuses it. An install whose engine sign-in had stopped working passed the check while every new search was refused.
146
+
147
+ For operators: The background service now checks its AI engine when it starts and after seven days without a successful engine call, and `clearotron status` shows a check that failed. `CLEAROTRON_ENGINE_CHECK_ROUTINE` sets that interval, such as 12h or 30d, or turns it off.
148
+
149
+ For operators: A failed engine check also leaves one event in the outbox for the installation's operator, with no order and no requester. An integration that delivers outbox events should leave it pending; the next passing check removes it.
150
+
151
+ Fixed: When the engine is refused over its billing setting, `clearotron doctor` names the setting and no longer prints its value, which could be a pasted key.
152
+ - Fixed: The Knockout audit workbook heads each conflict's links "Sources", the word its page uses for the same list, in place of "Evidence".
153
+ - Fixed: Every text column in the Knockout audit workbook is now wide enough to read, including what each search returned and each conflict's mark, owner and risk band. The clearance workbook's owner and result columns widen with them.
154
+ - For operators: An installation given its own name in the brand-name setting now shows that name throughout the portal: in the logo, in the browser tab, and in every sentence that names the installation, such as "Remove from …" on the access screens. An installation that sets no name still shows Clearotron, and the sentences that said "this Clearotron" now say "Clearotron".
155
+ - New: Under "What was searched", "Local-script spellings" names the non-Latin scripts in which a search of the name completed. Under "Left open", the report names any planned script in which no search completed.
156
+ - New: When a connected assistant asks for a clearance report, the report text it receives now lists what the search left open under "Left open", as the report page does. That includes an earlier right that could not be rated, and a script in which no search completed. New reports no longer carry a separate Methodology note, which the page never showed. Reports already delivered keep theirs.
157
+ - Fixed: A Knockout report published without a public address, such as the sample report the demo ships, now offers its audit workbook from the export menu, as the clearance reports do.
158
+ - New: The four sample reports the demo serves are fresh runs on this version, so they show a report as it reads today: each cited registration opens with its register record, and its logo where the register holds one, and the sample Knockout lists the register filings it found.
159
+ - Fixed: A clearance's exported PDF prints its verdict caption whole again, without the "What this depends on" label. With the print option that opens only the ticked cards, the caption had printed only its first sentence.
160
+ - Fixed: A worldwide report now names ARIPO, OAPI and Kosovo where its list of places where nothing was found printed the codes AP, OA and XK.
161
+ - Fixed: When a search's record cannot confirm whether the full-depth native-language search ran, the report's "Left open" list now says so in one plain sentence and treats that search as not done. The sentence used to be written in the engine's internal terms.
162
+ - Fixed: On a worldwide clearance, the coverage line now states how many offices the register service searched and names the ordered markets it does not cover, such as "Japan, the Philippines, Indonesia and Vietnam not covered". Each of those markets is listed as not searched. The line read "registers: worldwide", whatever the service reached.
163
+ - Fixed: A worldwide search now lists the Chinese-, Japanese- and Korean-script register searches it did not run under "Left open". It did not when the account's default territories included none of those markets.
164
+
3
165
  ## 0.7.0-beta.4
4
166
 
5
167
  ### Patch Changes
@@ -45,7 +45,7 @@ import {
45
45
  import {
46
46
  resolveAuthMode, billingMode, billingRefusalReason, cloudName,
47
47
  } from "./engine/auth.mjs";
48
- import { billingRefusalWords } from "./run-requirements.mjs"; // — a refusal that quotes the billing word says it by name
48
+ import { billingRefusalWords, RESEARCH_ENV } from "./run-requirements.mjs"; // — a refusal that quotes the billing word says it by name; the research key a search refuses without
49
49
  import { CASELAW_BRIDGES } from "./engine/mcp/gather-config.mjs"; // — the list that decides what is spawned
50
50
  import { existsSync, readFileSync, statSync } from "node:fs";
51
51
  import { join } from "node:path";
@@ -189,6 +189,16 @@ export function engineMode(inventory, { probe = null } = {}) {
189
189
  * capability each instance either has or lacks, so it is one row naming the selected provider — or
190
190
  * naming none, which is itself a missing row and the state a fresh install is in.
191
191
  */
192
+ // ── WHICH SOURCES A SEARCH REFUSES TO RUN WITHOUT, the one answer Installation settings groups by ──────
193
+ //
194
+ // `needed` is true where at least one search refuses to start without the source, which is what the
195
+ // order door's own requirements say (run-requirements.mjs): the register, which every search reads, and
196
+ // the research key, RESEARCH_ENV, which the three clearance searches refuse without (a Knockout runs and
197
+ // says so on its report). Everything else a search runs without and discloses: the Chinese marketplace
198
+ // key and every case-law source. Read off the adapter's own credential name, so a research adapter that
199
+ // is not the one the door asks for is optional by the same rule.
200
+ const neededBySearch = (adapter) => [adapter?.credEnv, ...(adapter?.credEnvAlso ?? [])].includes(RESEARCH_ENV);
201
+
192
202
  export function providerInventory(env = process.env) {
193
203
  const rows = [];
194
204
 
@@ -206,6 +216,7 @@ export function providerInventory(env = process.env) {
206
216
  // With no provider selected there is no credential to be missing, and the thing to set is the
207
217
  // selector itself. `activeProvider` throws on an unknown id, so that case names the selector too.
208
218
  missing: register ? shown(missingCredentials(register, env)) : shown(["CLEAROTRON_DATABASE"]),
219
+ needed: true, // every search reads a register, and the order door refuses without one
209
220
  });
210
221
 
211
222
  for (const [group, label, table] of [
@@ -224,6 +235,7 @@ export function providerInventory(env = process.env) {
224
235
  known: true,
225
236
  configured: missing.length === 0,
226
237
  missing: shown(missing),
238
+ needed: neededBySearch(adapter),
227
239
  });
228
240
  }
229
241
  }
@@ -233,7 +245,8 @@ export function providerInventory(env = process.env) {
233
245
  // Appended to the SAME list, so every reader of this inventory gets them with no edit: the config
234
246
  // screen renders rows generically, the flag snapshot carries whatever this returns, and the doctor
235
247
  // reads the same function. A separate list would be the hand-kept census this issue is about.
236
- rows.push(...caseLawInventory(env));
248
+ // Every case-law source is one a search runs without: the report discloses the gap.
249
+ rows.push(...caseLawInventory(env).map((r) => ({ ...r, needed: false })));
237
250
  return rows;
238
251
  }
239
252
 
@@ -82,6 +82,8 @@ export const DEV_COCKPIT_JOB_FIELDS = Object.freeze({
82
82
  + "from its own form and writes no sidecars, so it may not claim that shape.",
83
83
  forwarderDomain: "the cockpit's assembler defaults it; a dev form has no forwarding domain to state.",
84
84
  provider: "which register vendor answers is the dev instance's own configuration, not a form field.",
85
+ urgent: "an Urgent order. The order screens and the connector carry it with its count of searches; this dev "
86
+ + "form has no such option, and a dev job that needs one is written as a job file.",
85
87
  name: "the pre-markName spelling of the search subject. The form posts `mark`.",
86
88
  use: "the pre-goods spelling of the goods description. The form posts `goods`.",
87
89
  tmp: "the pre-ref spelling of the reference number. The form posts `ref`.",
@@ -56,8 +56,17 @@
56
56
  * is 1 for every job any door will admit, so the removed term was 1 on every quote that has ever
57
57
  * been stored. No version-3 quote in any run record holds a number this table would not reproduce.
58
58
  * The bump is the shape rule being followed, not a figure being corrected.
59
+ * 6 — an Urgent order (ruling 2026-11-25): the same search on the AI service's faster setting. It counts
60
+ * as two searches against an allowance and quotes its own ruled turnaround row. No weight moved and
61
+ * the work units are untouched, because the work is the same; the count and the quote moved.
59
62
  */
60
- export const UNITS_VERSION = 5;
63
+ export const UNITS_VERSION = 6;
64
+
65
+ /**
66
+ * HOW MANY SEARCHES AN URGENT ORDER COUNTS AS (ruling 2026-11-25). One constant, read by the quote and by
67
+ * admission alike, so "uses 2" is the number shown and the number charged.
68
+ */
69
+ export const URGENT_SEARCHES = 2;
61
70
 
62
71
  // The grid-cell budgets, restated from profiles.mjs (SAFE_GRID_CELLS / DENSE_GRID_CELLS) rather than
63
72
  // imported: this module is the SERVER half of a twin whose other half is a browser bundle, and it is kept
@@ -86,6 +95,8 @@ export const DENSE_GRID_CELLS = 16;
86
95
  * offering has one toggle and the engine routes it from the territories in scope.
87
96
  * registerCounts register filing counts per name. The knockout's, and only there.
88
97
  * territories the resolved scope. Length 1 is the deep-dive increment.
98
+ * urgent the order runs on the AI service's faster setting. Not machinery: the same search,
99
+ * the same work. It moves only the count and the turnaround row.
89
100
  */
90
101
  const leversOf = (l) => ({
91
102
  pipeline: l?.pipeline === "knockout" ? "knockout" : "clearance",
@@ -93,6 +104,7 @@ const leversOf = (l) => ({
93
104
  nativeLanguage: Boolean(l?.nativeLanguage),
94
105
  registerCounts: Boolean(l?.registerCounts),
95
106
  territories: Array.isArray(l?.territories) ? l.territories : [],
107
+ urgent: l?.urgent === true,
96
108
  });
97
109
 
98
110
  /** Which pipeline these levers describe. There is no third answer: "no-search" went with the levers that
@@ -144,6 +156,13 @@ export const gridCalls = (i) => Math.ceil(variantCount(i.levers) / batchSize(i.p
144
156
  export const runCount = (i) =>
145
157
  deriveMode(i.levers) === "knockout" ? 1 : Math.max(1, Number(i.names) || 0);
146
158
 
159
+ /**
160
+ * WHAT THE ORDER COUNTS AGAINST AN ALLOWANCE: its searches, twice over when Urgent. Kept apart from
161
+ * `runCount` on purpose: `runCount` scales the WORK (`effortRaw` multiplies by it), and an Urgent search
162
+ * is the same work run faster, so folding Urgent into it would double the units and the bar.
163
+ */
164
+ export const searchesCounted = (i) => runCount(i) * (leversOf(i.levers).urgent ? URGENT_SEARCHES : 1);
165
+
147
166
  /**
148
167
  * The weights. PLACEHOLDERS — the register share is the one that moved (2026-07-21): registers carry a
149
168
  * base of 14 and 2 per class, which is what puts a clearance's register half where a client would expect
@@ -256,10 +275,15 @@ export const TURNAROUND_QUOTE = Object.freeze({
256
275
  // delivered when the ruling was made: 4-6 minutes, against 45 quoted. So 5-10 is closer to the measured
257
276
  // wall than 15 was, and a range that spans it says something a single figure cannot.
258
277
  knockout: Object.freeze({ lowHours: 5 / 60, highHours: 10 / 60 }),
278
+ // — URGENT, ONE RULED ROW PER PIPELINE (ruling 2026-11-25): 0.5 to 1 hour for a clearance, 3 to 6
279
+ // minutes for a Knockout. A row of its own, looked up like the two above: not a factor applied to them.
280
+ clearanceUrgent: Object.freeze({ lowHours: 0.5, highHours: 1 }),
281
+ knockoutUrgent: Object.freeze({ lowHours: 3 / 60, highHours: 6 / 60 }),
259
282
  });
260
283
 
261
284
  /** Which row of the table a job's levers select. The ONLY place that choice is made. */
262
- export const quoteBoundsFor = (l) => TURNAROUND_QUOTE[deriveMode(l) === "knockout" ? "knockout" : "clearance"];
285
+ export const quoteBoundsFor = (l) =>
286
+ TURNAROUND_QUOTE[`${deriveMode(l) === "knockout" ? "knockout" : "clearance"}${leversOf(l).urgent ? "Urgent" : ""}`];
263
287
 
264
288
  /**
265
289
  * The bounds for THIS job. The ruled range, and NOTHING is done to it.
@@ -315,6 +339,9 @@ export function turnaround(i) {
315
339
  const lo = Math.round(lowHours * 60), hi = Math.round(highHours * 60);
316
340
  return lo === hi ? `~${hi} min` : `${lo}–${hi} min`;
317
341
  }
342
+ // A range that starts under an hour and ends at one or more says each bound in its own unit: the Urgent
343
+ // clearance row reads "30 min–1 hour", never "0.5–1 hours".
344
+ if (lowHours < 1) return `${Math.round(lowHours * 60)} min–${fmtHours(highHours)} ${highHours === 1 ? "hour" : "hours"}`;
318
345
  if (lowHours === highHours) return `~${fmtHours(highHours)} ${highHours === 1 ? "hour" : "hours"}`;
319
346
  return `${fmtHours(lowHours)}–${fmtHours(highHours)} hours`;
320
347
  }
@@ -331,7 +358,7 @@ export function turnaround(i) {
331
358
  * `components` is the search-policy block (registerProbe / jxLanes / commonLawGrid) — the engine's own
332
359
  * statement of what the run will do, not a second opinion about it.
333
360
  */
334
- export function leversFromResolved({ pipeline, components, caseLaw = false, territories = [] } = {}) {
361
+ export function leversFromResolved({ pipeline, components, caseLaw = false, territories = [], urgent = false } = {}) {
335
362
  const c = components ?? {};
336
363
  const knockout = pipeline === "knockout";
337
364
  return {
@@ -340,6 +367,7 @@ export function leversFromResolved({ pipeline, components, caseLaw = false, terr
340
367
  nativeLanguage: Boolean(c.jxLanes),
341
368
  registerCounts: knockout && Boolean(c.registerProbe),
342
369
  territories: Array.isArray(territories) ? territories : [],
370
+ urgent: urgent === true,
343
371
  };
344
372
  }
345
373
 
@@ -356,10 +384,12 @@ export function quoteEffort(input) {
356
384
  return {
357
385
  unitsVersion: UNITS_VERSION,
358
386
  pipeline: deriveMode(i.levers),
387
+ urgent: i.levers.urgent,
359
388
  raw: Number(effortRaw(i).toFixed(4)),
360
389
  units: effortUnits(i),
361
390
  costBand: costBand(i),
362
- searches: runCount(i),
391
+ // What the order counts against an allowance, Urgent included: the number admission charges.
392
+ searches: searchesCounted(i),
363
393
  checksPerName: checksPerName(i.platforms),
364
394
  gridCalls: deriveMode(i.levers) === "knockout" ? 0 : gridCalls(i),
365
395
  turnaroundHours: turnaroundHours(i),
@@ -45,6 +45,14 @@ ladder consumes it without knowing which engine produced it ([gateway.mjs](../ga
45
45
  // null = nothing was observed, never the requested alias
46
46
  providerWire: string | null, // PROVIDER GAUGE — the program's own word for who served the turn
47
47
  // ("firstParty", "foundry"); null = not said, or said inconsistently
48
+ speed: Speed, // SPEED GAUGE — what the turn asked for beside what the program
49
+ // reported serving (engine/speed.mjs): { requested: "standard"|"fast",
50
+ // standardBecause, served, basis: "reported"|"unknown", calls, state,
51
+ // disabledReason, notice }. `requested` is what was sent: a turn asked
52
+ // for fast on a model with no faster setting sends standard, and
53
+ // `standardBecause` says so ("model-not-fast"). Claude reports each
54
+ // call's `usage.speed` and its fast_mode_state; Codex reports none, so
55
+ // served is null and basis "unknown" on every turn, fast or not
48
56
  signals: { stalled?, noProgress?, hardWall?, rateLimited?, rateLimitBasis?, resetsAt?,
49
57
  resetsAtBasis?, usageStreamed?, noStreamEvents?, thought: bool|null },
50
58
  // THINKING GAUGE — see below.