clearotron 0.6.0 → 0.7.0-beta.1

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 (146) 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/architecture/04-configuration-reference.md +105 -8
  12. package/docs/branding.md +4 -4
  13. package/docs/report-data/clearance-1.schema.json +320 -0
  14. package/docs/report-data/knockout-1.schema.json +268 -0
  15. package/driver/CHANGELOG.md +77 -0
  16. package/driver/cancel.mjs +19 -0
  17. package/driver/connotation-search.mjs +1 -1
  18. package/driver/contract-e3-backlog.mjs +41 -41
  19. package/driver/contract-vocabulary.mjs +1 -1
  20. package/driver/coverage-ledger.mjs +18 -2
  21. package/driver/deferral-row.mjs +1 -1
  22. package/driver/degraded-parts.mjs +1 -0
  23. package/driver/driver.config.mjs +5 -5
  24. package/driver/effective-scope.mjs +3 -1
  25. package/driver/engagement-receipt.mjs +3 -3
  26. package/driver/engine/anthropic-agent.mjs +15 -1
  27. package/driver/engine/common.mjs +7 -0
  28. package/driver/engine/mcp/band-server.mjs +7 -16
  29. package/driver/engine/mcp/codex-config.mjs +3 -0
  30. package/driver/engine/mcp/recording-server.mjs +45 -34
  31. package/driver/engine/openai-agent.mjs +74 -7
  32. package/driver/engine/session-record.mjs +44 -2
  33. package/driver/findings-model.mjs +14 -2
  34. package/driver/follow-up-twins.mjs +86 -0
  35. package/driver/gateway.mjs +77 -12
  36. package/driver/jx-units.mjs +3 -1
  37. package/driver/jx.mjs +13 -5
  38. package/driver/manuals-inline.mjs +98 -0
  39. package/driver/manuals-seen.mjs +134 -0
  40. package/driver/mark-logos.mjs +174 -0
  41. package/driver/methodology-witness.mjs +2 -1
  42. package/driver/owner-use-check.mjs +8 -4
  43. package/driver/package.json +1 -1
  44. package/driver/pipeline-knockout.mjs +23 -4
  45. package/driver/pipeline.mjs +128 -15
  46. package/driver/portal-local-auth.mjs +6 -2
  47. package/driver/portal-report.mjs +45 -14
  48. package/driver/portal-routes/me.mjs +4 -1
  49. package/driver/portal-runs.mjs +19 -16
  50. package/driver/predelivery-lint.mjs +7 -5
  51. package/driver/profiles.mjs +4 -4
  52. package/driver/publish/README.md +9 -7
  53. package/driver/publish/email-conditions.mjs +22 -5
  54. package/driver/publish/evidence-words.mjs +21 -0
  55. package/driver/publish/index.mjs +304 -211
  56. package/driver/publish/knockout.mjs +297 -247
  57. package/driver/publish/office-record-links.mjs +11 -9
  58. package/driver/publish/page-shell.mjs +98 -0
  59. package/driver/publish/pool-admin.mjs +2 -2
  60. package/driver/publish/publish-inputs.mjs +4 -0
  61. package/driver/publish/regions.mjs +28 -3
  62. package/driver/publish/register-record-html.mjs +105 -0
  63. package/driver/publish/register-record.mjs +165 -0
  64. package/driver/publish/render-knockout.mjs +299 -671
  65. package/driver/publish/render.mjs +561 -492
  66. package/driver/publish/report-data.mjs +226 -13
  67. package/driver/publish/report-document.mjs +353 -0
  68. package/driver/publish/search-depth.mjs +88 -7
  69. package/driver/publish/shell.mjs +41 -1
  70. package/driver/publish/strings.mjs +810 -0
  71. package/driver/publish/templates/clearance-print.css +23 -0
  72. package/driver/publish/templates/knockout.css +224 -0
  73. package/driver/publish/templates/report.css +112 -53
  74. package/driver/publish/xlsx.mjs +158 -139
  75. package/driver/record-goods.mjs +42 -0
  76. package/driver/reference-score.mjs +4 -1
  77. package/driver/register-count.mjs +5 -1
  78. package/driver/register-reach.mjs +39 -0
  79. package/driver/registry-fidelity.mjs +155 -37
  80. package/driver/repair-composers.mjs +7 -3
  81. package/driver/repair-targets.mjs +4 -1
  82. package/driver/replay-archive.mjs +4 -3
  83. package/driver/run-delivered.mjs +14 -8
  84. package/driver/run-record.mjs +1 -0
  85. package/driver/runner.mjs +73 -29
  86. package/driver/scope-facts.mjs +27 -6
  87. package/driver/search-policy.mjs +9 -4
  88. package/driver/skills/clearance-search/report-prose.md +3 -0
  89. package/driver/skills/knockout-assess/SKILL.md +8 -0
  90. package/driver/stage-freshness.mjs +8 -5
  91. package/driver/stages.mjs +69 -43
  92. package/driver/steps/delivery.mjs +9 -5
  93. package/driver/steps/overview-and-cards.mjs +54 -15
  94. package/driver/steps/register-sweep.mjs +5 -4
  95. package/driver/steps/skeptic-and-follow-up.mjs +3 -2
  96. package/driver/steps/verdict-gate.mjs +35 -14
  97. package/driver/suite-census.json +579 -87
  98. package/driver/synthesis-record.mjs +4 -3
  99. package/driver/terminal-clamp.mjs +6 -1
  100. package/driver/withdrawn-rating.mjs +72 -0
  101. package/mcp-server/CHANGELOG.md +8 -0
  102. package/mcp-server/lib/audit-view.mjs +5 -2
  103. package/mcp-server/lib/brief.mjs +6 -2
  104. package/mcp-server/lib/evidence.mjs +94 -23
  105. package/mcp-server/lib/findings.mjs +19 -2
  106. package/mcp-server/lib/knockout.mjs +13 -4
  107. package/mcp-server/lib/scrub.mjs +1 -1
  108. package/mcp-server/package.json +1 -1
  109. package/mcp-server/server.mjs +22 -3
  110. package/package.json +4 -1
  111. package/portal-ui/dist/assets/{index-CYaO2ygd.js → index-BBlN4CYq.js} +238 -80
  112. package/portal-ui/dist/assets/{index-izLa9apq.css → index-CxAkJXIT.css} +25 -5
  113. package/portal-ui/dist/index.html +2 -2
  114. package/portal-ui/package.json +3 -3
  115. package/providers/_shared/ledger.mjs +30 -2
  116. package/providers/_shared/record-uri.mjs +15 -0
  117. package/providers/clarivate/src/adapter.js +11 -0
  118. package/providers/clarivate/src/core.js +17 -1
  119. package/providers/jx/src/core.js +4 -4
  120. package/providers/jx/src/judge.js +1 -3
  121. package/providers/jx/src/nativeread.js +1 -3
  122. package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
  123. package/providers/oauth-mcp-bridge/package.json +1 -1
  124. package/scripts/README.md +147 -3
  125. package/scripts/added-reference-check.mjs +35 -7
  126. package/scripts/e2e-first-time.mjs +4 -4
  127. package/scripts/env-audit.mjs +16 -9
  128. package/scripts/freeze-example-run.mjs +3 -3
  129. package/scripts/mint-public-residue.mjs +3 -3
  130. package/scripts/mint-search-level-tags.mjs +61 -0
  131. package/scripts/mint-source-pin-census.mjs +89 -0
  132. package/scripts/release-note-required.mjs +65 -6
  133. package/scripts/test-durations-reporter.mjs +25 -0
  134. package/scripts/test-full.mjs +72 -18
  135. package/scripts/test-run.mjs +18 -1
  136. package/shared/brand.mjs +93 -6
  137. package/shared/inline-markdown.mjs +53 -0
  138. package/shared/names-in-force.mjs +0 -1
  139. package/shared/portal-tokens.mjs +2 -1
  140. package/shared/reference-guard-classes.mjs +43 -2
  141. package/shared/register-selection.mjs +8 -3
  142. package/shared/search-level-tags.json +25 -0
  143. package/shared/source-spans.mjs +91 -0
  144. package/shared/tools/derive-band-pairs.mjs +10 -0
  145. package/driver/own-rights.mjs +0 -83
  146. package/driver/use-check.mjs +0 -85
@@ -1,85 +0,0 @@
1
- // SPDX-License-Identifier: AGPL-3.0-only
2
- // Copyright 2026 Cordillera Sàrl. Additional terms under section 7 of the AGPL-3.0 apply — see ADDITIONAL-TERMS.md
3
- // use-check.mjs — WS2 (spec 11): the deterministic enforcement substrate for the targeted use-check.
4
- //
5
- // The pivotal practical question for a registered-but-maybe-unused conflict is "does the owner actually USE
6
- // the mark for these goods?" On marble-keystone the run INFERRED "no use" from the owner's profile (a music act)
7
- // and simultaneously handed "confirm actual use" to the requester — a must-have, search-answerable question
8
- // both asserted and deferred. The Step-3.5 use-check that should have run is mandated in the skill prose AND
9
- // LEAKED anyway, so a stronger instruction is not the fix.
10
- //
11
- // Enforcement here is on the only machine-checkable substrate available: the DOCUMENT SHAPE of narrative.md.
12
- // (There is no perplexity call ledger — unlike the Corsearch record_fetch URIs the screen-gate cross-checks —
13
- // so the cited result inside the narrative is the only proof a query ran.) Rule: a finding at Composite ≥3
14
- // whose mitigant depends on the ABSENCE of use must carry a "**Use-check source:**" line (a real URL, or the
15
- // honest "perplexity_research — no result"). This is wired into validators.narrative (verify.mjs) and is FATAL
16
- // — a violating narrative cannot pass validation, so it cannot reach report-synthesis. Pure over the narrative
17
- // text, like screen-gate, so it tests without a gateway.
18
-
19
- // The mitigant/verdict depends on the (absence of) actual use. Anchored on the synthesis stage's own stock
20
- // vocabulary for a filed-but-unused conflict.
21
- const USE_NEGATIVE_RE = new RegExp([
22
- "non-use", // "vulnerable to non-use", "non-use cancellation/revocation"
23
- "not in actual use",
24
- "\\bunused\\b", // "almost certainly unused"
25
- "no [^.\\n]{0,40}\\buse\\b[^.\\n]{0,24}\\b(?:found|identified)\\b", // "no marketplace use … found"
26
- "\\buse\\b[^.\\n]{0,14}\\b(?:unknown|unconfirmed|unclear)\\b", // "owner's use unknown/unconfirmed"
27
- "filed-vs-used",
28
- ].join("|"), "i");
29
-
30
- // A cited use-result satisfies the requirement. Loose on purpose (bold optional) — we must NOT false-flag a
31
- // finding that already carries an honest use-result/inconclusive line.
32
- const USE_SOURCE_RE = /use-?check source\s*:/i;
33
-
34
- // Composite digit from a finding block, e.g. "**Composite — 3 (Medium).**" or "Composite 2 (Manageable)".
35
- function parseComposite(block) {
36
- const m = block.match(/\bComposite\b[^\d\n]{0,14}(\d)/i);
37
- return m ? Number(m[1]) : null;
38
- }
39
-
40
- // A block is a rated FINDING (the only thing the use-check polices) if its heading names a Finding or its body
41
- // carries a Composite marker. This deliberately excludes the "## Actions" / "## Bottom line" / coverage
42
- // sections, which paraphrase the same use language but are not the finding that must carry the searched result.
43
- function isFinding(heading, block) {
44
- return /\bfinding\b/i.test(heading) || /\*\*\s*composite\b/i.test(block);
45
- }
46
-
47
- /**
48
- * Find Composite ≥3 use-dependent findings that assert a use-negative without a searched use-result.
49
- *
50
- * A finding block VIOLATES when: it is a rated finding, its text matches a use-negative, it is Composite ≥3
51
- * (floor-safe: an unparseable Composite that still matches the use-negative is treated as ≥3 — never let a
52
- * format wobble drop the gate), AND it carries no "**Use-check source:**" line. Composite <3 never triggers
53
- * (a manageable finding doesn't justify the query). Pure: empty/missing input → no violations, never throws.
54
- *
55
- * @param {string} narrativeContent the narrative.md text
56
- * @returns {Array<{finding:string, composite:number|null}>} offending findings (empty ⇒ clean)
57
- */
58
- export function findUseCheckViolations(narrativeContent) {
59
- const lines = (narrativeContent || "").split("\n");
60
- const blocks = [];
61
- let cur = null;
62
- for (const ln of lines) {
63
- const h = ln.match(/^(#{2,4})\s+(.*)/);
64
- if (h) {
65
- if (cur) blocks.push(cur);
66
- cur = { heading: h[2].trim(), body: [] };
67
- } else if (cur) {
68
- cur.body.push(ln);
69
- }
70
- }
71
- if (cur) blocks.push(cur);
72
-
73
- const violations = [];
74
- for (const b of blocks) {
75
- const block = `${b.heading}\n${b.body.join("\n")}`;
76
- if (!isFinding(b.heading, block)) continue;
77
- if (!USE_NEGATIVE_RE.test(block)) continue; // mitigant doesn't turn on the absence of use
78
- const composite = parseComposite(block);
79
- const triggers = composite === null ? true : composite >= 3; // floor-safe on an unparseable Composite
80
- if (!triggers) continue;
81
- if (USE_SOURCE_RE.test(block)) continue; // a searched use-result (or honest "no result") is cited
82
- violations.push({ finding: b.heading, composite });
83
- }
84
- return violations;
85
- }