clearotron 0.2.2 → 0.2.4

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 (161) hide show
  1. package/.env.example +64 -37
  2. package/.nvmrc +1 -1
  3. package/CONTRIBUTING.md +8 -4
  4. package/INSTALL.md +36 -14
  5. package/README.md +18 -22
  6. package/THIRD-PARTY-NOTICES.md +1 -1
  7. package/bin/clearotron.mjs +22 -0
  8. package/bin/example.mjs +10 -5
  9. package/bin/onboard.mjs +370 -28
  10. package/bin/start.mjs +220 -12
  11. package/build-info.json +2 -2
  12. package/demo/README.md +1 -1
  13. package/demo/full-country-search/run/_driver/framework.json +1 -1
  14. package/demo/global-preliminary-search/run/_driver/framework.json +1 -1
  15. package/demo/knockout-search/run/_driver/framework.json +1 -1
  16. package/demo/multi-country-focus-search/run/_driver/framework.json +1 -1
  17. package/docs/E2E.md +5 -5
  18. package/docs/GLOSSARY.md +85 -0
  19. package/docs/PORTAL.md +2 -2
  20. package/docs/README.md +6 -4
  21. package/docs/SECURITY.md +17 -0
  22. package/docs/architecture/01-product-overview.md +21 -9
  23. package/docs/architecture/04-configuration-reference.md +2 -0
  24. package/docs/architecture/05-config-governance.md +19 -0
  25. package/docs/architecture/05-customer-profiles.md +2 -2
  26. package/docs/configuration.md +4 -3
  27. package/docs/decisions/0006-what-the-public-repository-carries.md +30 -5
  28. package/driver/CHANGELOG.md +90 -0
  29. package/driver/README.md +25 -6
  30. package/driver/common-law-receipts.mjs +1 -1
  31. package/driver/config-staleness.mjs +1 -1
  32. package/driver/connotation-search.mjs +1 -1
  33. package/driver/contract-audit.mjs +5 -1
  34. package/driver/contract-e3-baseline.json +11 -11
  35. package/driver/dev-portal.mjs +2 -2
  36. package/driver/doubt-selection.mjs +1 -1
  37. package/driver/drainer-identity.mjs +1 -1
  38. package/driver/driver.config.mjs +1 -1
  39. package/driver/effort-model.mjs +2 -2
  40. package/driver/engine/cli-version.mjs +103 -0
  41. package/driver/engine/probe.mjs +45 -5
  42. package/driver/enqueue-schema.mjs +8 -8
  43. package/driver/feedback-store.mjs +1 -1
  44. package/driver/findings-model.mjs +52 -2
  45. package/driver/flag-snapshot.mjs +20 -0
  46. package/driver/framework.mjs +1 -1
  47. package/driver/gateway.mjs +20 -3
  48. package/driver/outbox-backoff.mjs +1 -1
  49. package/driver/package.json +3 -3
  50. package/driver/party-facts.mjs +2 -2
  51. package/driver/phase0.mjs +1 -1
  52. package/driver/pipeline.mjs +211 -106
  53. package/driver/plain-register.mjs +134 -0
  54. package/driver/portal-access.mjs +1 -1
  55. package/driver/portal-config-view.mjs +70 -2
  56. package/driver/portal-families.mjs +1 -1
  57. package/driver/portal-local-auth.mjs +5 -1
  58. package/driver/portal-report.mjs +1 -1
  59. package/driver/portal-service.mjs +79 -9
  60. package/driver/portal-upstream.mjs +2 -2
  61. package/driver/predelivery-lint.mjs +151 -2
  62. package/driver/profile-page.html +10 -2
  63. package/driver/profile-service.mjs +4 -4
  64. package/driver/profiles/README.md +3 -3
  65. package/driver/profiles.mjs +144 -12
  66. package/driver/publish/index.mjs +2 -2
  67. package/driver/publish/knockout.mjs +7 -1
  68. package/driver/publish/render-knockout.mjs +453 -118
  69. package/driver/publish/render.mjs +111 -16
  70. package/driver/reference-strip-signatures.mjs +20 -0
  71. package/driver/search-policy.mjs +3 -3
  72. package/driver/skills/blind-frame/SKILL.md +1 -1
  73. package/driver/skills/knockout-assess/SKILL.md +84 -0
  74. package/driver/skills/matter-frame/SKILL.md +6 -6
  75. package/driver/skills/matter-frame/watchlist-reference.md +2 -2
  76. package/driver/skills/prelim-common-law/SKILL.md +1 -1
  77. package/driver/skills/prelim-search/SKILL.md +1 -1
  78. package/driver/skills/prelim-search/report-prose.md +82 -0
  79. package/driver/skills/prelim-search/risk-framework-demo.manifest.json +1 -1
  80. package/driver/skills/prelim-search/risk-framework-triage.manifest.json +1 -1
  81. package/driver/skills/prelim-search/risk-framework.manifest.json +1 -1
  82. package/driver/skills/prelim-search/synthesis-rules.md +1 -1
  83. package/driver/skills/prelim-variants/SKILL.md +3 -3
  84. package/driver/stage-context.mjs +13 -0
  85. package/driver/stages.mjs +54 -7
  86. package/driver/suite-census.json +220 -58
  87. package/driver/systemd/clearotron-worker.service +3 -3
  88. package/driver/tokens.mjs +1 -1
  89. package/driver/unit-inventory.mjs +214 -27
  90. package/driver/verify.mjs +1 -1
  91. package/driver/whatif-memo-run.mjs +26 -4
  92. package/driver/whatif-memo.mjs +19 -1
  93. package/examples/README.md +2 -2
  94. package/examples/grants.example.json +6 -7
  95. package/mcp-server/CHANGELOG.md +4 -0
  96. package/mcp-server/lib/scrub.mjs +1 -1
  97. package/mcp-server/lib/whatif.mjs +2 -2
  98. package/mcp-server/package.json +1 -1
  99. package/mcp-server/packs/ops/EXAMPLES.md +2 -2
  100. package/mcp-server/server.mjs +1 -1
  101. package/package.json +31 -19
  102. package/portal-ui/dist/assets/{index-Ct3iQtZ2.css → index-1ziUJX1E.css} +43 -2
  103. package/portal-ui/dist/assets/{index-BUGgiYtF.js → index-KFAHMgdT.js} +289 -73
  104. package/portal-ui/dist/index.html +2 -2
  105. package/portal-ui/package.json +1 -1
  106. package/providers/_shared/term-shape.mjs +1 -1
  107. package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
  108. package/providers/oauth-mcp-bridge/package.json +1 -1
  109. package/providers/uspto-local/src/index-store.js +2 -2
  110. package/scripts/added-reference-check.mjs +45 -89
  111. package/scripts/citation-line-check.mjs +121 -2
  112. package/scripts/e2e.mjs +2 -2
  113. package/scripts/env-classify.mjs +67 -3
  114. package/scripts/generated-files-are-current.mjs +125 -0
  115. package/scripts/live-surface-check.mjs +38 -1
  116. package/scripts/mint-names-in-force.mjs +4 -2
  117. package/scripts/mint-public-residue.mjs +74 -0
  118. package/scripts/mint-reference-strip-backlog.mjs +12 -1
  119. package/scripts/mint-suite-census.mjs +5 -2
  120. package/scripts/nightly-notice.mjs +0 -2
  121. package/scripts/preinstall-node-check.mjs +24 -0
  122. package/scripts/render-check.mjs +13 -2
  123. package/scripts/report-frame-check.mjs +8 -1
  124. package/scripts/report-screenshot.mjs +6 -3
  125. package/scripts/revisit-render-check.mjs +6 -3
  126. package/scripts/score.mjs +1 -1
  127. package/scripts/strip-tracker-citations.mjs +38 -7
  128. package/scripts/test-full.mjs +226 -0
  129. package/scripts/test-run.mjs +16 -0
  130. package/shared/README.md +2 -1
  131. package/shared/anon-overlay.mjs +3 -3
  132. package/shared/browser-temp-root.mjs +142 -0
  133. package/shared/checkout-move.mjs +1 -1
  134. package/shared/client-door.mjs +4 -3
  135. package/shared/customer-store.mjs +1 -1
  136. package/shared/identifier-scan.mjs +1 -1
  137. package/shared/install-auth.mjs +35 -0
  138. package/shared/invocation.mjs +33 -1
  139. package/shared/listen.mjs +55 -3
  140. package/shared/names-in-force.mjs +6 -1
  141. package/shared/node-floor.mjs +97 -0
  142. package/shared/os-advice.mjs +91 -0
  143. package/shared/reap-on-exit.mjs +42 -0
  144. package/shared/reference-guard-classes.mjs +351 -0
  145. package/shared/staff-domain.mjs +154 -0
  146. package/shared/store-in-repo.mjs +23 -2
  147. package/shared/suite-census.mjs +31 -3
  148. package/shared/withheld-paths-access.mjs +36 -18
  149. package/skills/clearotron-ops/SKILL.md +1 -1
  150. package/driver/recipes/README.md +0 -49
  151. package/driver/skills/prelim-search/risk-framework-aurora.manifest.json +0 -19
  152. package/driver/skills/prelim-search/risk-framework-aurora.md +0 -77
  153. package/driver/skills/prelim-search/risk-framework-zephyr.manifest.json +0 -14
  154. package/driver/skills/prelim-search/risk-framework-zephyr.md +0 -33
  155. package/driver/skills/prelim-search/worked-examples-aurora.md +0 -10
  156. package/driver/skills/prelim-search/worked-examples-zephyr.md +0 -10
  157. package/scripts/ai-page-render-check.mjs +0 -532
  158. package/scripts/clearances-render-check.mjs +0 -480
  159. package/scripts/composer-render-check.mjs +0 -1027
  160. package/scripts/home-render-check.mjs +0 -526
  161. package/scripts/portal-lifecycle-check.mjs +0 -639
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "clearotron",
3
3
  "type": "module",
4
- "version": "0.2.2",
4
+ "version": "0.2.4",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
7
7
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "description": "Clearotron — trademark-clearance engine: deterministic orchestration driver + MCP interrogation server. Provider-agnostic, model-agnostic, runs headless (no gateway).",
15
15
  "engines": {
16
- "node": ">=22.19.0"
16
+ "node": ">=22.13.0"
17
17
  },
18
18
  "workspaces": [
19
19
  "driver",
@@ -22,13 +22,14 @@
22
22
  "portal-ui"
23
23
  ],
24
24
  "scripts": {
25
+ "preinstall": "node scripts/preinstall-node-check.mjs",
25
26
  "postinstall": "node -e \"const{existsSync}=require('node:fs');const{execFileSync}=require('node:child_process');if(existsSync('scripts/install-hooks.mjs'))execFileSync(process.execPath,['scripts/install-hooks.mjs'],{stdio:'inherit'})\"",
26
27
  "prepack": "node scripts/write-build-info.mjs",
27
28
  "prepublishOnly": "node scripts/release-completeness-check.mjs",
28
29
  "test": "npm test --workspaces --if-present",
29
- "test:full": "npm run test:full --workspaces --if-present",
30
+ "test:full": "node scripts/test-full.mjs",
30
31
  "test:driver": "npm run test:full -w driver",
31
- "test:providers": "node scripts/test-run.mjs node --test providers/_shared/test/*.test.mjs providers/*/test/*.test.mjs",
32
+ "test:providers": "node scripts/test-full.mjs --only providers",
32
33
  "test:mcp": "npm test -w mcp-server",
33
34
  "start": "node bin/start.mjs",
34
35
  "build:ui": "npm run build -w portal-ui",
@@ -48,17 +49,11 @@
48
49
  "bench:uspto": "node providers/uspto-local/bench/bench.mjs",
49
50
  "verify:uspto": "node providers/uspto-local/bin/verify-index.mjs",
50
51
  "lint:driver": "eslint --no-error-on-unmatched-pattern --max-warnings 0 --config eslint.driver.config.mjs \"driver/**/*.mjs\" \"bin/**/*.mjs\" \"shared/**/*.mjs\" \"mcp-server/**/*.mjs\" \"scripts/**/*.mjs\" \"cut/**/*.mjs\"",
51
- "deploy:drift": "node -e \"const{existsSync}=require('node:fs');const{execFileSync}=require('node:child_process');const p='scripts/deploy-drift-check.mjs';if(!existsSync(p)){console.error('npm run deploy:drift requires '+p+', internal tooling that is not included in this distribution.');process.exit(1)}try{execFileSync(process.execPath,[p],{stdio:'inherit'})}catch(e){process.exit(typeof e.status==='number'?e.status:1)}\"",
52
52
  "doctrine-report": "node scripts/doctrine-report.mjs",
53
53
  "notices": "node scripts/third-party-notices.mjs",
54
54
  "notices:check": "node scripts/third-party-notices.mjs --check",
55
55
  "grant": "node bin/grant.mjs",
56
- "generators": "node -e \"const{existsSync}=require('node:fs');const{execFileSync}=require('node:child_process');const p='scripts/regen-baselines.mjs';if(!existsSync(p)){console.error('npm run generators requires '+p+', internal tooling that is not included in this distribution.');process.exit(1)}try{execFileSync(process.execPath,[p],{stdio:'inherit'})}catch(e){process.exit(typeof e.status==='number'?e.status:1)}\"",
57
- "assert-census": "node scripts/unexecuted-asserts.mjs",
58
- "guard:messages": "node -e \"const{existsSync}=require('node:fs');const{execFileSync}=require('node:child_process');const p='scripts/commit-message-guard.mjs';if(!existsSync(p)){console.error('npm run guard:messages requires '+p+', internal tooling that is not included in this distribution.');process.exit(1)}try{execFileSync(process.execPath,[p],{stdio:'inherit'})}catch(e){process.exit(typeof e.status==='number'?e.status:1)}\"",
59
- "guard:messages:self-test": "node -e \"const{existsSync}=require('node:fs');const{execFileSync}=require('node:child_process');const p='scripts/commit-message-guard.mjs';if(!existsSync(p)){console.error('npm run guard:messages:self-test requires '+p+', internal tooling that is not included in this distribution.');process.exit(1)}try{execFileSync(process.execPath,[p,'--self-test'],{stdio:'inherit'})}catch(e){process.exit(typeof e.status==='number'?e.status:1)}\"",
60
- "hooks:install": "node -e \"const{existsSync}=require('node:fs');const{execFileSync}=require('node:child_process');const p='scripts/install-hooks.mjs';if(!existsSync(p)){console.error('npm run hooks:install requires '+p+', internal tooling that is not included in this distribution.');process.exit(1)}try{execFileSync(process.execPath,[p],{stdio:'inherit'})}catch(e){process.exit(typeof e.status==='number'?e.status:1)}\"",
61
- "hooks:check": "node -e \"const{existsSync}=require('node:fs');const{execFileSync}=require('node:child_process');const p='scripts/install-hooks.mjs';if(!existsSync(p)){console.error('npm run hooks:check requires '+p+', internal tooling that is not included in this distribution.');process.exit(1)}try{execFileSync(process.execPath,[p,'--check'],{stdio:'inherit'})}catch(e){process.exit(typeof e.status==='number'?e.status:1)}\""
56
+ "assert-census": "node scripts/unexecuted-asserts.mjs"
62
57
  },
63
58
  "devDependencies": {
64
59
  "@changesets/cli": "3.0.1",
@@ -72,7 +67,7 @@
72
67
  "buffers": "file:vendor/buffers",
73
68
  "exceljs": "^4.4.0",
74
69
  "jose": "^6.2.3",
75
- "undici": "^8.10.1"
70
+ "undici": "^7.29.1"
76
71
  },
77
72
  "bin": {
78
73
  "clearotron": "bin/clearotron.mjs"
@@ -105,13 +100,30 @@
105
100
  "portal-ui/dist/",
106
101
  "portal-ui/package.json",
107
102
  ".env.example",
108
- "!driver/profiles/aurora.json",
109
- "!driver/profiles/zephyr.json",
110
- "!driver/profiles/petcary.json",
111
- "!driver/profiles/petcary.context.md",
112
- "!driver/profiles/projects/aurora/",
113
- "!driver/recipes/aurora/",
114
- "!driver/recipes/zephyr/",
103
+ "!driver/profiles/*.json",
104
+ "driver/profiles/generic.json",
105
+ "driver/profiles/demo-brand-owner.json",
106
+ "!driver/profiles/*.context.md",
107
+ "!driver/profiles/projects/*/",
108
+ "driver/profiles/projects/demo-brand-owner/",
109
+ "!driver/recipes/*/",
110
+ "!driver/skills/prelim-search/risk-framework-*",
111
+ "driver/skills/prelim-search/risk-framework.md",
112
+ "driver/skills/prelim-search/risk-framework.manifest.json",
113
+ "driver/skills/prelim-search/risk-framework-demo.md",
114
+ "driver/skills/prelim-search/risk-framework-demo.manifest.json",
115
+ "driver/skills/prelim-search/risk-framework-triage.md",
116
+ "driver/skills/prelim-search/risk-framework-triage.manifest.json",
117
+ "!driver/skills/prelim-search/worked-examples-*",
118
+ "driver/skills/prelim-search/worked-examples.md",
119
+ "driver/skills/prelim-search/worked-examples-demo.md",
120
+ "!scripts/home-render-check.mjs",
121
+ "!scripts/ai-page-render-check.mjs",
122
+ "!scripts/composer-render-check.mjs",
123
+ "!scripts/clearances-render-check.mjs",
124
+ "!scripts/portal-lifecycle-check.mjs",
125
+ "!scripts/test-account-names.mjs",
126
+ "!scripts/no-test-account-reaches-the-package.mjs",
115
127
  "!**/test/",
116
128
  "!**/bench/",
117
129
  "!**/*.test.mjs",
@@ -598,7 +598,7 @@ table.data tr.row:hover td {
598
598
  /* tracker issue 277 — A SECTION HEADER, not a decorative divider.
599
599
  Brand owner is the organising principle of the whole list, and a reader had to work it out: the name
600
600
  was set in the smallest, lowest-contrast, most letterspaced type on the page, which reads as a rule
601
- BETWEEN rows rather than as "everything below this belongs to Aurora Interactive".
601
+ BETWEEN rows rather than as "everything below this belongs to Foxglade Interactive".
602
602
  Body-text size, medium weight, full-strength ink, sentence case rather than letterspaced caps — and a
603
603
  hairline rule spanning the table beneath it, so containment is visible without reading anything. */
604
604
  table.data tr.group-head td {
@@ -916,11 +916,21 @@ input.filter {
916
916
  color: var(--text-strong);
917
917
  }
918
918
 
919
+ /* Says what the row of pills below it is a row OF. Sentence case and body-weight rather than the
920
+ uppercase section treatment above: this is a caption belonging to the statement it follows, and
921
+ giving it a heading's weight would make it look like a new section — which is the misreading the
922
+ label exists to end. Sits tight to its pills and away from the statement above. */
923
+ .fw-ladder-label {
924
+ font-size: 12px;
925
+ color: var(--text-muted);
926
+ margin: 14px 0 0;
927
+ }
928
+
919
929
  .fw-ladder {
920
930
  display: flex;
921
931
  flex-wrap: wrap;
922
932
  gap: 6px;
923
- margin: 10px 0 4px;
933
+ margin: 6px 0 4px;
924
934
  }
925
935
 
926
936
  .fw-bmh {
@@ -991,6 +1001,37 @@ input.filter {
991
1001
  max-width: 420px; /* tracker issue 2086 — the note's width is the note's own, not its call site's */
992
1002
  }
993
1003
 
1004
+ /* The line beside the primary action: what happens next when it is available, and why it is not when
1005
+ it is not. Capped here rather than at the call site for the same reason the note above is — width is
1006
+ a decision this file makes. Narrower than the note because it sits IN the action row, beside a
1007
+ button, rather than replacing it. */
1008
+ .footer-hint {
1009
+ max-width: 260px;
1010
+ font-size: 12px;
1011
+ line-height: 1.4;
1012
+ color: var(--text-muted);
1013
+ }
1014
+
1015
+ /* The acknowledgement a save leaves beside the button that was pressed.
1016
+ Quiet on purpose: it is a receipt, not an alert, and it sits in the same row as the primary action
1017
+ without competing with it. No new colour — `--tone-minimal` (the palette's clear-green) and the hairline are what the rest of
1018
+ this file already uses for a settled, good state. */
1019
+ .save-done {
1020
+ display: inline-flex;
1021
+ align-items: center;
1022
+ gap: 7px;
1023
+ font-size: 12.5px;
1024
+ color: var(--text-body);
1025
+ background: var(--surface-sunken);
1026
+ border: 1px solid var(--border-hairline);
1027
+ border-radius: 7px;
1028
+ padding: 7px 11px;
1029
+ }
1030
+ .save-done svg {
1031
+ color: var(--tone-minimal);
1032
+ flex: none;
1033
+ }
1034
+
994
1035
  .fw-meta {
995
1036
  font-size: 12px;
996
1037
  color: var(--text-muted);