clearotron 0.6.0-beta.1 → 0.7.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 (110) hide show
  1. package/INSTALL.md +7 -4
  2. package/QUICKSTART.md +1 -0
  3. package/README.md +5 -2
  4. package/THIRD-PARTY-NOTICES.md +1 -1
  5. package/bin/clearotron.mjs +4 -2
  6. package/bin/onboard.mjs +158 -29
  7. package/build-info.json +2 -2
  8. package/docs/CLIENT-MCP.md +3 -1
  9. package/docs/DELIVERY.md +6 -3
  10. package/docs/architecture/02-architecture.md +1 -1
  11. package/docs/branding.md +4 -4
  12. package/docs/report-data/clearance-1.schema.json +320 -0
  13. package/docs/report-data/knockout-1.schema.json +268 -0
  14. package/driver/CHANGELOG.md +103 -0
  15. package/driver/connotation-search.mjs +1 -1
  16. package/driver/contract-e3-backlog.mjs +1 -1
  17. package/driver/coverage-ledger.mjs +18 -2
  18. package/driver/deferral-row.mjs +1 -1
  19. package/driver/degraded-parts.mjs +1 -0
  20. package/driver/driver.config.mjs +4 -3
  21. package/driver/effective-scope.mjs +3 -1
  22. package/driver/engagement-receipt.mjs +3 -3
  23. package/driver/engine/anthropic-agent.mjs +15 -1
  24. package/driver/engine/common.mjs +7 -0
  25. package/driver/engine/mcp/band-server.mjs +7 -16
  26. package/driver/engine/mcp/codex-config.mjs +3 -0
  27. package/driver/engine/mcp/recording-server.mjs +45 -34
  28. package/driver/engine/openai-agent.mjs +74 -7
  29. package/driver/gateway.mjs +67 -10
  30. package/driver/jx.mjs +13 -5
  31. package/driver/manuals-seen.mjs +146 -0
  32. package/driver/mark-logos.mjs +144 -0
  33. package/driver/methodology-witness.mjs +2 -1
  34. package/driver/owner-use-check.mjs +3 -3
  35. package/driver/package.json +1 -1
  36. package/driver/pipeline-knockout.mjs +4 -0
  37. package/driver/pipeline.mjs +92 -7
  38. package/driver/portal-local-auth.mjs +6 -2
  39. package/driver/portal-report.mjs +43 -12
  40. package/driver/portal-routes/me.mjs +4 -1
  41. package/driver/portal-runs.mjs +6 -9
  42. package/driver/profiles.mjs +4 -4
  43. package/driver/publish/README.md +9 -7
  44. package/driver/publish/email-conditions.mjs +2 -2
  45. package/driver/publish/evidence-words.mjs +21 -0
  46. package/driver/publish/index.mjs +104 -90
  47. package/driver/publish/knockout.mjs +75 -49
  48. package/driver/publish/office-record-links.mjs +11 -9
  49. package/driver/publish/page-shell.mjs +98 -0
  50. package/driver/publish/publish-inputs.mjs +4 -0
  51. package/driver/publish/regions.mjs +24 -3
  52. package/driver/publish/register-record.mjs +150 -0
  53. package/driver/publish/render-knockout.mjs +195 -642
  54. package/driver/publish/render.mjs +270 -363
  55. package/driver/publish/report-data.mjs +225 -12
  56. package/driver/publish/strings.mjs +662 -0
  57. package/driver/publish/templates/knockout.css +200 -0
  58. package/driver/publish/templates/report.css +72 -52
  59. package/driver/publish/xlsx.mjs +148 -125
  60. package/driver/record-goods.mjs +42 -0
  61. package/driver/reference-score.mjs +4 -1
  62. package/driver/register-reach.mjs +39 -0
  63. package/driver/registry-fidelity.mjs +3 -8
  64. package/driver/repair-composers.mjs +6 -2
  65. package/driver/repair-targets.mjs +4 -1
  66. package/driver/run-delivered.mjs +6 -1
  67. package/driver/runner.mjs +73 -29
  68. package/driver/scope-facts.mjs +27 -6
  69. package/driver/search-policy.mjs +9 -4
  70. package/driver/stages.mjs +3 -3
  71. package/driver/steps/overview-and-cards.mjs +50 -14
  72. package/driver/steps/verdict-gate.mjs +33 -13
  73. package/driver/suite-census.json +368 -68
  74. package/driver/terminal-clamp.mjs +6 -1
  75. package/mcp-server/CHANGELOG.md +8 -0
  76. package/mcp-server/lib/audit-view.mjs +5 -2
  77. package/mcp-server/lib/brief.mjs +2 -1
  78. package/mcp-server/lib/evidence.mjs +31 -4
  79. package/mcp-server/lib/knockout.mjs +1 -1
  80. package/mcp-server/lib/scrub.mjs +1 -1
  81. package/mcp-server/package.json +1 -1
  82. package/mcp-server/server.mjs +5 -3
  83. package/package.json +4 -1
  84. package/portal-ui/dist/assets/{index-CYaO2ygd.js → index-CtkllKJ2.js} +225 -77
  85. package/portal-ui/dist/assets/{index-izLa9apq.css → index-CxAkJXIT.css} +25 -5
  86. package/portal-ui/dist/index.html +2 -2
  87. package/portal-ui/package.json +3 -3
  88. package/providers/_shared/ledger.mjs +30 -2
  89. package/providers/_shared/record-uri.mjs +15 -0
  90. package/providers/clarivate/src/adapter.js +11 -0
  91. package/providers/clarivate/src/core.js +17 -1
  92. package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
  93. package/providers/oauth-mcp-bridge/package.json +1 -1
  94. package/scripts/README.md +147 -3
  95. package/scripts/e2e-first-time.mjs +3 -3
  96. package/scripts/freeze-example-run.mjs +3 -3
  97. package/scripts/mint-search-level-tags.mjs +61 -0
  98. package/scripts/mint-source-pin-census.mjs +89 -0
  99. package/scripts/release-note-required.mjs +65 -6
  100. package/scripts/test-durations-reporter.mjs +25 -0
  101. package/scripts/test-full.mjs +72 -18
  102. package/scripts/test-run.mjs +18 -1
  103. package/shared/brand.mjs +85 -5
  104. package/shared/inline-markdown.mjs +53 -0
  105. package/shared/portal-tokens.mjs +2 -1
  106. package/shared/register-selection.mjs +8 -3
  107. package/shared/search-level-tags.json +25 -0
  108. package/shared/tools/derive-band-pairs.mjs +10 -0
  109. package/driver/own-rights.mjs +0 -83
  110. package/driver/use-check.mjs +0 -85
package/INSTALL.md CHANGED
@@ -221,11 +221,13 @@ only if nothing else on the machine uses it.
221
221
  `~/.npm/_npx`, beside anything else you have run with `npx`. Deleting `~/.npm/_npx` removes all of them;
222
222
  npm downloads again the next time it is asked.
223
223
  Any `npm install` also keeps what it downloaded in npm's cache, `~/.npm/_cacache`; `npm cache clean --force` empties it.
224
+ npm also writes its own logs to `~/.npm/_logs`.
224
225
 
225
226
  **The settings, and the keys.** `~/.config/clearotron/.env` holds this install's signing secrets, so
226
227
  deleting it invalidates every key it ever issued. Beside it: `~/.config/clearotron/token-denylist`, the
227
228
  list of keys you revoked, and `~/.config/clearotron/running`, a folder holding one small file for each
228
- product running in a terminal.
229
+ product running in a terminal. A second run of setup keeps the previous settings in
230
+ `~/.config/clearotron/.env.bak`. It holds the same keys and secrets, so delete it with `.env`.
229
231
 
230
232
  **Your work.** The install keeps it all under one directory, `~/trademark` by default — wherever
231
233
  `CLEAROTRON_REPORTS_DIR`'s parent points if you moved it:
@@ -239,6 +241,7 @@ product running in a terminal.
239
241
  ~/trademark/config your companies, their projects and your saved searches
240
242
  ~/trademark/config/recipes the saved searches themselves
241
243
  ~/trademark/config/profiles the company profiles
244
+ ~/trademark/config/skills your own versions of the AI's manuals, if you add any
242
245
  ~/trademark/grants.json who may use this install
243
246
  ~/trademark/portal-audit.log what the portal was asked to do
244
247
  ~/trademark/telemetry/trademark-mcp-access.jsonl what a connected assistant asked for, and what it was told
@@ -248,9 +251,9 @@ product running in a terminal.
248
251
  **Keep the pool if you want the reports.** They are finished documents and nothing else reads them: move
249
252
  `~/trademark/pool` somewhere of your own and delete the rest. Deleting the pool deletes the clearances.
250
253
 
251
- **The demo, if you ran one.** `~/trademark-demo` holds the demo's own copy of everything above, including
252
- its own copy of the program under `~/trademark-demo/program`. It is one directory to remove and it shares
253
- nothing with an install.
254
+ **The demo, if you ran one.** `~/trademark-demo` holds the demo's own copy of everything above. When the
255
+ demo runs through `npx`, that includes its own copy of the program, under `~/trademark-demo/program`. It is
256
+ one directory to remove, and it shares nothing with an install.
254
257
 
255
258
  **The background services, if you installed them.** `clearotron stop` removes the four unit files; if you
256
259
  would rather see them, they are in `~/.config/systemd/user`:
package/QUICKSTART.md CHANGED
@@ -55,6 +55,7 @@ Write `job.json`:
55
55
  ```json
56
56
  {
57
57
  "id": "job-2026-0001",
58
+ "ref": "TM-0001",
58
59
  "forwarder": "alex",
59
60
  "forwarderEmail": "alex@example.com",
60
61
  "marks": [{ "ref": "TM-0001", "name": "IRONWHISK", "classes": [9, 42] }],
package/README.md CHANGED
@@ -22,6 +22,8 @@ machine: no gateway, no platform, and nothing about the names you are clearing r
22
22
 
23
23
  ## Install
24
24
 
25
+ Node 22.13 or newer, on macOS, Linux or Windows.
26
+
25
27
  **See it work first, with nothing installed.**
26
28
 
27
29
  ```bash
@@ -46,7 +48,7 @@ keeps it too, and says how to remove it.
46
48
  npx clearotron install
47
49
  ```
48
50
 
49
- Node 22.13 or newer, on macOS, Linux or Windows. It needs no root: it puts the program under `~/.local`, with the
51
+ It needs no root: it puts the program under `~/.local`, with the
50
52
  `clearotron` command in `~/.local/bin`, then asks one question at a time and checks each credential
51
53
  before it saves it. Every command below uses the `clearotron` it installed — the same channel you
52
54
  installed from — so if `~/.local/bin` is not on your `PATH` yet, type the full path,
@@ -90,7 +92,8 @@ clearotron start
90
92
  ```
91
93
 
92
94
  That is the portal everyone at your company uses. Ordering a clearance is the same screen — describe it
93
- in a sentence, or set the classes, marketplaces and search depth yourself:
95
+ in a sentence once an AI is set up (the demo makes no AI calls, so it fills nothing in), or set the classes,
96
+ marketplaces and search depth yourself:
94
97
 
95
98
  ![The new-clearance screen — classes, marketplaces and the four search depths](docs/assets/portal-new-clearance.png)
96
99
 
@@ -2781,7 +2781,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
2781
2781
  IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2782
2782
  ```
2783
2783
 
2784
- ## jose@6.2.15
2784
+ ## jose@6.2.17
2785
2785
 
2786
2786
  - **Licence declared:** `MIT`
2787
2787
  - **Repository:** panva/jose
@@ -172,11 +172,13 @@ const [verb, ...rest] = process.argv.slice(2);
172
172
  // A LIST, NOT A PROBE, and deliberately: asking a child whether it handles --help means RUNNING it,
173
173
  // and two of these verbs spend real money. The list is short, it sits beside VERBS, and a verb added
174
174
  // without an entry gets the dispatcher's answer -- which is the safe direction to be wrong in.
175
- const HELP_FROM_CHILD = new Set(["install", "doctor", "demo", "start", "grant", "key", "passphrase", "sync", "update", "connect", "disconnect", "stop", "status"]);
175
+ const HELP_FROM_CHILD = new Set(["install", "doctor", "demo", "start", "grant", "key", "passphrase", "sync", "update", "connect", "disconnect", "stop", "status", "run"]);
176
176
  if ((rest.includes("--help") || rest.includes("-h")) && !HELP_FROM_CHILD.has(verb)) {
177
177
  console.log(`\n ${invocationPrefix()}clearotron ${verb} — ${SUMMARY[verb]}\n`);
178
178
  console.log(` Options after the verb are passed through to ${VERBS[verb][0]}, which has no --help of`);
179
- console.log(` its own. Run it with no arguments to see what it requires.\n`);
179
+ // NOT FOR `run-queue`, whose bare form drains the queue and spends: the invitation to run it with no arguments
180
+ // is dropped there with nothing in its place (the owner's ruling, 2026-11-18).
181
+ console.log(` its own.${verb === "run-queue" ? "" : " Run it with no arguments to see what it requires."}\n`);
180
182
  if (verb === "run" || verb === "run-queue") {
181
183
  console.log(` THIS SPENDS: hours of model time and real register calls. See INSTALL.md §5 and §6.\n`);
182
184
  }
package/bin/onboard.mjs CHANGED
@@ -564,6 +564,10 @@ export const REGISTER_CHECK_SKIPPED =
564
564
  /** What setup says when the register's credentials pass that check: the register, and the settings it checked. */
565
565
  export const registerCheckPassed = (register, settings) =>
566
566
  `the register credential check passed for "${register}" — checked ${settings}`;
567
+ /** What it says instead when the settings are present but the index they name is not built yet: doctor's own
568
+ * clause, so setup's tick and the warning above it agree that nothing was proved. */
569
+ export const registerCheckPresenceOnly = (settings) =>
570
+ `${settings} present — presence only; add --probe-providers to prove it retrieves`;
567
571
 
568
572
  export function composeEnvBody(candidate, existing = {}, { packaged = PACKAGED } = {}) {
569
573
  // Setup's own answers win: the reader just typed them, and this run is the newer statement.
@@ -686,14 +690,19 @@ export const isExplicitYes = (answer) => String(answer ?? "").trim().toLowerCase
686
690
  * The argv and spawn options for the background build. Returned rather than executed so the shape can
687
691
  * be asserted: detached, its own session, output to a log, and the parent not waiting on it.
688
692
  */
689
- export function backgroundSyncSpec({ repo, dbPath, logFd }) {
693
+ export function backgroundSyncSpec({ repo, dbPath, logFd, apiKey = null }) {
690
694
  return {
691
695
  command: process.execPath,
692
696
  args: [join(repo, "bin", "uspto-sync.mjs"), "--db", dbPath],
693
- options: { cwd: repo, detached: true, stdio: ["ignore", logFd, logFd] },
697
+ // The download key setup was just given reaches the build, which runs before any .env is written.
698
+ options: { cwd: repo, detached: true, stdio: ["ignore", logFd, logFd], ...(apiKey ? { env: { ...process.env, USPTO_API_KEY: apiKey } } : {}) },
694
699
  };
695
700
  }
696
701
 
702
+ /** The question setup asks for the US index's download key, before it offers to build the index. */
703
+ export const usptoApiKeyQuestion = (prefix = invocationPrefix()) => "USPTO_API_KEY — free from the USPTO; getting one needs an ID.me identity check. "
704
+ + `The US index can't be downloaded without it. Press Enter to skip and build it later with \`${prefix}clearotron sync\`.`;
705
+
697
706
  /**
698
707
  * Offer to build the US index now, in the background, and take a real yes for it.
699
708
  *
@@ -705,7 +714,8 @@ export function backgroundSyncSpec({ repo, dbPath, logFd }) {
705
714
  * `deps.spawn` and `deps.statfs` are injectable for the same reason. Defaults are the real ones.
706
715
  */
707
716
  export async function offerUsptoSync(dbPath, io, deps = {}) {
708
- const { ask, say = () => {}, ok = () => {}, info = () => {}, warn = () => {}, problem = () => {} } = io;
717
+ // `euHalf` false on a register with no EU half, which then hears nothing about the EU register.
718
+ const { ask, say = () => {}, ok = () => {}, info = () => {}, warn = () => {}, problem = () => {}, euHalf = true, apiKey = null } = io;
709
719
  let freeBytes = null;
710
720
  try {
711
721
  const statfs = deps.statfs ?? (await import("node:fs/promises")).statfs;
@@ -717,7 +727,7 @@ export async function offerUsptoSync(dbPath, io, deps = {}) {
717
727
  if (!plan.offer) return { started: false, reason: plan.reason };
718
728
 
719
729
  say("");
720
- info("The EU register works as soon as setup finishes — none of this blocks it.");
730
+ if (euHalf) info("The EU register works as soon as setup finishes — none of this blocks it.");
721
731
  info(`The US half needs the index built first: about ${plan.downloadGB} GB downloaded and roughly `
722
732
  + `${plan.hours} hours of ingest, once.`);
723
733
  if (plan.roomWarning) warn(plan.roomWarning);
@@ -735,7 +745,7 @@ export async function offerUsptoSync(dbPath, io, deps = {}) {
735
745
  const openFile = deps.openSync ?? (await import("node:fs")).openSync;
736
746
  const spawnFn = deps.spawn ?? (await import("node:child_process")).spawn;
737
747
  const fd = openFile(logPath, "a");
738
- const spec = backgroundSyncSpec({ repo: REPO, dbPath, logFd: fd });
748
+ const spec = backgroundSyncSpec({ repo: REPO, dbPath, logFd: fd, apiKey });
739
749
  const child = spawnFn(spec.command, spec.args, spec.options);
740
750
  // Detach for real: without unref() the wizard's own exit waits on a six-hour build.
741
751
  child.unref();
@@ -743,7 +753,8 @@ export async function offerUsptoSync(dbPath, io, deps = {}) {
743
753
  info(`Progress: tail -f ${logPath}`);
744
754
  info("It reports each file as it downloads and ingests, and prints the disk it needs before it starts.");
745
755
  info("If it refuses on disk, nothing has been downloaded — point --db somewhere with room and re-run.");
746
- info("Until it finishes, US coverage is DISCLOSED as a deferred gap. The EU half is unaffected.");
756
+ info(euHalf ? "Until it finishes, US coverage is DISCLOSED as a deferred gap. The EU half is unaffected."
757
+ : "Until it finishes, US coverage is DISCLOSED as a deferred gap.");
747
758
  return { started: true, pid: child.pid, logPath };
748
759
  } catch (e) {
749
760
  // A failed spawn is a finding, not a silent skip: the reader has just said yes to a six-hour build
@@ -779,6 +790,8 @@ export const AMBIENT_KEYS = [
779
790
  // for the wizard to find lying around. Offering to adopt one taught a new install to set something
780
791
  // that configures nothing.
781
792
  "PERPLEXITY_API_KEY", "SERPAPI_API_KEY",
793
+ // The US index's download key, asked before the index build is offered.
794
+ "USPTO_API_KEY",
782
795
  ];
783
796
 
784
797
  // ── helpers ──────────────────────────────────────────────────────────────────────────────────────────
@@ -1129,7 +1142,8 @@ export function programDisagreement({ capture, live }, { command = reachableComm
1129
1142
  * on PATH.
1130
1143
  */
1131
1144
  export function installSizeLine(eng) {
1132
- return `${Number.isFinite(eng?.installMB) ? `It takes about ${eng.installMB} MB. ` : ""}To remove it, delete that folder.`;
1145
+ return `${Number.isFinite(eng?.installMB) ? `It takes about ${eng.installMB} MB. ` : ""}To remove it, delete that folder. `
1146
+ + "npm also keeps a copy of the download in its cache, `~/.npm/_cacache`; `npm cache clean --force` empties it.";
1133
1147
  }
1134
1148
 
1135
1149
  /**
@@ -1187,9 +1201,16 @@ export function engineOptions(found = {}) {
1187
1201
  * whose turn failed on one AI and who went back to the menu met row 0 under Enter, which is a change of AI they
1188
1202
  * had not chosen. Remembering the pick saves nothing: the proof turn still decides what is written.
1189
1203
  */
1190
- export function engineMenuDefault(options, lastPick = null) {
1204
+ export function engineMenuDefault(options, lastPick = null, found = {}) {
1191
1205
  const at = lastPick ? options.findIndex((o) => o.id === lastPick) : -1;
1192
- return at < 0 ? 0 : at;
1206
+ if (at >= 0) return at;
1207
+ // THE ONE ENGINE FOUND USABLE, when exactly one is: a copy that runs and is not below the floor. A copy
1208
+ // below the floor, or a setting pointing at a copy that is not there, is not found. Both or neither: row 0.
1209
+ const usable = Object.entries(ENGINE_BINARIES)
1210
+ .filter(([id, e]) => found[id]?.executable && !found[id]?.relative && olderThanFloor(found[id]?.version, e.floor) !== true)
1211
+ .map(([id]) => id);
1212
+ const only = usable.length === 1 ? options.findIndex((o) => o.id === usable[0]) : -1;
1213
+ return only < 0 ? 0 : only;
1193
1214
  }
1194
1215
 
1195
1216
  // A COPY REFUSED AS THE VENDOR'S PLACEHOLDER, told apart by the resolver's own reason for refusing it
@@ -1372,7 +1393,7 @@ export async function preflightCandidate(candidate) {
1372
1393
  // Cache-busted, and that is not a nicety. `REGISTER_PROVIDER` is frozen at the module's FIRST
1373
1394
  // evaluation, so a cached copy answers with whatever provider the first import saw — which makes a
1374
1395
  // second call in the same process, or any process that already imported driver.config, check the
1375
- // wrong provider and pass for the wrong reason. Same trick driver/test/pipeline.mock.test.mjs uses
1396
+ // wrong provider and pass for the wrong reason. Same trick driver/test/pipeline-mock-harness.mjs uses
1376
1397
  // on pipeline.mjs, for the same frozen-at-import reason.
1377
1398
  const bust = `${Date.now()}-${process.hrtime.bigint()}`;
1378
1399
  const { preflightCredentials } = await import(`${pathToFileURL(join(REPO, "driver", "driver.config.mjs")).href}?bust=${bust}`);
@@ -1613,8 +1634,46 @@ export function whatSetupLeft({ copy = null, engine = null, turnRan = false } =
1613
1634
  : `${engine.vendor}'s CLI stays installed in ${engine.dir}.`;
1614
1635
  return `No settings were written. ${stays}${turnRan ? " The AI program's test turn keeps its own files." : ""}`;
1615
1636
  }
1637
+
1638
+ /**
1639
+ * What `doctor` prints, one function per section, called in the order they print. What more than one
1640
+ * section reads is read once, by readCheckContext, before any of them.
1641
+ */
1616
1642
  export async function runCheck() {
1617
1643
  say("\n Trademark clearance engine — configuration check\n");
1644
+ const ctx = await readCheckContext();
1645
+ const { leadIsTheRefusal, turnLeads, signInLineLeads } = await sayOpening(ctx);
1646
+
1647
+ // The path this command runs from, with the build it names below it.
1648
+ say(`\n repo: ${REPO}`);
1649
+
1650
+ await sayDeployment(ctx);
1651
+ await sayNode();
1652
+ await sayEngine({ ...ctx, turnLeads, signInLineLeads });
1653
+ await sayHowToRun();
1654
+ await sayEnvFile();
1655
+ await sayConfigurationStore(ctx);
1656
+ await sayCustomInstructions(ctx);
1657
+ await sayRegister(ctx);
1658
+ // "Research provider" is printed second, right after the opening (sayResearch).
1659
+
1660
+ // "Will a search run?" keeps this place when the opening was the refusal's own sentence, which says the
1661
+ // same thing without the names; in every other state it is the opening (sayWillASearchRun).
1662
+ if (leadIsTheRefusal) ctx.sayWillASearchRun();
1663
+ await sayCaseLaw();
1664
+ await sayPortalBundle();
1665
+ await sayPortalTriggerKey(ctx);
1666
+ await sayPortalSignIn(ctx);
1667
+ await sayProvenProviders(ctx);
1668
+ await sayFileLocations(ctx);
1669
+ await sayBackgroundUnits(ctx);
1670
+ await sayStartButtonPath(ctx);
1671
+ await sayClientConnector(ctx);
1672
+ return sayVerdict(ctx.turnRan());
1673
+ }
1674
+
1675
+ /** What more than one section of the check reads, read once. `turnRan` is asked after the last section. */
1676
+ async function readCheckContext() {
1618
1677
  // Whether the engine probe's turn started the AI program (TURN_KEPT_ITS_FILES); one refused first did not.
1619
1678
  let probeTurnRan = false;
1620
1679
 
@@ -1896,7 +1955,14 @@ export async function runCheck() {
1896
1955
  else if (px) ok(`PERPLEXITY_API_KEY present (${px.from}) — presence only; add --probe-providers to prove it answers`);
1897
1956
  else info("PERPLEXITY_API_KEY is not set — the three clearance searches carry the common-law grid and cannot switch it off, so a clearance stops before it starts, and names the missing key; a Knockout search still runs and discloses the half it skipped");
1898
1957
  };
1958
+ return { fileEnv, unitDir, startPaths, hosted, unitEnv, effective, serviceEnvLabel, serviceEnvFile, serviceKnown,
1959
+ serviceFileEnv, effectiveForService, servicesRead, engineEnvOf, engSel, engineId, engSpec, serviceValue,
1960
+ engineChosen, binSet, binSetting, bin, invEnv, installMode, signInLine, runTurn, sayTurn, atOrder,
1961
+ sayWillASearchRun, sayResearch, turnRan: () => probeTurnRan };
1962
+ }
1899
1963
 
1964
+ async function sayOpening({ hosted, serviceKnown, engineId, engineChosen, bin, signInLine, runTurn, sayTurn, atOrder,
1965
+ sayWillASearchRun, sayResearch }) {
1900
1966
  // ── THE OPENING: WHETHER A SEARCH CAN RUN, WHAT STOPS IT, AND THE NEXT ACTION ─────────────────────
1901
1967
  //
1902
1968
  // A newcomer reads this command from the top, and the top was its path and its build: the answer to
@@ -1942,10 +2008,10 @@ export async function runCheck() {
1942
2008
  if (turn) sayTurn(turn);
1943
2009
  }
1944
2010
  sayResearch();
2011
+ return { leadIsTheRefusal, turnLeads, signInLineLeads };
2012
+ }
1945
2013
 
1946
- // The path this command runs from, with the build it names below it.
1947
- say(`\n repo: ${REPO}`);
1948
-
2014
+ async function sayDeployment({ fileEnv, hosted, unitEnv }) {
1949
2015
  // — CURRENT, not just configured. Printed first among the sections about this install's build,
1950
2016
  // because a stale deployment makes every line below it a report about the wrong build. The opening
1951
2017
  // and the research key come before it, because a newcomer's first question is whether a search runs.
@@ -2107,12 +2173,17 @@ export async function runCheck() {
2107
2173
  // one who can tell which of the two it is.
2108
2174
  say(` running programs on a different checkout: ${elsewhere.detail}.`);
2109
2175
  }
2176
+ }
2110
2177
 
2178
+ async function sayNode() {
2111
2179
  say("\n Node");
2112
2180
  const nodeV = nodeFloorVerdict();
2113
2181
  if (nodeV.ok) ok(`node ${nodeV.current}`);
2114
2182
  else problem(`node ${nodeV.current} — this engine needs ${nodeV.required} or newer; node:sqlite is not a built-in module before then`);
2183
+ }
2115
2184
 
2185
+ async function sayEngine({ hosted, serviceEnvFile, serviceKnown, servicesRead, engineEnvOf, engSel, engineId,
2186
+ engSpec, binSet, binSetting, bin, invEnv, installMode, signInLine, runTurn, sayTurn, turnLeads, signInLineLeads }) {
2116
2187
  say("\n Engine");
2117
2188
  // This block used to read CLEAROTRON_CLAUDE_PATH unconditionally, under the heading "Engine binary", on a
2118
2189
  // box that may be running codex — so it reported the wrong variable and could pass for the wrong
@@ -2348,7 +2419,9 @@ export async function runCheck() {
2348
2419
  sayTurn(await runTurn());
2349
2420
  }
2350
2421
  }
2422
+ }
2351
2423
 
2424
+ async function sayHowToRun() {
2352
2425
  // ── HOW THIS READER REACHES US, before anything below tells them to type something (issue 1916) ──
2353
2426
  //
2354
2427
  // Every advice line in this report composes through invocationPrefix(), and until this issue that
@@ -2388,7 +2461,9 @@ export async function runCheck() {
2388
2461
  info(`no \`clearotron\` on your PATH — re-run \`${invoke("install")}\` to put one there`);
2389
2462
  }
2390
2463
  }
2464
+ }
2391
2465
 
2466
+ async function sayEnvFile() {
2392
2467
  say("\n .env");
2393
2468
  // ── THE FILE MOVED, SO ASK THE SAME QUESTION THE LOADER ASKS ─────────────────────────────────────
2394
2469
  //
@@ -2423,7 +2498,10 @@ export async function runCheck() {
2423
2498
  const mode = statSync(ENV_PATH).mode & 0o777;
2424
2499
  if (mode & 0o077) warn(`mode ${mode.toString(8)} — it holds credentials; 600 is the mode for that`);
2425
2500
  }
2501
+ }
2426
2502
 
2503
+ async function sayConfigurationStore({ startPaths, hosted, unitEnv, effective, serviceEnvLabel, serviceEnvFile,
2504
+ serviceKnown, serviceFileEnv, effectiveForService }) {
2427
2505
  // — WHERE CONFIGURATION RESOLVES FROM, and whether that is inside the checkout.
2428
2506
  //
2429
2507
  // Unset is a REPORTABLE STATE, not silence: unset means this install is running our bundled demo
@@ -2759,7 +2837,9 @@ export async function runCheck() {
2759
2837
  }
2760
2838
  }
2761
2839
  }
2840
+ }
2762
2841
 
2842
+ async function sayCustomInstructions({ hosted, unitEnv, serviceKnown, effectiveForService }) {
2763
2843
  // — WHICH DOCTRINE FILES THIS INSTALL OVERRIDES, AND WHETHER OURS HAVE MOVED UNDER THEM.
2764
2844
  //
2765
2845
  // The report itself shipped in and worked, reachable only as `npm run doctrine-report` — a name
@@ -2806,7 +2886,9 @@ export async function runCheck() {
2806
2886
  // job is to report every section, and a section that kills the run tells the reader least.
2807
2887
  problem(`the custom instructions could not be read — ${e.message}`);
2808
2888
  }
2889
+ }
2809
2890
 
2891
+ async function sayRegister({ unitEnv, serviceKnown, serviceValue }) {
2810
2892
  say("\n Register provider");
2811
2893
  // WHAT THE SERVICES WILL SEARCH, READ AS THE ORDER-TIME CHECK BELOW READS IT. This section asked the
2812
2894
  // shell and this command's .env, so in a fresh terminal on a hosted box it told a working install that
@@ -2856,9 +2938,9 @@ export async function runCheck() {
2856
2938
  }
2857
2939
  }
2858
2940
  }
2941
+ }
2859
2942
 
2860
- // "Research provider" is printed second, right after the opening (sayResearch).
2861
-
2943
+ async function sayCaseLaw() {
2862
2944
  // ── — THE LANES A PRODUCT DECLARES IT NEEDS, BEFORE A REPORT NAMES THEM ──
2863
2945
  //
2864
2946
  // The owner ran a Full country search on his own install and the finished report told him, after two
@@ -2874,11 +2956,6 @@ export async function runCheck() {
2874
2956
  // doctor that hangs on a box with no route — so this reports ENROLMENT, and says plainly that a
2875
2957
  // source which is enrolled can still fail at run time. The owner's own report says `CONNECTION_CLOSED`
2876
2958
  // on exactly that case.
2877
- //
2878
- // "Will a search run?" keeps this place when the opening was the refusal's own sentence, which says the
2879
- // same thing without the names; in every other state it is the opening (sayWillASearchRun).
2880
- if (leadIsTheRefusal) sayWillASearchRun();
2881
-
2882
2959
  say("\n Case law and other capabilities");
2883
2960
  {
2884
2961
  const { caseLawInventory } = await import("../driver/config-inventory.mjs");
@@ -2923,7 +3000,9 @@ export async function runCheck() {
2923
3000
  info(`${r.providerLabel} — ${r.remedy ?? (r.configured ? "configured" : "not set up")}`);
2924
3001
  }
2925
3002
  }
3003
+ }
2926
3004
 
3005
+ async function sayPortalBundle() {
2927
3006
  // ── issue 1891 — WHICH DOOR GUARDS THE PORTAL, AND IS IT CONFIGURED ────────────────────────────
2928
3007
  //
2929
3008
  // Neither screen said anything about the portal's front door. A stranger install lands in `local` and
@@ -3000,7 +3079,9 @@ export async function runCheck() {
3000
3079
  // render, which is the same position they were in before this section existed.
3001
3080
  blocking(`the portal bundle could not be read — ${e.message} — so whether /portal can render is unknown`);
3002
3081
  }
3082
+ }
3003
3083
 
3084
+ async function sayPortalTriggerKey({ hosted, serviceKnown, effectiveForService }) {
3004
3085
  // ── THE TRIGGER KEY, AND THE DEADLINE NOBODY WAS COUNTING ────────────────────────────────────────
3005
3086
  //
3006
3087
  // A `--background` install stores the portal's trigger key in `~/.env`, the file the units load, and
@@ -3100,7 +3181,9 @@ export async function runCheck() {
3100
3181
  }
3101
3182
  }
3102
3183
  }
3184
+ }
3103
3185
 
3186
+ async function sayPortalSignIn({ startPaths, hosted, unitEnv, serviceEnvFile, serviceKnown, effectiveForService }) {
3104
3187
  say("\n Portal sign-in");
3105
3188
  {
3106
3189
  const { authView } = await import("../driver/portal-config-view.mjs");
@@ -3246,7 +3329,9 @@ export async function runCheck() {
3246
3329
  info(`could not judge who may use the portal (${String(e?.message ?? e).slice(0, 80)}) — a failure to look, not a finding`);
3247
3330
  }
3248
3331
  }
3332
+ }
3249
3333
 
3334
+ async function sayProvenProviders({ effective }) {
3250
3335
  // ── issue 1871 — PROVE THE REGISTER LANE, or say plainly that presence is all this knows ────────
3251
3336
  //
3252
3337
  // Everything above about a credential is a fact about a FILE. `✓ CLARIVATE_API_KEY present` is equally
@@ -3330,7 +3415,9 @@ export async function runCheck() {
3330
3415
  else problem(`PERPLEXITY_API_KEY did not answer: ${v.error}`);
3331
3416
  }
3332
3417
  }
3418
+ }
3333
3419
 
3420
+ async function sayFileLocations({ effective }) {
3334
3421
  say("\n Where files are stored");
3335
3422
  // Each entry is a FUNCTION, called only on the branch that prints it, so a getter is read at access
3336
3423
  // time and never captured as a constant here. The reader of this command is deciding what to
@@ -3348,7 +3435,8 @@ export async function runCheck() {
3348
3435
  const d = defaultWith(name, () => config.workspaceRoot);
3349
3436
  return d.refusal ?? `${name} is not set — run directories go to ${d.value}`;
3350
3437
  }],
3351
- ["CLEAROTRON_QUEUE_DIR", (name) => `${name} is not set — the intake queue`],
3438
+ // `clearotron start` hands its children <base>/queue (bin/start.mjs), so the unset queue has an answer.
3439
+ ["CLEAROTRON_QUEUE_DIR", (name) => `${name} is not set — \`${invocationPrefix()}clearotron start\` uses ~/trademark/queue`],
3352
3440
  ]) {
3353
3441
  const e = effective(k);
3354
3442
  // — the name in every one of these lines is the spelling that ANSWERED, or the current one
@@ -3358,7 +3446,9 @@ export async function runCheck() {
3358
3446
  if (!existsSync(e.v)) warn(`${e.name}=${e.v} (${e.from}) does not exist yet`);
3359
3447
  else ok(`${e.name}=${e.v} (${e.from})`);
3360
3448
  }
3449
+ }
3361
3450
 
3451
+ async function sayBackgroundUnits({ hosted }) {
3362
3452
  // ── THE CLIENT CONNECTOR, AND WHETHER ISSUED KEYS ARE STILL GOOD ──────────
3363
3453
  //
3364
3454
  // The status surface the ruling names: "status should say whether a key is still valid". Stopping
@@ -3392,7 +3482,9 @@ export async function runCheck() {
3392
3482
  else warn(`could not tell whether lingering is on for ${who} — ${lingerWhy}. That is this command `
3393
3483
  + "failing to look, not a report that it is off.");
3394
3484
  }
3485
+ }
3395
3486
 
3487
+ async function sayStartButtonPath({ hosted, unitEnv }) {
3396
3488
  say("\n Start-button path");
3397
3489
  try {
3398
3490
  const { triggerLaneVerdict, HOSTED, SUPERVISED } = await import(pathToFileURL(join(REPO, "shared", "trigger-lane.mjs")).href);
@@ -3475,7 +3567,10 @@ export async function runCheck() {
3475
3567
  else info(lane.message);
3476
3568
  }
3477
3569
  } catch (e) { warn(`the submit lane could not be read: ${e.message}`); }
3570
+ }
3478
3571
 
3572
+ async function sayClientConnector({ unitDir, startPaths, hosted, unitEnv, effective, serviceFileEnv,
3573
+ effectiveForService }) {
3479
3574
  say("\n Client connector");
3480
3575
  // THE REVOCATION LIST, REPORTED (found in review). `isRevoked` used to read an unreadable denylist as
3481
3576
  // "not revoked", so a named-but-absent file made every revocation silently ineffective: measured on a
@@ -3858,7 +3953,9 @@ export async function runCheck() {
3858
3953
  }
3859
3954
  }
3860
3955
  } catch (e) { warn(`the client-connector state could not be read: ${e.message}`); }
3956
+ }
3861
3957
 
3958
+ function sayVerdict(probeTurnRan) {
3862
3959
  say("");
3863
3960
  // NAMED, NOT COUNTED, AND NAMED FIRST — before the problem count and independently of it. Listing
3864
3961
  // blockers only when `problems` is empty would reproduce this command's original defect one level up:
@@ -4157,7 +4254,7 @@ try {
4157
4254
  // no claim. Resolved once per pass, so a reader who mends something and comes back sees it mended.
4158
4255
  const found = engineMenuState();
4159
4256
  const options = engineOptions(found);
4160
- const pick = await choose(ENGINE_QUESTION, options, engineMenuDefault(options, lastPick), PAY_PREAMBLE);
4257
+ const pick = await choose(ENGINE_QUESTION, options, engineMenuDefault(options, lastPick, found), PAY_PREAMBLE);
4161
4258
  if (!pick.id) { sayNoEngine(); break; }
4162
4259
  lastPick = pick.id;
4163
4260
  const eng = ENGINE_BINARIES[pick.id];
@@ -4362,7 +4459,7 @@ try {
4362
4459
  say(" Running one turn…");
4363
4460
  // Read on every try, so a setting the reader fixes in the file between tries is the one the next turn uses.
4364
4461
  const v = await probeEngineTurn(proofTurn({ engineId: pick.id, eng, bin, authEnv, settings: settingsInForce() }));
4365
- // A turn refused before it started the program left no files of the program's own (runCheck's runTurn).
4462
+ // A turn refused before it started the program left no files of the program's own (readCheckContext's runTurn).
4366
4463
  if (v.ok || v.basis !== "config") setupTurnRan = true;
4367
4464
  if (v.ok) {
4368
4465
  ok(`${eng.product} completed a turn on ${PAYS_WITH[authPick.id]} — binary, credential, billing mode and model access all work.`);
@@ -4469,7 +4566,7 @@ try {
4469
4566
  // unset was reachable only by picking a vendor and skipping its credential, so a reader who meant "none
4470
4567
  // yet" had to pretend to choose one. Choosing it takes the branch a skipped credential reaches below.
4471
4568
  const provider = await choose("Which register?", [...PROVIDERS.map((p) => ({ label: `${p.label} — ${p.cost}`, spec: p })), { label: "None for now", spec: null }], 0);
4472
- const spec = provider.spec;
4569
+ let spec = provider.spec;
4473
4570
  if (spec) {
4474
4571
  say(`\n ${spec.label}: covers ${spec.covers}`);
4475
4572
  for (const w of spec.warnings ?? []) warn(w);
@@ -4503,12 +4600,34 @@ try {
4503
4600
  const collectedHere = [];
4504
4601
  for (const k of spec?.credentials ?? []) {
4505
4602
  if (present(candidate[k])) { ok(`${k} already adopted from your environment`); continue; }
4603
+ // THE FREE TIER'S US HALF STANDS ON ITS OWN, so a skipped EUIPO credential there is not the end of the
4604
+ // register: the reader is offered the US-only row below, and is told nothing is selected only if they
4605
+ // decline it.
4606
+ const freeTier = spec.id === "free-tier";
4506
4607
  const v = await askValue(`${k}:`, { secret: true, skippable: true,
4507
- skipped: `${k} not set, so ${spec.id} cannot be configured — this install will have NO register selected.` });
4608
+ skipped: freeTier ? undefined : `${k} not set, so ${spec.id} cannot be configured — this install will have NO register selected.` });
4508
4609
  if (v === null) { registerSelected = false; break; }
4509
4610
  candidate[k] = v;
4510
4611
  collectedHere.push(k);
4511
4612
  }
4613
+ if (!registerSelected && spec?.id === "free-tier") {
4614
+ for (const k of collectedHere.splice(0)) delete candidate[k];
4615
+ const usOnly = PROVIDERS.find((p) => p.id === "uspto-local");
4616
+ const next = await choose("Which register?", [{ label: `${usOnly.label} — ${usOnly.cost}`, spec: usOnly }, { label: "None for now", spec: null }], 0);
4617
+ if (next.spec) {
4618
+ spec = next.spec;
4619
+ say(`\n ${spec.label}: covers ${spec.covers}`);
4620
+ registerSelected = true;
4621
+ for (const k of spec.credentials) {
4622
+ if (present(candidate[k])) { ok(`${k} already adopted from your environment`); continue; }
4623
+ const v = await askValue(`${k}:`, { secret: true, skippable: true,
4624
+ skipped: `${k} not set, so ${spec.id} cannot be configured — this install will have NO register selected.` });
4625
+ if (v === null) { registerSelected = false; break; }
4626
+ candidate[k] = v;
4627
+ collectedHere.push(k);
4628
+ }
4629
+ }
4630
+ }
4512
4631
  if (!registerSelected) {
4513
4632
  // ONLY what this step collected. A credential ADOPTED from the environment was approved by name at
4514
4633
  // the "Credentials already in your environment" step, BEFORE any register was chosen — it is not
@@ -4564,7 +4683,11 @@ try {
4564
4683
  else {
4565
4684
  warn(`${db} does not exist yet — build it with: ${invocationPrefix()}clearotron sync`);
4566
4685
  if (!await confirm("Keep this path anyway?", true)) { aborted = "uspto"; throw new Error("uspto"); }
4567
- await offerUsptoSync(db, { ask: askRaw, say, ok, info, warn, problem });
4686
+ if (!present(candidate.USPTO_API_KEY)) {
4687
+ const key = await askValue(usptoApiKeyQuestion(), { secret: true, skippable: true });
4688
+ if (key) { candidate.USPTO_API_KEY = key; collectedHere.push("USPTO_API_KEY"); }
4689
+ }
4690
+ await offerUsptoSync(db, { ask: askRaw, say, ok, info, warn, problem, euHalf: spec.euHalf !== false, apiKey: candidate.USPTO_API_KEY ?? null });
4568
4691
  }
4569
4692
  }
4570
4693
  if (registerSelected && !spec.validateEuipo && !spec.uspToLocalKey) {
@@ -4599,7 +4722,9 @@ try {
4599
4722
  if (!present(candidate[name])) {
4600
4723
  const skippedLine = `Skipped. You can add ${name} later; until then: ${adapter.absentMeans ?? "the lane stays off"}.`;
4601
4724
  // A KEY PASTED AT THE YES/NO IS THE ANSWER (confirmOrKey): taken, never shown, not asked for twice.
4602
- const answer = await confirmOrKey(`Enter a ${adapter.label} API key now?`, true);
4725
+ // YES FOR RESEARCH, NO FOR THE CHINESE MARKETPLACE SEARCH: without the research key three clearance searches
4726
+ // refuse; the marketplace key serves only the China-region native-language lanes.
4727
+ const answer = await confirmOrKey(`Enter a ${adapter.label} API key now?`, table !== SERP_PROVIDERS);
4603
4728
  if (answer.value) candidate[name] = answer.value;
4604
4729
  else if (answer.yes) {
4605
4730
  const v = await askValue(`${adapter.label} key:`, { secret: true, skippable: true, skipped: skippedLine });
@@ -4854,7 +4979,10 @@ try {
4854
4979
  if (registerSelected) {
4855
4980
  say("\n Running the register credential check over these values…");
4856
4981
  const pf = await preflightCandidate(candidate);
4857
- if (pf.ok) ok(registerCheckPassed(pf.result.provider, pf.result.checked.join(" + ")));
4982
+ // A DATABASE PATH THAT DOES NOT EXIST YET PROVES NOTHING. The check reads the setting's presence, and the
4983
+ // warning above already said the index is not built, so the tick says presence and not "passed".
4984
+ const unbuilt = spec?.uspToLocalKey && present(candidate[spec.uspToLocalKey]) && !existsSync(candidate[spec.uspToLocalKey]);
4985
+ if (pf.ok) ok(unbuilt ? registerCheckPresenceOnly(pf.result.checked.join(" + ")) : registerCheckPassed(pf.result.provider, pf.result.checked.join(" + ")));
4858
4986
  else {
4859
4987
  problem(pf.error);
4860
4988
  say(`\n ${whatSetupLeft(leftSoFar()) ?? "Nothing has been written."}`);
@@ -4998,7 +5126,8 @@ try {
4998
5126
  say("");
4999
5127
  // A FIRST REAL CLEARANCE IS SUGGESTED ONLY WHERE ONE CAN RUN. With no register chosen, the line suggesting
5000
5128
  // `run` sat a few lines above the warning that `run` will refuse at its door.
5001
- if (registerSelected) {
5129
+ // …and the EU job only where the register reaches the EU.
5130
+ if (registerSelected && spec?.euHalf !== false) {
5002
5131
  say(` ${style.dim(`Also: \`${invocationPrefix()}clearotron demo\` replays a finished report with no keys and no model calls;`)}`);
5003
5132
  say(` ${style.dim(`\`${invocationPrefix()}clearotron run --job ${/\s/.test(EXAMPLE_JOB) ? `"${EXAMPLE_JOB}"` : EXAMPLE_JOB}\` runs a first real clearance on the EU register.`)}`);
5004
5133
  } else say(` ${style.dim(`Also: \`${invocationPrefix()}clearotron demo\` replays a finished report with no keys and no model calls.`)}`);
package/build-info.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "commit": "be52291d9839d701544d3a9479888be91913e302",
3
- "version": "0.6.0-beta.1"
2
+ "commit": "3737378f59f5315d8994a5f48ce857ace6898bbe",
3
+ "version": "0.7.0-beta.0"
4
4
  }
@@ -77,7 +77,9 @@ An `account` principal reaches **eighteen** tools, for its own companies only
77
77
  The evidence layer exists because a lawyer defending a filing decision needs the records
78
78
  under the report, not just its prose. It projects named structured fields and enums derived from
79
79
  them — `mcp-server/lib/evidence.mjs` states that there is no code path forwarding free prose, and
80
- that is the one declared exception to the scrub.
80
+ that is the first declared exception to the scrub. The second, from 2026-11-18, is a cited register
81
+ record's goods in the register's own words: `get_finding` carries them as `goodsAsRegistered` for the one
82
+ register record its block names, copied from the record the run saved and passed through no scrub.
81
83
 
82
84
  **The audit chain is open by ruling, 2026-08-27**, with the call spend set aside. The same lawyer who
83
85
  needs the records also has to be able to show *how* the answer was reached, so the decision chain is
package/docs/DELIVERY.md CHANGED
@@ -199,9 +199,12 @@ one for outside readers, and nothing writes `report.client.html` — internal wo
199
199
  model's register estimate) is not stripped from the report, it is not in the report: it lives in the
200
200
  audit workbook. Two renderings of one run is how the wrong link gets sent.
201
201
 
202
- Beside it the run publishes `report-data.json` (`schema: "report-data/1"`): the run as data — level
203
- identity, bands, per-mark points, evidence links, register counts. That is the input a bespoke,
204
- forwardable email is drafted from. The engine composes exactly one email shape, a cover note
202
+ Beside it the run publishes `report-data.json`: the run as data — level identity, bands, per-mark
203
+ points, evidence links, register counts. That is the input a bespoke, forwardable email is drafted
204
+ from. A clearance and a Knockout write different shapes, and the `schema` field names which:
205
+ `report-data/clearance-1` or `report-data/knockout-1`, each described by a JSON Schema in
206
+ [report-data/](report-data/). Runs published before the shapes were named carry `report-data/1` for
207
+ both, and keep it: a published file is never rewritten. The engine composes exactly one email shape, a cover note
205
208
  pointing at the report; per-company formatting is not a config knob.
206
209
 
207
210
  The second document was a real hazard while it existed: any surface that opened a report **by file
@@ -294,7 +294,7 @@ All paths relative to [`driver/`](../../driver/). The load-bearing seven are mar
294
294
  | `rule-shape.mjs` · `reasoning-tripwires.mjs` · `gate-metrics.mjs` | Anti-threshold guard, integrity tripwires (observe-only), gate telemetry. |
295
295
  | `predelivery-lint.mjs` · `close-verify.mjs` · `screen-gate.mjs` | Pre-delivery checks, envelope close verification, screen-gate detection. |
296
296
  | `common-law-receipts.mjs` · `engagement-receipt.mjs` · `scope-ledger.mjs` | Receipt models for the marketplace grid, engagement, scope. |
297
- | `senior-rights.mjs` · `own-rights.mjs` · `use-check.mjs` | Rights closure, self-exclusion, use analysis. |
297
+ | `senior-rights.mjs` | Rights closure. A finding's own-rights and use-check sources are fields of the findings record, checked by `verify.mjs`. |
298
298
  | `publish/` | Deterministic publication: HTML render, Excel audit workbook, pool admin, regions. |
299
299
  | `repairs.mjs` · `repair-digest.mjs` | Recovery decisions, repair budgets, repair digests. |
300
300
  | `tokens.mjs` · `provider-usage.mjs` · `progress.mjs` · `status-snapshot.mjs` · `run-activity.mjs` | Token rollup (successor to the deleted `cost.mjs`), billing-grade provider ledger, status surfaces. |