clearotron 0.4.0-beta.2 → 0.4.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 (57) hide show
  1. package/THIRD-PARTY-NOTICES.md +5 -5
  2. package/build-info.json +2 -2
  3. package/driver/CHANGELOG.md +90 -0
  4. package/driver/ask-ledger.mjs +2 -2
  5. package/driver/coverage-form.mjs +6 -0
  6. package/driver/coverage-ledger.mjs +14 -2
  7. package/driver/driver.config.mjs +24 -7
  8. package/driver/engine/mcp/band-server.mjs +3 -3
  9. package/driver/engine/mcp/stdio-server.mjs +12 -1
  10. package/driver/gateway.mjs +27 -3
  11. package/driver/package.json +1 -1
  12. package/driver/pipeline-knockout.mjs +41 -10
  13. package/driver/pipeline.mjs +104 -12
  14. package/driver/progress.mjs +6 -1
  15. package/driver/provider-usage.mjs +16 -0
  16. package/driver/publish/index.mjs +11 -5
  17. package/driver/publish/knockout.mjs +16 -3
  18. package/driver/publish/render-knockout.mjs +38 -11
  19. package/driver/record-carry.mjs +17 -1
  20. package/driver/reference-strip-signatures.mjs +11 -1
  21. package/driver/register-plan.mjs +7 -3
  22. package/driver/register-served.mjs +91 -0
  23. package/driver/remedy-accounting.mjs +38 -9
  24. package/driver/reviewer-open-points.mjs +20 -23
  25. package/driver/score-redaction.mjs +416 -20
  26. package/driver/screen-gate.mjs +3 -3
  27. package/driver/skills/clearance-register/SKILL.md +0 -8
  28. package/driver/skills/clearance-register/digest.md +1 -1
  29. package/driver/skills/clearance-register/providers/corsearch.md +1 -1
  30. package/driver/skills/clearance-register/register-recipes.md +3 -9
  31. package/driver/skills/clearance-search/SKILL.md +2 -2
  32. package/driver/skills/clearance-search/phase2-execution.md +1 -1
  33. package/driver/skills/knockout-assess/SKILL.md +2 -0
  34. package/driver/stages-knockout.mjs +22 -0
  35. package/driver/suite-census.json +152 -26
  36. package/driver/unit-inventory.mjs +38 -43
  37. package/mcp-server/CHANGELOG.md +8 -0
  38. package/mcp-server/package.json +1 -1
  39. package/node_modules/brace-expansion/index.js +78 -22
  40. package/node_modules/brace-expansion/package.json +1 -1
  41. package/node_modules/readdir-glob/node_modules/brace-expansion/index.js +78 -22
  42. package/node_modules/readdir-glob/node_modules/brace-expansion/package.json +1 -1
  43. package/package.json +1 -1
  44. package/portal-ui/package.json +2 -2
  45. package/providers/_shared/term-shape.mjs +1 -1
  46. package/providers/jx/src/core.js +0 -1
  47. package/providers/jx/src/judge.js +0 -1
  48. package/providers/jx/src/nativeread.js +0 -1
  49. package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
  50. package/providers/oauth-mcp-bridge/package.json +1 -1
  51. package/providers/signa/src/core.js +125 -17
  52. package/scripts/e2e-first-time.mjs +12 -4
  53. package/scripts/e2e-scenario-ops.mjs +25 -2
  54. package/scripts/e2e.mjs +246 -24
  55. package/scripts/mint-reference-strip-backlog.mjs +36 -2
  56. package/scripts/score.mjs +102 -29
  57. package/shared/identifier-scan.mjs +31 -1
@@ -80,7 +80,7 @@ skipped step must be logged with its reason in the unit's digest audit.
80
80
  3. **Single-word coverage hunts** — for each element marked "demote to filter" in the manifest, one search with product/industry filters applied (limit=50). Minimum 1 per such element.
81
81
  4. **Wildcard reorders** — if the manifest lists word-order variants, at least one wildcard sweep per distinct ordering (e.g. `Elevate * game`, `game * Elevate`).
82
82
  5. **Numeric-substitution and transliteration sweeps** — execute every sweep marked ✅ (requires verification) in the variant manifest, UNLESS the manifest classifies the mark as English-only (single-language Recipe 1 pattern). Skipping any ✅ requires a stated reason in the unit's digest audit.
83
- 6. **Material-jurisdiction sub-queries** — a **protected, non-yielding** line item, NOT folded into the sweep budget. Run one scoped sub-query per jurisdiction `matter-context` declares materially-matters (no top-N cap; the per-mark ceiling scales with the declared count — see `clearance-register/SKILL.md` → *Tool call budget* and Step 3). These outrank within-axis breadth: if budget is tight, an extra script group (step 5) yields and is logged `coverage-limited` — a material jurisdiction is never dropped to fund breadth, and a jurisdiction that genuinely can't run is logged `deferred`, never silent.
83
+ 6. **Material-jurisdiction sub-queries** — a **protected, non-yielding** line item, NOT folded into the sweep budget. Run one scoped sub-query per jurisdiction `matter-context` declares materially-matters (no top-N cap). These outrank within-axis breadth: if budget is tight, an extra script group (step 5) yields and is logged `coverage-limited` — a material jurisdiction is never dropped to fund breadth, and a jurisdiction that genuinely can't run is logged `deferred`, never silent.
84
84
 
85
85
  **Expected breadth for saturated common-word patterns: ~20–25 register searches per mark, plus the ring-fenced per-jurisdiction allowance** — a guideline, not a quota; coverage of the manifest's axes *and* the declared material jurisdictions is what matters, not the raw count. A run that is thin **and** left ✅ sweeps or material-jurisdiction sub-queries unexecuted with no documented skip reason is incomplete; the skeptic (Step 2.6) flags it. A run that executed every axis and validly found little is complete.
86
86
 
@@ -21,6 +21,8 @@ there is no other value: a band that needs sharpening is the band above it, stat
21
21
  2. **Parody / evocation check**: does the name echo a famous mark or property even without identical
22
22
  ownership ("Free Range 1s" echoes "Air Force 1s")? Flag it even when nobody owns the echoed form.
23
23
  3. **Band per the framework ladder**, applying the calibration rules below.
24
+ [worked-examples.md](../clearance-search/worked-examples.md) — the spine + per-finding reasoning
25
+ depth (per-customer variants calibrate under that customer's framework)
24
26
  4. **1–5 evidence bullets** shaped by the band — the mark's READING, not its conflicts. One honest
25
27
  bullet beats two, and a degraded mark usually has exactly one: a floor of two is an instruction to
26
28
  pad, and the null-results doctrine forbids inflating a mark whose research came back thin.
@@ -150,6 +150,28 @@ export const KNOCKOUT_WEB = Object.freeze({ preset: "pro-search", reasoning: Obj
150
150
  */
151
151
  export const KNOCKOUT_MINUTES_BAR = 10;
152
152
 
153
+ /**
154
+ * The bar's verdict for one run, from the run's own two timestamps. PURE, and it lives beside the constant
155
+ * so the comparison and the number it compares against cannot drift apart.
156
+ *
157
+ * AN UNREADABLE OR ABSENT START IS NOT "UNDER THE BAR". `runMinutes` and `overBar` are both null then, and
158
+ * `barNotMeasured` says why — a run whose span could not be read must not record a verdict that reads as a
159
+ * pass. That is the whole reason this returns three fields rather than a boolean.
160
+ *
161
+ * @param {{startedAt?: string|null, deliveredAt?: string|null}} span the run's own ISO timestamps
162
+ */
163
+ export function knockoutBarVerdict({ startedAt = null, deliveredAt = null } = {}) {
164
+ const a = startedAt ? Date.parse(startedAt) : NaN;
165
+ const b = deliveredAt ? Date.parse(deliveredAt) : NaN;
166
+ if (!Number.isFinite(a) || !Number.isFinite(b) || b < a)
167
+ return { runMinutes: null, overBar: null,
168
+ barNotMeasured: !Number.isFinite(a) ? "the run's own startedAt could not be read"
169
+ : !Number.isFinite(b) ? "the run has no delivery time to measure to"
170
+ : "the run's delivery time is before its start" };
171
+ const runMinutes = Number(((b - a) / 60000).toFixed(1));
172
+ return { runMinutes, overBar: runMinutes > KNOCKOUT_MINUTES_BAR };
173
+ }
174
+
153
175
  /** The territories the request ordered, as the job carries them; empty for a worldwide screen. PURE. */
154
176
  export const orderedTerritories = (job) =>
155
177
  (Array.isArray(job?.jurisdictions) ? job.jurisdictions.map((s) => String(s).trim()).filter(Boolean) : []);
@@ -93,6 +93,12 @@
93
93
  "skips": 0,
94
94
  "todos": 0
95
95
  },
96
+ "a-cap-of-zero-is-not-a-register-outcome.test.mjs": {
97
+ "tests": 3,
98
+ "asserts": 6,
99
+ "skips": 0,
100
+ "todos": 0
101
+ },
96
102
  "a-capability-gap-is-decided-once-per-run.test.mjs": {
97
103
  "tests": 4,
98
104
  "asserts": 17,
@@ -279,6 +285,12 @@
279
285
  "skips": 0,
280
286
  "todos": 0
281
287
  },
288
+ "a-coverage-row-carries-the-count-it-was-given.test.mjs": {
289
+ "tests": 4,
290
+ "asserts": 11,
291
+ "skips": 0,
292
+ "todos": 0
293
+ },
282
294
  "a-credential-file-is-written-one-way.test.mjs": {
283
295
  "tests": 4,
284
296
  "asserts": 13,
@@ -615,6 +627,12 @@
615
627
  "skips": 0,
616
628
  "todos": 0
617
629
  },
630
+ "a-job-matched-by-name-elsewhere-keeps-its-name.test.mjs": {
631
+ "tests": 2,
632
+ "asserts": 2,
633
+ "skips": 0,
634
+ "todos": 0
635
+ },
618
636
  "a-job-on-the-older-goods-spelling-scopes-the-same.test.mjs": {
619
637
  "tests": 10,
620
638
  "asserts": 23,
@@ -729,6 +747,12 @@
729
747
  "skips": 0,
730
748
  "todos": 0
731
749
  },
750
+ "a-mark-named-only-in-prose-is-withheld.test.mjs": {
751
+ "tests": 6,
752
+ "asserts": 9,
753
+ "skips": 0,
754
+ "todos": 0
755
+ },
732
756
  "a-mark-too-short-for-contains-is-asked-exactly.test.mjs": {
733
757
  "tests": 12,
734
758
  "asserts": 57,
@@ -778,8 +802,8 @@
778
802
  "todos": 0
779
803
  },
780
804
  "a-model-of-the-current-generation-is-named-in-every-spelling.test.mjs": {
781
- "tests": 4,
782
- "asserts": 13,
805
+ "tests": 8,
806
+ "asserts": 29,
783
807
  "skips": 0,
784
808
  "todos": 0
785
809
  },
@@ -922,8 +946,8 @@
922
946
  "todos": 0
923
947
  },
924
948
  "a-program-already-here-is-checked-against-the-floor.test.mjs": {
925
- "tests": 9,
926
- "asserts": 38,
949
+ "tests": 12,
950
+ "asserts": 44,
927
951
  "skips": 3,
928
952
  "todos": 0
929
953
  },
@@ -1065,6 +1089,12 @@
1065
1089
  "skips": 0,
1066
1090
  "todos": 0
1067
1091
  },
1092
+ "a-refused-call-records-which-field-was-missing.test.mjs": {
1093
+ "tests": 3,
1094
+ "asserts": 12,
1095
+ "skips": 0,
1096
+ "todos": 0
1097
+ },
1068
1098
  "a-refused-mcp-call-is-not-a-call-nobody-made.test.mjs": {
1069
1099
  "tests": 7,
1070
1100
  "asserts": 19,
@@ -1186,8 +1216,14 @@
1186
1216
  "todos": 0
1187
1217
  },
1188
1218
  "a-run-records-the-tool-that-served-it.test.mjs": {
1189
- "tests": 13,
1190
- "asserts": 33,
1219
+ "tests": 16,
1220
+ "asserts": 42,
1221
+ "skips": 0,
1222
+ "todos": 0
1223
+ },
1224
+ "a-run-records-which-register-served-it.test.mjs": {
1225
+ "tests": 14,
1226
+ "asserts": 30,
1191
1227
  "skips": 0,
1192
1228
  "todos": 0
1193
1229
  },
@@ -1311,6 +1347,12 @@
1311
1347
  "skips": 0,
1312
1348
  "todos": 0
1313
1349
  },
1350
+ "a-slice-the-fold-refused-as-already-asked-is-not-a-dispatch-failure.test.mjs": {
1351
+ "tests": 10,
1352
+ "asserts": 32,
1353
+ "skips": 0,
1354
+ "todos": 0
1355
+ },
1314
1356
  "a-source-the-classifier-could-not-read-is-not-empty.test.mjs": {
1315
1357
  "tests": 9,
1316
1358
  "asserts": 14,
@@ -1708,8 +1750,8 @@
1708
1750
  "todos": 0
1709
1751
  },
1710
1752
  "an-escape-is-read-the-way-a-lexer-reads-it.test.mjs": {
1711
- "tests": 3,
1712
- "asserts": 11,
1753
+ "tests": 5,
1754
+ "asserts": 25,
1713
1755
  "skips": 0,
1714
1756
  "todos": 0
1715
1757
  },
@@ -1797,6 +1839,12 @@
1797
1839
  "skips": 0,
1798
1840
  "todos": 0
1799
1841
  },
1842
+ "an-unreadable-sidecar-is-not-an-absent-one.test.mjs": {
1843
+ "tests": 7,
1844
+ "asserts": 13,
1845
+ "skips": 0,
1846
+ "todos": 0
1847
+ },
1800
1848
  "anchor-and-script-aware-quote.test.mjs": {
1801
1849
  "tests": 12,
1802
1850
  "asserts": 40,
@@ -2781,6 +2829,12 @@
2781
2829
  "skips": 1,
2782
2830
  "todos": 0
2783
2831
  },
2832
+ "e2e-a-row-states-what-it-measured.test.mjs": {
2833
+ "tests": 3,
2834
+ "asserts": 7,
2835
+ "skips": 0,
2836
+ "todos": 0
2837
+ },
2784
2838
  "e2e-assertions.test.mjs": {
2785
2839
  "tests": 87,
2786
2840
  "asserts": 251,
@@ -2789,13 +2843,13 @@
2789
2843
  },
2790
2844
  "e2e-mark-provenance.test.mjs": {
2791
2845
  "tests": 29,
2792
- "asserts": 85,
2846
+ "asserts": 97,
2793
2847
  "skips": 0,
2794
2848
  "todos": 0
2795
2849
  },
2796
2850
  "e2e-pair-workflow.test.mjs": {
2797
2851
  "tests": 14,
2798
- "asserts": 72,
2852
+ "asserts": 73,
2799
2853
  "skips": 0,
2800
2854
  "todos": 0
2801
2855
  },
@@ -2811,9 +2865,15 @@
2811
2865
  "skips": 0,
2812
2866
  "todos": 0
2813
2867
  },
2868
+ "e2e-scenario-names-its-register.test.mjs": {
2869
+ "tests": 13,
2870
+ "asserts": 28,
2871
+ "skips": 0,
2872
+ "todos": 0
2873
+ },
2814
2874
  "e2e-scenario-ops.test.mjs": {
2815
- "tests": 25,
2816
- "asserts": 85,
2875
+ "tests": 28,
2876
+ "asserts": 94,
2817
2877
  "skips": 0,
2818
2878
  "todos": 0
2819
2879
  },
@@ -2914,8 +2974,8 @@
2914
2974
  "todos": 0
2915
2975
  },
2916
2976
  "engine.anthropic.test.mjs": {
2917
- "tests": 65,
2918
- "asserts": 248,
2977
+ "tests": 66,
2978
+ "asserts": 250,
2919
2979
  "skips": 1,
2920
2980
  "todos": 0
2921
2981
  },
@@ -3407,7 +3467,7 @@
3407
3467
  },
3408
3468
  "jx-p4-cores.test.mjs": {
3409
3469
  "tests": 14,
3410
- "asserts": 56,
3470
+ "asserts": 58,
3411
3471
  "skips": 0,
3412
3472
  "todos": 0
3413
3473
  },
@@ -3719,7 +3779,7 @@
3719
3779
  },
3720
3780
  "onboard-wizard.test.mjs": {
3721
3781
  "tests": 77,
3722
- "asserts": 294,
3782
+ "asserts": 295,
3723
3783
  "skips": 4,
3724
3784
  "todos": 0
3725
3785
  },
@@ -3887,7 +3947,7 @@
3887
3947
  },
3888
3948
  "pipeline.mock.test.mjs": {
3889
3949
  "tests": 103,
3890
- "asserts": 863,
3950
+ "asserts": 865,
3891
3951
  "skips": 0,
3892
3952
  "todos": 0
3893
3953
  },
@@ -4588,8 +4648,8 @@
4588
4648
  "todos": 0
4589
4649
  },
4590
4650
  "report-assemble.test.mjs": {
4591
- "tests": 21,
4592
- "asserts": 109,
4651
+ "tests": 22,
4652
+ "asserts": 115,
4593
4653
  "skips": 0,
4594
4654
  "todos": 0
4595
4655
  },
@@ -5391,6 +5451,12 @@
5391
5451
  "skips": 0,
5392
5452
  "todos": 0
5393
5453
  },
5454
+ "the-bar-is-measured-against-the-run.test.mjs": {
5455
+ "tests": 3,
5456
+ "asserts": 9,
5457
+ "skips": 0,
5458
+ "todos": 0
5459
+ },
5394
5460
  "the-bar-names-no-organisation-nobody-named.test.mjs": {
5395
5461
  "tests": 6,
5396
5462
  "asserts": 13,
@@ -5613,6 +5679,12 @@
5613
5679
  "skips": 0,
5614
5680
  "todos": 0
5615
5681
  },
5682
+ "the-engine-sets-no-sampling-and-forces-no-tool.test.mjs": {
5683
+ "tests": 6,
5684
+ "asserts": 9,
5685
+ "skips": 2,
5686
+ "todos": 0
5687
+ },
5616
5688
  "the-engine-step-cannot-loop-on-a-menu-nothing-changed.test.mjs": {
5617
5689
  "tests": 17,
5618
5690
  "asserts": 45,
@@ -5763,6 +5835,12 @@
5763
5835
  "skips": 0,
5764
5836
  "todos": 0
5765
5837
  },
5838
+ "the-investigate-line-names-its-claim-by-location.test.mjs": {
5839
+ "tests": 20,
5840
+ "asserts": 57,
5841
+ "skips": 0,
5842
+ "todos": 0
5843
+ },
5766
5844
  "the-knockout-page-leads-with-the-read.test.mjs": {
5767
5845
  "tests": 39,
5768
5846
  "asserts": 125,
@@ -5877,6 +5955,12 @@
5877
5955
  "skips": 0,
5878
5956
  "todos": 0
5879
5957
  },
5958
+ "the-payload-is-redacted-as-a-structure.test.mjs": {
5959
+ "tests": 15,
5960
+ "asserts": 30,
5961
+ "skips": 0,
5962
+ "todos": 0
5963
+ },
5880
5964
  "the-people-page-can-change-and-remove-a-person.test.mjs": {
5881
5965
  "tests": 17,
5882
5966
  "asserts": 85,
@@ -5985,9 +6069,27 @@
5985
6069
  "skips": 0,
5986
6070
  "todos": 0
5987
6071
  },
5988
- "the-reference-strip-left-sentences-unfinished.test.mjs": {
6072
+ "the-redaction-folds-character-width.test.mjs": {
5989
6073
  "tests": 6,
5990
- "asserts": 15,
6074
+ "asserts": 11,
6075
+ "skips": 0,
6076
+ "todos": 0
6077
+ },
6078
+ "the-redaction-leaves-the-scaffolding-alone.test.mjs": {
6079
+ "tests": 4,
6080
+ "asserts": 7,
6081
+ "skips": 0,
6082
+ "todos": 0
6083
+ },
6084
+ "the-redaction-never-shrinks-its-own-coverage.test.mjs": {
6085
+ "tests": 5,
6086
+ "asserts": 10,
6087
+ "skips": 0,
6088
+ "todos": 0
6089
+ },
6090
+ "the-reference-strip-left-sentences-unfinished.test.mjs": {
6091
+ "tests": 7,
6092
+ "asserts": 25,
5991
6093
  "skips": 4,
5992
6094
  "todos": 0
5993
6095
  },
@@ -6063,9 +6165,9 @@
6063
6165
  "skips": 0,
6064
6166
  "todos": 0
6065
6167
  },
6066
- "the-reviewers-open-points-reach-the-reviewing-lawyer-never-a-client.test.mjs": {
6168
+ "the-reviewers-open-points-stay-in-the-run-record.test.mjs": {
6067
6169
  "tests": 6,
6068
- "asserts": 15,
6170
+ "asserts": 17,
6069
6171
  "skips": 0,
6070
6172
  "todos": 0
6071
6173
  },
@@ -6124,8 +6226,8 @@
6124
6226
  "todos": 0
6125
6227
  },
6126
6228
  "the-scorer-withholds-names-unless-asked.test.mjs": {
6127
- "tests": 21,
6128
- "asserts": 46,
6229
+ "tests": 32,
6230
+ "asserts": 63,
6129
6231
  "skips": 0,
6130
6232
  "todos": 0
6131
6233
  },
@@ -6207,6 +6309,12 @@
6207
6309
  "skips": 2,
6208
6310
  "todos": 0
6209
6311
  },
6312
+ "the-totals-block-counts-a-step-that-said-nothing.test.mjs": {
6313
+ "tests": 4,
6314
+ "asserts": 8,
6315
+ "skips": 0,
6316
+ "todos": 0
6317
+ },
6210
6318
  "the-trigger-key-has-a-deadline-somebody-is-counting.test.mjs": {
6211
6319
  "tests": 5,
6212
6320
  "asserts": 23,
@@ -7639,7 +7747,7 @@
7639
7747
  },
7640
7748
  "providers/signa/test/an-owner-portfolio-sweep-is-a-search.test.mjs": {
7641
7749
  "tests": 4,
7642
- "asserts": 17,
7750
+ "asserts": 18,
7643
7751
  "skips": 0,
7644
7752
  "todos": 0
7645
7753
  },
@@ -7649,6 +7757,24 @@
7649
7757
  "skips": 0,
7650
7758
  "todos": 0
7651
7759
  },
7760
+ "providers/signa/test/the-office-date-comes-first-and-signas-own-is-the-fallback.test.mjs": {
7761
+ "tests": 9,
7762
+ "asserts": 20,
7763
+ "skips": 0,
7764
+ "todos": 0
7765
+ },
7766
+ "providers/signa/test/the-ranked-lane-asks-for-similarity-channels.test.mjs": {
7767
+ "tests": 9,
7768
+ "asserts": 15,
7769
+ "skips": 0,
7770
+ "todos": 0
7771
+ },
7772
+ "providers/signa/test/the-registers-own-warnings-reach-the-run.test.mjs": {
7773
+ "tests": 7,
7774
+ "asserts": 11,
7775
+ "skips": 0,
7776
+ "todos": 0
7777
+ },
7652
7778
  "providers/signa/test/the-screen-speaks-the-shared-verdicts.test.mjs": {
7653
7779
  "tests": 2,
7654
7780
  "asserts": 4,