clearotron 0.6.0 → 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 +39 -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 +4 -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 +4 -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/docs/branding.md CHANGED
@@ -15,7 +15,7 @@ install needs no change — but the names below are the ones to write:
15
15
 
16
16
  | Variable | Default | Where it surfaces |
17
17
  |---|---|---|
18
- | `CLEAROTRON_BRAND_NAME` | `Clearotron` | Report title and watermark, pool index header, portal nav, Excel metadata, connector instructions |
18
+ | `CLEAROTRON_BRAND_NAME` | `Clearotron` | Report title, pool index header, the portal's logo, its page title and the sentences that name the installation, Excel metadata, connector instructions |
19
19
  | `CLEAROTRON_BRAND_TAGLINE` | *(empty — no strapline is rendered)* | Report and portal chrome |
20
20
  | `CLEAROTRON_BRAND_PRODUCT` | `Trademark clearance` | Artifact naming and connector instructions |
21
21
 
@@ -39,9 +39,9 @@ Unset, the words are plain text.
39
39
 
40
40
  - **The palette is not env-overridable.** Brand colours are defined in code beside those variables.
41
41
  Changing them is a code change, not configuration.
42
- - **Neither is the mark.** The ridge mark is drawn in code (`shared/brand.mjs`) and is Cordillera's,
43
- not the product's. A deployment that sets the three variables gets its own *name* on every artifact
44
- and still gets that mark beside it. Replacing it is a code change today; if you are deploying under
42
+ - **Neither is the mark.** The bracket mark is drawn in code (`shared/brand.mjs`) and is the product's.
43
+ A deployment that sets the three variables gets its own *name* on every artifact and still gets that
44
+ mark beside it. Replacing it is a code change today; if you are deploying under
45
45
  your own name, do it. The Swiss flag that used to sit inside the wordmark is **gone** — a shape is
46
46
  not a claim, but a national flag beside someone else's name was one.
47
47
  - **`portal-ui/dist` is committed and CI byte-compares it against a fresh build.** Brand strings are
@@ -0,0 +1,320 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://clearotron.ai/schemas/report-data/clearance-1.schema.json",
4
+ "title": "report-data/clearance-1",
5
+ "description": "report-data.json beside a clearance report: the client's cut of the run as data. Written by driver/publish/report-data.mjs (clearanceReportData).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema", "kind", "runId", "codename", "matter", "markName", "title", "customerKey", "issued", "engineCommit", "servedModels", "url", "auditFile", "level", "framework", "rating", "caption", "jurisdiction", "scopeBasis", "searchedJurisdictions", "markAssessment", "fourAnswers", "findings", "contextNotes", "coverage", "actions", "askAnswers"],
9
+ "properties": {
10
+ "schema": { "const": "report-data/clearance-1" },
11
+ "kind": { "const": "clearance" },
12
+ "runId": { "type": "string" },
13
+ "codename": { "type": ["string", "null"] },
14
+ "matter": { "type": "string" },
15
+ "markName": { "type": ["string", "null"] },
16
+ "title": { "type": ["string", "null"] },
17
+ "customerKey": { "type": "string" },
18
+ "issued": { "type": ["string", "null"] },
19
+ "engineCommit": { "type": ["string", "null"], "description": "The engine build that produced the report." },
20
+ "servedModels": { "type": ["array", "null"], "items": { "type": "string" }, "description": "The models that served the run, in first-use order; null when none was read." },
21
+ "url": { "type": ["string", "null"] },
22
+ "auditFile": { "type": ["string", "null"] },
23
+ "level": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": ["searchLevel", "stageLabel"],
27
+ "properties": {
28
+ "searchLevel": { "type": ["string", "null"] },
29
+ "stageLabel": { "type": ["string", "null"] }
30
+ }
31
+ },
32
+ "framework": {
33
+ "type": ["object", "null"],
34
+ "additionalProperties": false,
35
+ "required": ["key", "title", "bands"],
36
+ "properties": {
37
+ "key": { "type": "string" },
38
+ "title": { "type": "string" },
39
+ "bands": { "type": "array", "items": { "$ref": "#/$defs/band" } }
40
+ }
41
+ },
42
+ "rating": {
43
+ "type": ["object", "null"],
44
+ "additionalProperties": false,
45
+ "required": ["tier", "badge", "band", "statement", "conditions"],
46
+ "properties": {
47
+ "tier": { "type": ["string", "null"] },
48
+ "badge": { "type": ["string", "null"] },
49
+ "band": {
50
+ "type": ["object", "null"],
51
+ "additionalProperties": false,
52
+ "required": ["label", "rankFromTop", "scale"],
53
+ "properties": {
54
+ "label": { "type": "string" },
55
+ "rankFromTop": { "type": "integer" },
56
+ "scale": { "type": "integer" }
57
+ }
58
+ },
59
+ "statement": { "type": ["string", "null"] },
60
+ "conditions": { "type": "array", "items": { "type": "string" } }
61
+ }
62
+ },
63
+ "caption": { "type": ["string", "null"] },
64
+ "assessment": { "const": "not-completed", "description": "Present only when the run's overall assessment could not be completed: there is then no rating and no finding." },
65
+ "jurisdiction": { "type": ["string", "null"] },
66
+ "scopeBasis": { "enum": ["instructed", "worldwide", "inferred", null] },
67
+ "searchedJurisdictions": { "type": "array", "items": { "type": "string" } },
68
+ "markAssessment": {
69
+ "type": ["object", "null"],
70
+ "additionalProperties": false,
71
+ "required": ["distinctiveness", "connotation"],
72
+ "properties": {
73
+ "distinctiveness": { "$ref": "#/$defs/assessmentField" },
74
+ "connotation": { "$ref": "#/$defs/assessmentField" }
75
+ }
76
+ },
77
+ "fourAnswers": {
78
+ "type": ["object", "null"],
79
+ "additionalProperties": false,
80
+ "properties": {
81
+ "third_party_rights": { "$ref": "#/$defs/answer", "properties": { "token": { "enum": ["strong", "moderate", "weak"] } } },
82
+ "objection_likelihood": { "$ref": "#/$defs/answer", "properties": { "token": { "enum": ["likely", "possible", "unlikely"] } } },
83
+ "registrability": { "$ref": "#/$defs/answer", "properties": { "token": { "enum": ["registrable", "registrable-with-conditions", "obstructed"] } } },
84
+ "client_enforceability": { "$ref": "#/$defs/answer", "properties": { "token": { "enum": ["strong", "moderate", "weak"] } } }
85
+ }
86
+ },
87
+ "findings": { "type": "array", "items": { "$ref": "#/$defs/finding" } },
88
+ "contextNotes": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["type", "mark", "context"],
94
+ "properties": {
95
+ "type": { "enum": ["famous-neighbour-ungrounded"] },
96
+ "mark": { "type": "string" },
97
+ "owner": { "type": "string" },
98
+ "context": { "type": ["string", "null"] }
99
+ }
100
+ }
101
+ },
102
+ "coverage": {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": ["area", "state"],
108
+ "properties": {
109
+ "area": { "type": ["string", "null"] },
110
+ "state": { "enum": ["confirmed-clean", "coverage-limited", "open", "not-searched", "note"] },
111
+ "note": { "type": "string" }
112
+ }
113
+ }
114
+ },
115
+ "actions": {
116
+ "type": "object",
117
+ "additionalProperties": false,
118
+ "required": ["conditions", "advisories"],
119
+ "properties": {
120
+ "conditions": { "type": "array", "items": { "$ref": "#/$defs/action", "properties": { "kind": { "enum": ["consent", "coexistence-agreement", "territorial-delimitation", "goods-amendment", "mark-modification", "senior-clearance", "proceeding-response", "counsel-opinion-required"] } } } },
121
+ "advisories": { "type": "array", "items": { "$ref": "#/$defs/action", "properties": { "kind": { "enum": ["client-fact", "commercial-decision", "monitoring", "filing-routine"] } } } }
122
+ }
123
+ },
124
+ "askAnswers": {
125
+ "type": "array",
126
+ "items": {
127
+ "type": "object",
128
+ "additionalProperties": false,
129
+ "required": ["ask", "answer"],
130
+ "properties": {
131
+ "ask": { "type": "string" },
132
+ "answer": { "type": "string" }
133
+ }
134
+ }
135
+ }
136
+ },
137
+ "$defs": {
138
+ "band": {
139
+ "type": "object",
140
+ "additionalProperties": false,
141
+ "required": ["label", "tone"],
142
+ "properties": {
143
+ "label": { "type": "string" },
144
+ "tone": { "enum": ["severe", "high", "medium", "low", "minimal"] }
145
+ }
146
+ },
147
+ "deadline": {
148
+ "type": ["object", "null"],
149
+ "additionalProperties": false,
150
+ "required": ["kind", "date"],
151
+ "properties": {
152
+ "kind": { "type": ["string", "null"] },
153
+ "date": { "type": "string" }
154
+ }
155
+ },
156
+ "classNote": {
157
+ "type": "object",
158
+ "additionalProperties": false,
159
+ "required": ["class", "note"],
160
+ "properties": {
161
+ "class": { "type": "string" },
162
+ "note": { "type": ["string", "null"] }
163
+ }
164
+ },
165
+ "assessmentField": {
166
+ "type": ["object", "null"],
167
+ "additionalProperties": false,
168
+ "required": ["text"],
169
+ "properties": {
170
+ "text": { "type": ["string", "null"] },
171
+ "spectrum": { "type": "string" },
172
+ "per_class": { "type": "array", "items": { "$ref": "#/$defs/classNote" } },
173
+ "per_market": {
174
+ "type": "array",
175
+ "items": {
176
+ "type": "object",
177
+ "additionalProperties": false,
178
+ "required": ["market", "note"],
179
+ "properties": {
180
+ "market": { "type": ["string", "null"] },
181
+ "note": { "type": ["string", "null"] }
182
+ }
183
+ }
184
+ },
185
+ "counter_registrations": {
186
+ "type": "array",
187
+ "items": {
188
+ "type": "object",
189
+ "additionalProperties": false,
190
+ "properties": {
191
+ "mark": { "type": "string" },
192
+ "uri": { "type": "string" },
193
+ "owner": { "type": "string" },
194
+ "note": { "type": "string" }
195
+ }
196
+ }
197
+ },
198
+ "acquired": { "type": "string" },
199
+ "note": { "type": "string" }
200
+ }
201
+ },
202
+ "answer": {
203
+ "type": "object",
204
+ "additionalProperties": false,
205
+ "required": ["read"],
206
+ "properties": {
207
+ "read": { "type": ["string", "null"] },
208
+ "token": { "type": "string" },
209
+ "basis": { "type": "string" },
210
+ "ordinals": { "type": "array", "items": { "type": "integer" } },
211
+ "obstacles": { "type": "array", "items": { "$ref": "#/$defs/classNote" } }
212
+ }
213
+ },
214
+ "meter": {
215
+ "type": "object",
216
+ "additionalProperties": false,
217
+ "required": ["token", "basis"],
218
+ "properties": {
219
+ "token": { "type": ["string", "null"] },
220
+ "basis": { "enum": ["verified-from-record", "inferred-from-signal", null] }
221
+ }
222
+ },
223
+ "finding": {
224
+ "type": "object",
225
+ "additionalProperties": false,
226
+ "required": ["ordinal", "mark", "band", "net", "group", "composite", "level", "owner", "meters", "quadrant", "source", "impact", "legal_position", "practical_position", "manageable", "deadline"],
227
+ "properties": {
228
+ "ordinal": { "type": "integer" },
229
+ "mark": { "type": "string" },
230
+ "band": { "type": ["string", "null"] },
231
+ "inputs": { "type": "object", "additionalProperties": { "type": "string" }, "description": "The framework's own inputs for the finding, present only where the framework states a method." },
232
+ "net": { "type": ["string", "null"] },
233
+ "group": { "enum": ["on-field", "off-field", "out-of-scope", null] },
234
+ "composite": { "type": ["integer", "null"], "description": "Kept on runs rated before bands, so an archived run still publishes." },
235
+ "level": { "enum": ["A", "B", "C", "D", "E", null] },
236
+ "owner": {
237
+ "type": "object",
238
+ "additionalProperties": false,
239
+ "required": ["name", "country", "registrations"],
240
+ "properties": {
241
+ "name": { "type": ["string", "null"] },
242
+ "country": { "type": ["string", "null"] },
243
+ "registrations": {
244
+ "type": "array",
245
+ "items": {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": ["uri", "classes", "status", "filed", "expiry", "jurisdiction"],
249
+ "properties": {
250
+ "uri": { "type": "string" },
251
+ "classes": { "type": "array", "items": { "type": "string" } },
252
+ "status": { "type": ["string", "null"] },
253
+ "filed": { "type": ["string", "null"] },
254
+ "expiry": { "type": ["string", "null"] },
255
+ "jurisdiction": { "type": ["string", "null"] }
256
+ }
257
+ }
258
+ }
259
+ }
260
+ },
261
+ "meters": {
262
+ "type": ["object", "null"],
263
+ "additionalProperties": false,
264
+ "properties": {
265
+ "mark_similarity": { "$ref": "#/$defs/meter", "properties": { "token": { "enum": ["high", "medium", "low", null] } } },
266
+ "goods_proximity": { "$ref": "#/$defs/meter", "properties": { "token": { "enum": ["high", "medium", "low", null] } } },
267
+ "use": { "$ref": "#/$defs/meter", "properties": { "token": { "enum": ["confirmed", "not-confirmed", "unknown", null] } } },
268
+ "enforcer": { "$ref": "#/$defs/meter", "properties": { "token": { "enum": ["high", "medium", "low", "unknown", null] } } }
269
+ }
270
+ },
271
+ "quadrant": {
272
+ "type": ["object", "null"],
273
+ "additionalProperties": false,
274
+ "required": ["x", "y"],
275
+ "properties": {
276
+ "x": { "type": "number", "minimum": 0, "maximum": 1 },
277
+ "y": { "type": "number", "minimum": 0, "maximum": 1 }
278
+ }
279
+ },
280
+ "source": {
281
+ "type": ["object", "null"],
282
+ "additionalProperties": false,
283
+ "required": ["source_type", "resolved_link"],
284
+ "properties": {
285
+ "source_type": { "enum": ["register-vendor", "register-euipo", "common-law-marketplace", "common-law-web", "case-law", null] },
286
+ "resolved_link": { "type": ["string", "null"] }
287
+ }
288
+ },
289
+ "impact": { "type": ["string", "null"] },
290
+ "legal_position": { "type": ["string", "null"] },
291
+ "practical_position": { "type": ["string", "null"] },
292
+ "off_field_ground": { "enum": ["different-field", "no-material-risk"] },
293
+ "manageable": {
294
+ "type": ["object", "null"],
295
+ "additionalProperties": false,
296
+ "required": ["category", "reason"],
297
+ "properties": {
298
+ "category": { "enum": ["large-competitor", "commercial-partner", "troll", "well-known-enforcer"] },
299
+ "reason": { "type": ["string", "null"] }
300
+ }
301
+ },
302
+ "deadline": { "$ref": "#/$defs/deadline" },
303
+ "ruled_out": { "const": true },
304
+ "ruled_out_reason": { "type": ["string", "null"] }
305
+ }
306
+ },
307
+ "action": {
308
+ "type": "object",
309
+ "additionalProperties": false,
310
+ "required": ["id", "kind", "text", "ordinals", "deadline"],
311
+ "properties": {
312
+ "id": { "type": ["integer", "null"] },
313
+ "kind": { "type": ["string", "null"] },
314
+ "text": { "type": ["string", "null"] },
315
+ "ordinals": { "type": "array", "items": { "type": "integer" } },
316
+ "deadline": { "$ref": "#/$defs/deadline" }
317
+ }
318
+ }
319
+ }
320
+ }
@@ -0,0 +1,268 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://clearotron.ai/schemas/report-data/knockout-1.schema.json",
4
+ "title": "report-data/knockout-1",
5
+ "description": "report-data.json beside a Knockout report, one file per name: the run as data. Written by knockoutReportData.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema", "runId", "codename", "matter", "customerKey", "issued", "url", "auditFile", "servedModels", "level", "framework", "overall", "summary", "productContext", "caveats", "marks", "registerCountBasis", "registerFilingsBasis", "registerProvider"],
9
+ "properties": {
10
+ "schema": { "const": "report-data/knockout-1" },
11
+ "runId": { "type": "string" },
12
+ "codename": { "type": ["string", "null"] },
13
+ "matter": { "type": "string" },
14
+ "customerKey": { "type": "string" },
15
+ "issued": { "type": ["string", "null"] },
16
+ "url": { "type": ["string", "null"] },
17
+ "auditFile": { "type": ["string", "null"] },
18
+ "servedModels": { "type": ["array", "null"], "items": { "type": "string" }, "description": "The models that served the run, in first-use order; null when none was read." },
19
+ "level": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": ["searchLevel", "stageLabel", "identity"],
23
+ "properties": {
24
+ "searchLevel": { "type": ["string", "null"] },
25
+ "stageLabel": { "type": ["string", "null"] },
26
+ "identity": { "type": ["string", "null"] }
27
+ }
28
+ },
29
+ "framework": {
30
+ "type": ["object", "null"],
31
+ "additionalProperties": false,
32
+ "required": ["key", "title", "bands"],
33
+ "properties": {
34
+ "key": { "type": "string" },
35
+ "title": { "type": "string" },
36
+ "bands": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["label", "tone"],
42
+ "properties": {
43
+ "label": { "type": "string" },
44
+ "tone": { "enum": ["severe", "high", "medium", "low", "minimal"] }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "overall": { "type": ["string", "null"] },
51
+ "summary": { "type": ["string", "null"] },
52
+ "productContext": { "type": ["string", "null"] },
53
+ "caveats": { "type": "array", "items": { "type": "string" } },
54
+ "marks": { "type": "array", "items": { "$ref": "#/$defs/mark" } },
55
+ "registerCountBasis": { "type": ["string", "null"] },
56
+ "registerFilingsBasis": { "type": ["string", "null"] },
57
+ "registerProvider": { "type": ["string", "null"] }
58
+ },
59
+ "$defs": {
60
+ "classes": { "type": "array", "items": { "type": "integer" } },
61
+ "inputs": { "type": "object", "additionalProperties": { "type": "string" }, "description": "The framework's own inputs, present only where the framework states a method." },
62
+ "mark": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": ["name", "band", "qualifier", "contextFraming", "classesSearched", "classesDriving", "degraded", "points", "assessment", "counterFactors", "mitigation", "crowdedField", "reviewerNotes", "negatives", "registerReads", "findings", "registerCounts", "registerFilings"],
66
+ "properties": {
67
+ "name": { "type": "string" },
68
+ "band": { "type": ["string", "null"] },
69
+ "qualifier": { "enum": ["low", null] },
70
+ "contextFraming": { "type": ["string", "null"] },
71
+ "classesSearched": { "$ref": "#/$defs/classes" },
72
+ "classesDriving": { "$ref": "#/$defs/classes" },
73
+ "classGroups": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": ["band", "classes"],
79
+ "properties": {
80
+ "band": { "type": "string" },
81
+ "ratingQualifier": { "enum": ["low", null] },
82
+ "classes": { "$ref": "#/$defs/classes" }
83
+ }
84
+ }
85
+ },
86
+ "degraded": { "type": "boolean" },
87
+ "points": { "type": "array", "items": { "type": "string" } },
88
+ "assessment": { "type": ["string", "null"] },
89
+ "counterFactors": { "type": "array", "items": { "type": "string" } },
90
+ "mitigation": { "type": ["string", "null"] },
91
+ "crowdedField": { "type": ["boolean", "null"] },
92
+ "reviewerNotes": {
93
+ "type": "array",
94
+ "items": {
95
+ "anyOf": [
96
+ { "type": "string" },
97
+ {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "properties": {
101
+ "text": { "type": "string" },
102
+ "note": { "type": "string" },
103
+ "about": { "type": ["string", "null"] }
104
+ }
105
+ }
106
+ ]
107
+ }
108
+ },
109
+ "negatives": {
110
+ "type": "array",
111
+ "items": {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": ["term", "source", "note"],
115
+ "properties": {
116
+ "term": { "type": ["string", "null"] },
117
+ "source": { "type": ["string", "null"] },
118
+ "note": { "type": ["string", "null"] }
119
+ }
120
+ }
121
+ },
122
+ "registerReads": {
123
+ "type": "array",
124
+ "items": {
125
+ "type": "object",
126
+ "additionalProperties": false,
127
+ "required": ["recordId", "read", "band"],
128
+ "properties": {
129
+ "recordId": { "type": ["string", "null"] },
130
+ "read": { "type": ["string", "null"] },
131
+ "band": { "type": ["string", "null"] },
132
+ "inputs": { "$ref": "#/$defs/inputs" }
133
+ }
134
+ }
135
+ },
136
+ "findings": { "type": "array", "items": { "anyOf": [{ "$ref": "#/$defs/webFinding" }, { "$ref": "#/$defs/registerFinding" }] } },
137
+ "registerCounts": {
138
+ "type": ["object", "null"],
139
+ "additionalProperties": false,
140
+ "required": ["classScope", "classes", "identical", "containing", "close", "closeVariationForms", "closeVariationsLine", "line"],
141
+ "properties": {
142
+ "classScope": { "enum": ["mark", "batch", "all-classes", null] },
143
+ "classes": { "$ref": "#/$defs/classes" },
144
+ "identical": { "type": ["integer", "null"] },
145
+ "containing": { "type": ["integer", "null"] },
146
+ "close": { "type": ["integer", "null"] },
147
+ "floors": {
148
+ "type": "object",
149
+ "additionalProperties": false,
150
+ "properties": {
151
+ "identical": { "type": "number" },
152
+ "containing": { "type": "number" },
153
+ "close": { "type": "number" }
154
+ }
155
+ },
156
+ "closeVariationForms": { "type": "array", "items": { "type": "string" } },
157
+ "closeVariationsLine": { "type": ["string", "null"] },
158
+ "line": { "type": ["string", "null"] }
159
+ }
160
+ },
161
+ "registerFilings": {
162
+ "anyOf": [
163
+ { "type": "null" },
164
+ {
165
+ "type": "object",
166
+ "additionalProperties": false,
167
+ "required": ["available", "line", "records"],
168
+ "properties": {
169
+ "available": { "const": false },
170
+ "line": { "type": "string" },
171
+ "records": { "type": "array", "maxItems": 0 }
172
+ }
173
+ },
174
+ {
175
+ "type": "object",
176
+ "additionalProperties": false,
177
+ "required": ["available", "line", "fetched", "capped", "cap", "records", "unanswered"],
178
+ "properties": {
179
+ "available": { "const": true },
180
+ "line": { "type": ["string", "null"] },
181
+ "fetched": { "type": "integer" },
182
+ "capped": { "type": "boolean" },
183
+ "cap": { "type": ["integer", "null"] },
184
+ "records": { "type": "array", "items": { "$ref": "#/$defs/record" } },
185
+ "unanswered": {
186
+ "type": "array",
187
+ "items": {
188
+ "type": "object",
189
+ "additionalProperties": false,
190
+ "required": ["form", "basis", "reason"],
191
+ "properties": {
192
+ "form": { "type": ["string", "null"] },
193
+ "basis": { "type": ["string", "null"] },
194
+ "reason": { "type": ["string", "null"] }
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+ ]
201
+ }
202
+ }
203
+ },
204
+ "webFinding": {
205
+ "type": "object",
206
+ "additionalProperties": false,
207
+ "required": ["ref", "ordinal", "name", "owner", "band", "type", "net", "basis", "evidence", "shape"],
208
+ "properties": {
209
+ "ref": { "type": "string" },
210
+ "ordinal": { "type": "integer" },
211
+ "name": { "type": ["string", "null"] },
212
+ "owner": { "type": ["string", "null"] },
213
+ "band": { "type": ["string", "null"] },
214
+ "type": { "type": ["string", "null"] },
215
+ "net": { "type": ["string", "null"] },
216
+ "basis": { "type": ["string", "null"] },
217
+ "evidence": { "type": "array", "items": { "type": "string" } },
218
+ "shape": { "enum": ["typed", "prose"] },
219
+ "inputs": { "$ref": "#/$defs/inputs" }
220
+ }
221
+ },
222
+ "registerFinding": {
223
+ "type": "object",
224
+ "additionalProperties": false,
225
+ "required": ["ref", "ordinal", "name", "owner", "band", "type", "net", "basis", "useCheckSource", "evidence", "shape"],
226
+ "properties": {
227
+ "ref": { "type": "string" },
228
+ "ordinal": { "type": "integer" },
229
+ "name": { "type": ["string", "null"] },
230
+ "owner": { "type": ["string", "null"] },
231
+ "band": { "type": ["string", "null"] },
232
+ "inputs": { "$ref": "#/$defs/inputs" },
233
+ "type": { "const": "Register filing" },
234
+ "net": { "type": "string" },
235
+ "basis": { "type": "string" },
236
+ "useCheckSource": { "type": ["string", "null"] },
237
+ "evidence": { "type": "array", "items": { "type": "string" } },
238
+ "shape": { "const": "register" }
239
+ }
240
+ },
241
+ "record": {
242
+ "type": "object",
243
+ "additionalProperties": false,
244
+ "required": ["mark", "owner", "status", "classes", "territory", "matchedForm", "matchedBasis", "recordId", "url"],
245
+ "properties": {
246
+ "mark": { "type": ["string", "null"] },
247
+ "owner": { "type": ["string", "null"] },
248
+ "status": { "type": ["string", "null"] },
249
+ "classes": { "$ref": "#/$defs/classes" },
250
+ "territory": { "type": ["string", "null"] },
251
+ "matchedForm": { "type": ["string", "null"] },
252
+ "matchedBasis": { "type": ["string", "null"] },
253
+ "recordId": { "type": ["string", "null"] },
254
+ "url": { "type": ["string", "null"] },
255
+ "officeRecord": {
256
+ "type": "object",
257
+ "additionalProperties": false,
258
+ "required": ["label", "href", "reason"],
259
+ "properties": {
260
+ "label": { "type": ["string", "null"] },
261
+ "href": { "type": ["string", "null"] },
262
+ "reason": { "type": ["string", "null"] }
263
+ }
264
+ }
265
+ }
266
+ }
267
+ }
268
+ }