clearotron 0.5.0-beta.2 → 0.5.0-beta.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.
- package/.env.example +7 -0
- package/build-info.json +2 -2
- package/docs/architecture/03-run-lifecycle.md +6 -0
- package/docs/architecture/04-configuration-reference.md +1 -0
- package/docs/architecture/05-config-governance.md +1 -1
- package/driver/CHANGELOG.md +21 -0
- package/driver/band-shape.mjs +19 -11
- package/driver/contract-vocabulary.mjs +3 -3
- package/driver/coverage-form-io.mjs +3 -1
- package/driver/coverage-form.mjs +21 -2
- package/driver/coverage-ledger.mjs +7 -1
- package/driver/declination-call.mjs +33 -16
- package/driver/degraded-parts.mjs +6 -0
- package/driver/engine/mcp/band-server.mjs +12 -12
- package/driver/engine/mcp/clarivate-server.mjs +2 -0
- package/driver/engine/mcp/codex-config.mjs +12 -7
- package/driver/engine/mcp/corsearch-server.mjs +2 -0
- package/driver/engine/mcp/declination-server.mjs +4 -5
- package/driver/engine/mcp/dispositions-server.mjs +7 -0
- package/driver/engine/mcp/euipo-server.mjs +2 -0
- package/driver/engine/mcp/free-tier-server.mjs +2 -0
- package/driver/engine/mcp/gather-config.mjs +15 -0
- package/driver/engine/mcp/held-answers.mjs +11 -3
- package/driver/engine/mcp/perplexity-server.mjs +29 -1
- package/driver/engine/mcp/recording-server.mjs +16 -1
- package/driver/engine/mcp/signa-server.mjs +2 -0
- package/driver/engine/mcp/supplemental.mjs +11 -3
- package/driver/engine/mcp/uspto-local-server.mjs +2 -0
- package/driver/engine/openai-agent.mjs +48 -9
- package/driver/envelope-settle.mjs +13 -3
- package/driver/findings-model.mjs +17 -0
- package/driver/gateway.mjs +31 -10
- package/driver/package.json +1 -1
- package/driver/parts-not-completed.mjs +52 -11
- package/driver/pipeline-knockout.mjs +5 -4
- package/driver/pipeline.mjs +474 -81
- package/driver/placement-decisions.mjs +24 -9
- package/driver/placement-form-io.mjs +21 -1
- package/driver/placement-form.mjs +25 -15
- package/driver/placement-union.mjs +53 -8
- package/driver/predelivery-lint.mjs +8 -1
- package/driver/publish/index.mjs +7 -3
- package/driver/register-digest-record.mjs +6 -3
- package/driver/research-answers.mjs +54 -7
- package/driver/runner.mjs +4 -4
- package/driver/saved-findings-block.mjs +36 -0
- package/driver/skills/clearance-register/digest.md +1 -1
- package/driver/skills/clearance-search/phase2-execution.md +7 -5
- package/driver/skills/clearance-search/synthesis-rules.md +3 -3
- package/driver/skills/placement-inquiry/SKILL.md +3 -3
- package/driver/stage-context.mjs +18 -0
- package/driver/stages.mjs +41 -13
- package/driver/suite-census.json +140 -14
- package/driver/synthesis-record.mjs +167 -1
- package/driver/verify.mjs +6 -6
- package/mcp-server/CHANGELOG.md +8 -0
- package/mcp-server/package.json +1 -1
- package/package.json +1 -1
- package/portal-ui/package.json +1 -1
- package/providers/_shared/README.md +1 -0
- package/providers/_shared/enumerate.mjs +4 -3
- package/providers/_shared/execute-plan.mjs +33 -7
- package/providers/_shared/send-until.mjs +25 -0
- package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/scripts/band-shape-probe.mjs +1 -1
- package/scripts/e2e-first-time.mjs +2 -1
- package/scripts/release-notes-lint.mjs +1 -1
- package/shared/inside-run.mjs +54 -0
- package/shared/names-in-force.mjs +1 -0
- package/shared/slices-taken-out.mjs +65 -0
- package/skills/clearotron-account/SKILL.md +1 -1
- package/skills/clearotron-ops/SKILL.md +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
//
|
|
4
|
+
// slices-taken-out.mjs — a band read with the slices a check could not prove ran taken out, by every reader of it.
|
|
5
|
+
//
|
|
6
|
+
// The run's searches record (driver/parts-not-completed.mjs, its `searches` part) names each slice taken out of a band
|
|
7
|
+
// and delivered open: its axis, and its qid or, for a slice with none, its query. A unit re-run after the fan-in writes
|
|
8
|
+
// its axis's band whole, so such a slice can come back with the records nobody could prove were searched. Every reader
|
|
9
|
+
// that takes a band's blocks as answers reads the recorded slices out: the pipeline's merge and plan join, the answers
|
|
10
|
+
// the workers share, the propose tool's check on a re-proposed question, and the executor's checks on a follow-up asked
|
|
11
|
+
// before and on a parent before it releases a child. Each reads them out in memory and never by writing the file: a
|
|
12
|
+
// unit or the executor may be writing that band at the same moment.
|
|
13
|
+
//
|
|
14
|
+
// HERE AND NOT IN THE DRIVER, because the executor reads it too and nothing under providers/ imports the driver. Where
|
|
15
|
+
// the record sits is stated here for the same reason, once, for its writer and its readers alike.
|
|
16
|
+
//
|
|
17
|
+
// A pure leaf: node:fs and shared/driver-dir.mjs only.
|
|
18
|
+
import { readFileSync } from "node:fs";
|
|
19
|
+
import { driverDir } from "./driver-dir.mjs";
|
|
20
|
+
|
|
21
|
+
/** The folder under `_driver/` holding the record of each part a run could not complete. */
|
|
22
|
+
export const NOT_COMPLETED_DIR = "not-completed";
|
|
23
|
+
|
|
24
|
+
/** The record's path for `part`. */
|
|
25
|
+
export function notCompletedPath(runDir, part) {
|
|
26
|
+
return driverDir(runDir, NOT_COMPLETED_DIR, `${part}.json`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The slices the run's searches record took out of the band, by axis, each named by its qid or, with none, its query.
|
|
31
|
+
* Empty when the run has no record, and when its record cannot be read: a damaged record names no slice. IMPURE (reads
|
|
32
|
+
* the record).
|
|
33
|
+
*/
|
|
34
|
+
export function slicesTakenOutByAxis(runDir) {
|
|
35
|
+
const byAxis = new Map();
|
|
36
|
+
let slices = [];
|
|
37
|
+
try { slices = runDir ? JSON.parse(readFileSync(notCompletedPath(runDir, "searches"), "utf8"))?.slices : []; } catch { slices = []; }
|
|
38
|
+
for (const s of Array.isArray(slices) ? slices : []) {
|
|
39
|
+
if (!s?.axis || (!s?.qid && !s?.query)) continue;
|
|
40
|
+
if (!byAxis.has(s.axis)) byAxis.set(s.axis, []);
|
|
41
|
+
byAxis.get(s.axis).push(s);
|
|
42
|
+
}
|
|
43
|
+
return byAxis;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A band's blocks with `slices` taken out: each becomes the executor's deferred block, or is added as one. A slice with
|
|
48
|
+
* no qid is named by its query: the block with no qid on that query becomes a deferred block on it, and nothing is
|
|
49
|
+
* added where the band holds none. PURE.
|
|
50
|
+
*/
|
|
51
|
+
export function bandWithSlicesOut(blocks, slices) {
|
|
52
|
+
const out = Array.isArray(blocks) ? [...blocks] : [];
|
|
53
|
+
const taken = [];
|
|
54
|
+
for (const s of Array.isArray(slices) ? slices : []) {
|
|
55
|
+
const i = s.qid ? out.findIndex((b) => b?.qid === s.qid) : out.findIndex((b) => b && !b.qid && b.query === s.query);
|
|
56
|
+
if (!s.qid && i < 0) continue;
|
|
57
|
+
const was = i >= 0 ? out[i] : null;
|
|
58
|
+
if (was?.error === true && was.deferred === true && was.reason === s.reason) continue;
|
|
59
|
+
const block = { state: "incomplete", ...(s.qid ? { qid: s.qid } : {}), query: String(was?.query ?? s.query ?? s.qid), total_hits: 0, fetched: 0,
|
|
60
|
+
sample: [], error: true, deferred: true, reason: String(s.reason) };
|
|
61
|
+
if (i >= 0) out[i] = block; else out.push(block);
|
|
62
|
+
taken.push(s);
|
|
63
|
+
}
|
|
64
|
+
return { blocks: out, taken };
|
|
65
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clearotron-account
|
|
3
|
-
description: Work with a trademark clearance account: review the searches already run for it, and commission new ones. Use when the user asks about their clearance searches in general, or wants a new search set up.
|
|
3
|
+
description: "Work with a trademark clearance account: review the searches already run for it, and commission new ones. Use when the user asks about their clearance searches in general, or wants a new search set up."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Working with your trademark clearance searches (account connector)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: clearotron-ops
|
|
3
|
-
description: Drive the clearance engine as an integrator: take an intake brief, start a run, monitor it, and courier the delivery. Use when operating the engine rather than reading its output.
|
|
3
|
+
description: "Drive the clearance engine as an integrator: take an intake brief, start a run, monitor it, and courier the delivery. Use when operating the engine rather than reading its output."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Operating the clearance engine (ops connector) — intake + monitoring
|