clearotron 0.3.2 → 0.3.3-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 (105) hide show
  1. package/CONTRIBUTING.md +12 -0
  2. package/INSTALL.md +8 -0
  3. package/bin/onboard.mjs +29 -7
  4. package/bin/start.mjs +1 -1
  5. package/build-info.json +2 -2
  6. package/demo/MANIFEST.json +27 -0
  7. package/docs/INTAKE.md +8 -0
  8. package/docs/architecture/04-configuration-reference.md +1 -1
  9. package/driver/CHANGELOG.md +37 -0
  10. package/driver/clearance-variants-record.mjs +12 -1
  11. package/driver/common-law-coverage-status.mjs +113 -0
  12. package/driver/contract-audit.mjs +1 -1
  13. package/driver/contract-e3-backlog.mjs +37 -37
  14. package/driver/contract-vocabulary.mjs +8 -8
  15. package/driver/coverage-form-io.mjs +3 -1
  16. package/driver/coverage-form.mjs +38 -11
  17. package/driver/coverage-ledger.mjs +37 -7
  18. package/driver/coverage-union.mjs +2 -2
  19. package/driver/crowd-context.mjs +19 -6
  20. package/driver/drainer-identity.mjs +1 -1
  21. package/driver/engine/mcp/clarivate-server.mjs +4 -2
  22. package/driver/engine/mcp/corsearch-server.mjs +3 -1
  23. package/driver/engine/mcp/coverage-server.mjs +1 -1
  24. package/driver/engine/mcp/dispositions-server.mjs +47 -5
  25. package/driver/engine/mcp/euipo-server.mjs +2 -0
  26. package/driver/engine/mcp/free-tier-server.mjs +2 -0
  27. package/driver/engine/mcp/gather-config.mjs +8 -2
  28. package/driver/engine/mcp/probe-server.mjs +28 -0
  29. package/driver/engine/mcp/proposal-fields.mjs +45 -0
  30. package/driver/engine/mcp/recording-server.mjs +30 -0
  31. package/driver/engine/mcp/signa-server.mjs +2 -0
  32. package/driver/engine/mcp/supplemental.mjs +89 -12
  33. package/driver/engine/mcp/unit-note-server.mjs +50 -0
  34. package/driver/engine/mcp/uspto-local-server.mjs +2 -0
  35. package/driver/engine/openai-agent.mjs +7 -0
  36. package/driver/engine/probe.mjs +67 -14
  37. package/driver/engine/tool-refusal.mjs +16 -0
  38. package/driver/enqueue-schema.mjs +2 -2
  39. package/driver/envelope-settle.mjs +82 -13
  40. package/driver/findings-model.mjs +4 -4
  41. package/driver/gateway.mjs +18 -2
  42. package/driver/manager-groups-verdict.mjs +1 -1
  43. package/driver/matter-frame-record.mjs +24 -7
  44. package/driver/named-band.mjs +1 -1
  45. package/driver/package.json +1 -1
  46. package/driver/partial-payload-baseline.json +12 -3
  47. package/driver/pipeline.mjs +141 -37
  48. package/driver/publish/index.mjs +40 -25
  49. package/driver/publish/xlsx.mjs +26 -4
  50. package/driver/queue-markers.mjs +44 -0
  51. package/driver/queue-watch-verdict.mjs +2 -2
  52. package/driver/register-availability.mjs +2 -2
  53. package/driver/register-plan.mjs +313 -21
  54. package/driver/roster-verdict.mjs +1 -1
  55. package/driver/runner.mjs +26 -2
  56. package/driver/skills/clearance-common-law/SKILL.md +2 -0
  57. package/driver/skills/clearance-register/SKILL.md +44 -3
  58. package/driver/skills/clearance-register/digest.md +5 -5
  59. package/driver/skills/clearance-register/providers/clarivate.md +1 -1
  60. package/driver/skills/clearance-register/unit.md +39 -0
  61. package/driver/skills/clearance-variants/SKILL.md +1 -1
  62. package/driver/skills/matter-frame/SKILL.md +4 -2
  63. package/driver/stages.mjs +12 -5
  64. package/driver/status-snapshot.mjs +1 -1
  65. package/driver/suite-census.json +236 -14
  66. package/driver/synthesis-record.mjs +80 -2
  67. package/driver/unit-file-drift.mjs +3 -3
  68. package/driver/unit-inventory.mjs +2 -2
  69. package/driver/unit-state-verdict.mjs +1 -1
  70. package/driver/updater-identity.mjs +2 -3
  71. package/driver/variant-manifest-model.mjs +11 -1
  72. package/driver/verify.mjs +5 -5
  73. package/driver/withheld-families.mjs +104 -0
  74. package/mcp-server/CHANGELOG.md +4 -0
  75. package/mcp-server/lib/brief.mjs +5 -7
  76. package/mcp-server/lib/runs.mjs +1 -1
  77. package/mcp-server/package.json +1 -1
  78. package/mcp-server/server.mjs +3 -2
  79. package/package.json +1 -1
  80. package/portal-ui/dist/assets/{index-DMthc7PQ.js → index-GBbbyQxc.js} +22 -4
  81. package/portal-ui/dist/index.html +1 -1
  82. package/portal-ui/package.json +1 -1
  83. package/providers/_shared/count.mjs +2 -2
  84. package/providers/_shared/enumerate.mjs +15 -2
  85. package/providers/_shared/execute-plan.mjs +19 -1
  86. package/providers/_shared/plan-guards.mjs +40 -0
  87. package/providers/clarivate/src/capabilities.js +15 -5
  88. package/providers/clarivate/src/core.js +41 -5
  89. package/providers/corsearch/src/capabilities.js +4 -0
  90. package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
  91. package/providers/oauth-mcp-bridge/package.json +1 -1
  92. package/providers/signa/src/capabilities.js +22 -8
  93. package/providers/signa/src/core.js +12 -1
  94. package/scripts/demo-evidence.mjs +114 -0
  95. package/scripts/engine-probe.mjs +6 -5
  96. package/scripts/env-audit.mjs +1 -1
  97. package/scripts/freeze-example-run.mjs +3 -3
  98. package/scripts/live-surface-check.mjs +26 -19
  99. package/scripts/mint-suite-census.mjs +66 -0
  100. package/scripts/package-size-budget.mjs +117 -0
  101. package/scripts/register-plan-shape.mjs +259 -0
  102. package/scripts/release-note-required.mjs +38 -1
  103. package/scripts/settings-render-check.mjs +36 -0
  104. package/scripts/travelling-predicates.mjs +1 -1
  105. package/shared/identifier-scan.mjs +22 -5
@@ -78,6 +78,50 @@ export const PROSE_PARTS = {
78
78
  campaignShape: ".campaignShape.txt", // P2-C (Round-2 §8a): campaign-shape facts — stated launch shape
79
79
  };
80
80
 
81
+ // ── ONE GOODS DESCRIPTION, TWO SPELLINGS, AND EVERY READER GETS THE SAME ANSWER ────────────────────
82
+ //
83
+ // Intake accepts a goods description under the current field or under the older spelling a forwarding
84
+ // agent may still send. That acceptance was the gate's private knowledge: the scope stamp read the
85
+ // current field alone, so a job written the older way passed intake and recorded that the matter named
86
+ // no goods. Both sites were individually right and nothing compared them.
87
+ //
88
+ // Fixing the scope stamp alone moved the seam rather than closing it. Ten other readers — the clearance
89
+ // and knockout prompts, the pharmaceutical test, the product-context derivation, the portal's own row
90
+ // and the plan preview — still read the current field, so the scope file would carry a value the
91
+ // prompts never saw, and the validator comparing the two would report the disagreement as a fault in
92
+ // the frame.
93
+ //
94
+ // SO THE FOLD HAPPENS ONCE, WHERE THE JOB IS ASSEMBLED FOR A RUN, and every reader downstream sees one
95
+ // field. Nothing is written back to the queue file: the manifest stays exactly as it was filed, which is
96
+ // the same rule the intake gate follows about stamping derived values onto a job.
97
+ //
98
+ // Here, in the module that already owns the queue's own vocabulary, because the gate and the assembly
99
+ // must never hold two opinions about what counts. A hand-copied predicate is how they drifted the first
100
+ // time.
101
+
102
+ /** The field names a goods description may arrive under, newest first. */
103
+ export const GOODS_FIELDS = ["goods", "use"];
104
+
105
+ /** The goods description a job carries under any accepted spelling, or null. Pure. */
106
+ export function goodsOf(job) {
107
+ for (const f of GOODS_FIELDS) {
108
+ const v = job?.[f];
109
+ if (v != null && String(v).trim()) return v;
110
+ }
111
+ return null;
112
+ }
113
+
114
+ /**
115
+ * The same job with its goods description under the current field, whichever spelling it arrived in.
116
+ * Returns the job unchanged when there is nothing to fold, so a job already on the current field is
117
+ * byte-identical and no caller has to ask which it got.
118
+ */
119
+ export function withFoldedGoods(job) {
120
+ const goods = goodsOf(job);
121
+ if (goods == null || job?.goods === goods) return job;
122
+ return { ...job, goods };
123
+ }
124
+
81
125
  /** A consumed claim's sidecars, swept together by runner.mjs cleanupClaimSidecars. */
82
126
  export const CLAIM_SIDECAR_SUFFIXES = [".pid", ".meta", ".skips"];
83
127
 
@@ -91,8 +91,8 @@ export function queueWatchVerdict({ queueDirs, watched, unitPath, unitError = nu
91
91
  // anywhere else; a privilege-limited read that answers "fine" is the exact failure this family of
92
92
  // checks exists to refuse, and it is the one that would make this guard decoration on the box that
93
93
  // matters most.
94
- if (unitError) return { state: "skip", message: `the .path unit could not be read — ${unitPath}: ${unitError}` };
95
- if (resolveError) return { state: "skip", message: `the queue dirs could not be resolved — ${resolveError}` };
94
+ if (unitError) return { state: "skip", blocked: true, message: `the .path unit could not be read — ${unitPath}: ${unitError}` };
95
+ if (resolveError) return { state: "skip", blocked: true, message: `the queue dirs could not be resolved — ${resolveError}` };
96
96
 
97
97
  const q = Array.isArray(queueDirs) ? queueDirs : null;
98
98
  const w = Array.isArray(watched) ? watched : [];
@@ -41,9 +41,9 @@
41
41
  // CORRECTED 2026-08-11 — THIS PARAGRAPH USED TO SAY "one qid per office … which is the shape
42
42
  // joinPlanToBands already has", AND THAT WAS FALSE ABOUT THE COMPILER IT DOCUMENTS. There is no
43
43
  // per-office qid. compileRegisterPlan narrows ONE shared `regions` array and hands it to every entry
44
- // (register-plan.mjs:846 compileRegisterPlan); the unreachable office produces no entry, so no qid, so no band block, so
44
+ // (register-plan.mjs compileRegisterPlan); the unreachable office produces no entry, so no qid, so no band block, so
45
45
  // nothing ever reaches joinPlanToBands' deferred bucket — whose only source is a block stamped
46
- // `error:true && deferred:true` (register-plan.mjs:1489 extendRegisterPlan).
46
+ // `error:true && deferred:true` (register-plan.mjs extendRegisterPlan).
47
47
  //
48
48
  // The consequence was not academic. `deferred_coverage` rode the plan and nothing that a reader sees
49
49
  // read it: coverage-form.mjs seeded its deferred rows from skeleton qids alone, so an EU+US matter on a