clearotron 0.2.3 → 0.2.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 +36 -37
- package/CONTRIBUTING.md +8 -4
- package/INSTALL.md +24 -4
- package/README.md +7 -6
- package/bin/example.mjs +6 -5
- package/bin/onboard.mjs +175 -9
- package/bin/start.mjs +66 -4
- package/build-info.json +2 -2
- package/demo/README.md +1 -1
- package/docs/GLOSSARY.md +85 -0
- package/docs/README.md +1 -0
- package/docs/architecture/01-product-overview.md +21 -9
- package/docs/architecture/05-config-governance.md +5 -0
- package/docs/decisions/0006-what-the-public-repository-carries.md +30 -5
- package/driver/CHANGELOG.md +34 -0
- package/driver/README.md +25 -6
- package/driver/connotation-search.mjs +1 -1
- package/driver/contract-audit.mjs +5 -1
- package/driver/contract-e3-baseline.json +11 -11
- package/driver/doubt-selection.mjs +1 -1
- package/driver/drainer-identity.mjs +1 -1
- package/driver/effort-model.mjs +2 -2
- package/driver/engine/probe.mjs +45 -5
- package/driver/gateway.mjs +2 -2
- package/driver/outbox-backoff.mjs +1 -1
- package/driver/package.json +1 -1
- package/driver/pipeline.mjs +206 -101
- package/driver/plain-register.mjs +16 -2
- package/driver/portal-config-view.mjs +30 -1
- package/driver/portal-local-auth.mjs +5 -1
- package/driver/portal-service.mjs +53 -2
- package/driver/predelivery-lint.mjs +54 -25
- package/driver/publish/render.mjs +109 -14
- package/driver/search-policy.mjs +1 -1
- package/driver/stage-context.mjs +13 -0
- package/driver/stages.mjs +51 -4
- package/driver/suite-census.json +97 -31
- package/driver/systemd/clearotron-worker.service +3 -3
- package/driver/tokens.mjs +1 -1
- package/driver/unit-inventory.mjs +34 -4
- package/mcp-server/CHANGELOG.md +2 -0
- package/mcp-server/package.json +1 -1
- package/package.json +4 -10
- package/portal-ui/dist/assets/{index-CEYvXdqH.js → index-KFAHMgdT.js} +73 -34
- package/portal-ui/dist/index.html +1 -1
- package/portal-ui/package.json +1 -1
- package/providers/oauth-mcp-bridge/CHANGELOG.md +2 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/scripts/added-reference-check.mjs +45 -89
- package/scripts/e2e.mjs +2 -2
- package/scripts/generated-files-are-current.mjs +125 -0
- package/scripts/mint-names-in-force.mjs +4 -2
- package/scripts/mint-public-residue.mjs +74 -0
- package/scripts/mint-reference-strip-backlog.mjs +12 -1
- package/scripts/mint-suite-census.mjs +5 -2
- package/scripts/render-check.mjs +13 -2
- package/scripts/report-frame-check.mjs +8 -1
- package/scripts/report-screenshot.mjs +6 -3
- package/scripts/revisit-render-check.mjs +6 -3
- package/scripts/score.mjs +1 -1
- package/scripts/strip-tracker-citations.mjs +9 -1
- package/scripts/test-full.mjs +226 -0
- package/shared/README.md +2 -1
- package/shared/browser-temp-root.mjs +142 -0
- package/shared/checkout-move.mjs +1 -1
- package/shared/client-door.mjs +4 -3
- package/shared/identifier-scan.mjs +1 -1
- package/shared/install-auth.mjs +35 -0
- package/shared/invocation.mjs +5 -1
- package/shared/listen.mjs +55 -3
- package/shared/names-in-force.mjs +4 -1
- package/shared/os-advice.mjs +91 -0
- package/shared/reap-on-exit.mjs +42 -0
- package/shared/reference-guard-classes.mjs +351 -0
- package/shared/suite-census.mjs +31 -3
- package/shared/withheld-paths-access.mjs +36 -18
package/.env.example
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
# and never listed here: CLEAROTRON_KNOCKOUT_MODE, CLEAROTRON_JX_LANES, CLEAROTRON_RECIPES_MODE — if any of the
|
|
19
19
|
# three is still in your .env, delete the line; the pipeline CLI warns on stderr when it sees one.
|
|
20
20
|
#
|
|
21
|
-
# WHERE THE REST WENT
|
|
21
|
+
# WHERE THE REST WENT. This file used to carry 237 rows and a new reader met 230 variables to
|
|
22
22
|
# reach the fourteen they need. The deployment and tuning names — identity, ports, tenancy, timeouts,
|
|
23
23
|
# batch sizes — now live in `.env.deployment.example`. Nothing was dropped: `node scripts/env-audit.mjs`
|
|
24
24
|
# reads BOTH files, and the ratchet that refuses a product variable with no row anywhere reads both too.
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
# otherwise.
|
|
42
42
|
# • Where a var takes a NAMED MODE, the comment says so and no other value does anything at all
|
|
43
43
|
# (CLEAROTRON_SCREEN_GATE_UNNAMED = "enforce"; CLEAROTRON_UNREACHABLE_SENIOR = open-item|clamp).
|
|
44
|
-
# • `# effect: <class>` above a row DECLARES WHAT CHANGES when that name is changed
|
|
45
|
-
# ADR-0002). The vocabulary is closed — silent-output-change | disclosed-gate | credential |
|
|
44
|
+
# • `# effect: <class>` above a row DECLARES WHAT CHANGES when that name is changed
|
|
45
|
+
# (ADR-0002). The vocabulary is closed — silent-output-change | disclosed-gate | credential |
|
|
46
46
|
# deployment | tuning | harness — and EFFECT_CLASSES in scripts/env-audit.mjs says what each one
|
|
47
47
|
# claims. Like `# external:`, the marker must be the LAST comment above its rows and reaches the
|
|
48
48
|
# contiguous run below it. The environment-governance guard reds on a NEW `CLEAROTRON_*` read by
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
# gateway-bin adapter was a runtime, not a provider choice; removed in the extraction.)
|
|
77
77
|
#
|
|
78
78
|
# TWO adapters are implemented — engine/CONTRACT.md:3 is the accurate statement, and this file said
|
|
79
|
-
# otherwise until
|
|
79
|
+
# otherwise until the free-register work corrected it:
|
|
80
80
|
# anthropic-agent `claude -p`, off-gateway. The default.
|
|
81
81
|
# openai-agent `codex exec`. Built and $0-tested; live verification still pending.
|
|
82
82
|
# Either way the reasoning needs a subscription or an API key of its own — that is separate from every
|
|
@@ -99,13 +99,13 @@ CLEAROTRON_CUSTOMERS_DIR=
|
|
|
99
99
|
# Compute-skills tree the stage prompts resolve `skills/foo/SKILL.md` against. Default = <driverDir>/skills.
|
|
100
100
|
CLEAROTRON_INSTRUCTIONS_DIR=
|
|
101
101
|
# Delivery pool: report.html + audit.xlsx land here (served by Caddy behind Cloudflare Access).
|
|
102
|
-
# REQUIRED —
|
|
102
|
+
# REQUIRED — the code default was removed. Unset, the engine refuses and names this variable instead
|
|
103
103
|
# of falling back to /srv/trademark-archive, which on a deployed box is real client matter.
|
|
104
104
|
CLEAROTRON_REPORTS_DIR=/srv/trademark-archive
|
|
105
105
|
# Run-slot lock dir. Default = $CLEAROTRON_WORK_DIR/prelim-run-locks. Every run takes a slot here,
|
|
106
106
|
# whether the runner dispatched it or somebody launched it by hand, so this is what bounds concurrency
|
|
107
107
|
# across an install rather than within one process. The portal also reads it to find the worker
|
|
108
|
-
# heartbeat
|
|
108
|
+
# heartbeat; two installs pointed at one lock dir would share a cap they do not expect to.
|
|
109
109
|
# effect: deployment
|
|
110
110
|
CLEAROTRON_RUN_LOCK_DIR=
|
|
111
111
|
# Delivery outbox dir (instant handoff-mode delivery wake). Default = $CLEAROTRON_WORK_DIR/prelim-outbox.
|
|
@@ -114,7 +114,7 @@ CLEAROTRON_OUTBOX_DIR=
|
|
|
114
114
|
# HEADLESS intake: one explicit queue dir (no agent workspaces needed) — the enqueue CLI + ops-MCP
|
|
115
115
|
# start_run write here and the runner drains it (additive to the workspace scan). See docs/INTAKE.md.
|
|
116
116
|
CLEAROTRON_QUEUE_DIR=
|
|
117
|
-
# REQUIRED, on every deployment including dev
|
|
117
|
+
# REQUIRED, on every deployment including dev. Which register vendor gets called and billed:
|
|
118
118
|
# corsearch | clarivate | signa | euipo | uspto-local | free-tier. There is NO default — unset, the driver refuses at run start rather
|
|
119
119
|
# than choosing for you.
|
|
120
120
|
#
|
|
@@ -134,9 +134,9 @@ CLEAROTRON_QUEUE_DIR=
|
|
|
134
134
|
# not run beside it (corsearch and clarivate already
|
|
135
135
|
# aggregate both free offices, so a second call buys nothing).
|
|
136
136
|
#
|
|
137
|
-
# FREE euipo the EU register ALONE
|
|
138
|
-
# uspto-local the US register ALONE
|
|
139
|
-
# free-tier BOTH, as ONE register
|
|
137
|
+
# FREE euipo the EU register ALONE — needs EUIPO_CLIENT_ID + _SECRET
|
|
138
|
+
# uspto-local the US register ALONE — needs USPTO_LOCAL_DB (a built index)
|
|
139
|
+
# free-tier BOTH, as ONE register — needs all three of the above
|
|
140
140
|
#
|
|
141
141
|
# Choosing a free value makes every territory outside its coverage a DISCLOSED DEFERRED coverage row.
|
|
142
142
|
# That is the honest trade of running without a subscription, not a defect to work around.
|
|
@@ -151,7 +151,7 @@ CLEAROTRON_DATABASE=clarivate
|
|
|
151
151
|
# CLEAROTRON_GATHER_SESSION_KEY, CLEAROTRON_GATHER_SESSION_ID, CLEAROTRON_GATHER_AGENT,
|
|
152
152
|
# CLEAROTRON_REGISTER_CALL_LOG, CLEAROTRON_REGISTER_RECORD_LOG
|
|
153
153
|
#
|
|
154
|
-
# THERE IS NO RETENTION SETTING AND NO CLEANUP JOB
|
|
154
|
+
# THERE IS NO RETENTION SETTING AND NO CLEANUP JOB. CLEAROTRON_REGISTER_LEDGER_MAX_BYTES,
|
|
155
155
|
# CLEAROTRON_REGISTER_LEDGER_KEEP and `npm run prune:ledger` are gone with the rotation tool, because the
|
|
156
156
|
# thing they bounded no longer grows: RECORD BODIES ARE WRITTEN INTO THE RUN'S OWN DIRECTORY
|
|
157
157
|
# (<run>/_driver/register-record-bodies.jsonl), archived with the run and purged with it. Nobody should
|
|
@@ -164,19 +164,19 @@ CLEAROTRON_DATABASE=clarivate
|
|
|
164
164
|
# CLEAROTRON_REGISTER_CALL_LOG is the one that stays box-global: it is one small row per provider call, read
|
|
165
165
|
# ACROSS runs by the provider-usage tally, and it is the independent witness that a run made record
|
|
166
166
|
# fetches at all (so a run whose bodies went missing reports as a failure and not as a clean zero).
|
|
167
|
-
# Leave it unset: the default is ~/trademark/telemetry/register-calls.jsonl (
|
|
168
|
-
#
|
|
169
|
-
#
|
|
170
|
-
#
|
|
167
|
+
# Leave it unset: the default is ~/trademark/telemetry/register-calls.jsonl (an existing ledger under the older
|
|
168
|
+
# telemetry directory keeps being read where it sits), and an existing corsearch-named file from before
|
|
169
|
+
# the vendor rename is still read where it sits — production is on that filename today, and reading it
|
|
170
|
+
# is not a fault. The vendor-named ENV VARS are gone.
|
|
171
171
|
#
|
|
172
|
-
#
|
|
172
|
+
# BEING BOX-GLOBAL, IT USED TO COLLECT THE TEST SUITE'S FIXTURE TRAFFIC. A full-suite run on a
|
|
173
173
|
# dev or test box appended mock provider calls to this same file, and nothing on the rows said so, so
|
|
174
174
|
# every usage pattern, provider comparison and cost read over it silently included them. `npm test`
|
|
175
175
|
# now exports CLEAROTRON_SUITE_TELEMETRY_DIR into its own temp root and the ledgers resolve under that
|
|
176
176
|
# instead. It is set by the test wrapper and is NOT an operator setting: setting it by hand sends a
|
|
177
177
|
# real run's billing rows somewhere the tally never reads.
|
|
178
178
|
#
|
|
179
|
-
# A box upgraded across
|
|
179
|
+
# A box upgraded across the retention change still holds its old global RECORD file. Nothing writes or reads it now; the
|
|
180
180
|
# driver says so once per process on stderr. Archive it with one `mv` when convenient.
|
|
181
181
|
|
|
182
182
|
|
|
@@ -187,7 +187,7 @@ CLEAROTRON_DATABASE=clarivate
|
|
|
187
187
|
# subprocess by default so it bills the OAuth SUBSCRIPTION (cheaper), not the API. Keep it set
|
|
188
188
|
# for the gateway + as the api-key fallback (see CLEAROTRON_AI_BILLING).
|
|
189
189
|
ANTHROPIC_API_KEY=sk-ant-...
|
|
190
|
-
# The headless subscription sign-in's token
|
|
190
|
+
# The headless subscription sign-in's token. `claude setup-token` — run on any
|
|
191
191
|
# machine you can sign in on — prints it; setup captures it by paste. The stage subprocess inherits it
|
|
192
192
|
# untouched in both billing modes (spawnEnv strips only the API key), so this row is the whole
|
|
193
193
|
# mechanism by which a browserless server authenticates the subscription lane.
|
|
@@ -202,7 +202,7 @@ CLAUDE_CODE_OAUTH_TOKEN=
|
|
|
202
202
|
# clean subscription bill, so it cannot serve as the key)
|
|
203
203
|
#
|
|
204
204
|
# `npm run setup` asks this as its own question, adopts the key, and proves the pair with one cheap
|
|
205
|
-
# turn before writing anything
|
|
205
|
+
# turn before writing anything — so a hand-edit here is the second-best route.
|
|
206
206
|
CLEAROTRON_AI_BILLING=subscription
|
|
207
207
|
# The api-key credential for openai-agent. Only read when CLEAROTRON_AI=openai-agent and
|
|
208
208
|
# CLEAROTRON_AI_BILLING=api-key; under "subscription" that engine reads ~/.codex/auth.json instead and
|
|
@@ -217,10 +217,10 @@ OPENAI_API_KEY=
|
|
|
217
217
|
# Azure OpenAI provider creds. RECONSTRUCTED: only $AZURE_OPENAI_DEPLOYMENT is referenced in this
|
|
218
218
|
# repo (as the rendered catalog id); these follow the azure-openai provider convention of the agent
|
|
219
219
|
# platform that consumes them, NOT this repo directly. Verify the exact names against that platform's
|
|
220
|
-
# own configuration at deploy — that config belongs to it and is not in this tree under any name
|
|
220
|
+
# own configuration at deploy — that config belongs to it and is not in this tree under any name.
|
|
221
221
|
# There was never a reader HERE to retire, which is what separates these rows from a stranded one — and
|
|
222
|
-
# the line below is what tells the catalogue guard so
|
|
223
|
-
# external: the agent platform's azure-openai provider config
|
|
222
|
+
# the line below is what tells the catalogue guard so.
|
|
223
|
+
# external: the agent platform's azure-openai provider config
|
|
224
224
|
AZURE_OPENAI_API_KEY=changeme
|
|
225
225
|
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
|
|
226
226
|
AZURE_OPENAI_DEPLOYMENT=gpt-5.4
|
|
@@ -235,7 +235,7 @@ AZURE_OPENAI_API_VERSION=2024-10-21
|
|
|
235
235
|
# file — an ENV VAR, not a committed literal, and there is no literal under any spelling to edit.
|
|
236
236
|
#
|
|
237
237
|
# THERE IS NO DEFAULT PROVIDER, and this block said there was until now. Unset, CLEAROTRON_DATABASE
|
|
238
|
-
# resolves to null and every use of it throws at the run door.
|
|
238
|
+
# resolves to null and every use of it throws at the run door. The old default was removed for the
|
|
239
239
|
# reason worth knowing before you leave it unset: an unset variable took Corsearch in silence, and the
|
|
240
240
|
# credential guard could not catch it because both boxes carried CORSEARCH_SESSION_KEY.
|
|
241
241
|
#
|
|
@@ -248,7 +248,7 @@ CLARIVATE_API_KEY=changeme
|
|
|
248
248
|
# Signa.
|
|
249
249
|
SIGNA_API_KEY=changeme
|
|
250
250
|
#
|
|
251
|
-
# USPTO, local
|
|
251
|
+
# USPTO, local — the free US source, and the only one here that is not a paid vendor. TWO
|
|
252
252
|
# variables, and they are needed at different moments, which is why neither substitutes for the other.
|
|
253
253
|
#
|
|
254
254
|
# USPTO_LOCAL_DB — where the register FILE lives. The provider searches this; at SEARCH time there is no
|
|
@@ -279,13 +279,13 @@ USPTO_API_KEY=changeme
|
|
|
279
279
|
# used to imply. There are four products and all four use it, though they behave differently without
|
|
280
280
|
# it and the difference is worth knowing before you diagnose one:
|
|
281
281
|
#
|
|
282
|
-
# Knockout search RUNS ANYWAY, and says what it skipped
|
|
282
|
+
# Knockout search RUNS ANYWAY, and says what it skipped. The screen
|
|
283
283
|
# carries the register count probe, so its register half is a whole answer
|
|
284
284
|
# without this key: it delivers counts, marks every name for manual
|
|
285
285
|
# verification, and states on the report that the open-web half did not
|
|
286
286
|
# run. The sweep is NOT ATTEMPTED — nothing is billed and nothing 429s.
|
|
287
287
|
# CLEAROTRON_KNOCKOUT_SWEEP_FIXTURES still gives a $0 dev run WITH a sweep.
|
|
288
|
-
# The three clearances REFUSE AT PREFLIGHT, before a stage has spent
|
|
288
|
+
# The three clearances REFUSE AT PREFLIGHT, before a stage has spent. All three
|
|
289
289
|
# (global preliminary, carry `commonLawGrid: true` and a saved search cannot switch it off
|
|
290
290
|
# multi-country focus, (search-policy.mjs), so the deterministic grid sweep always runs, and the
|
|
291
291
|
# full country) run door refuses by name — grep the tree for the exact string:
|
|
@@ -311,15 +311,15 @@ PERPLEXITY_API_KEY=pplx-...
|
|
|
311
311
|
# top-up somebody can do in five minutes rather than a defect to diagnose.
|
|
312
312
|
#
|
|
313
313
|
# WITHOUT IT the lane does not silently shrink: every grid cell gaps and the run says so, naming the
|
|
314
|
-
# dominant cause (`SERPAPI_API_KEY absent from driver env`). There is no switch to
|
|
315
|
-
#
|
|
314
|
+
# dominant cause (`SERPAPI_API_KEY absent from driver env`). There is no switch to turn on first — that
|
|
315
|
+
# switch was deleted — so any run whose product carries the zh lane needs this key or discloses the gap.
|
|
316
316
|
SERPAPI_API_KEY=your-serpapi-key
|
|
317
317
|
|
|
318
318
|
|
|
319
319
|
# -----------------------------------------------------------------------------
|
|
320
320
|
# 5. REGISTER / EU (EUIPO — OAuth2 client-credentials)
|
|
321
321
|
# -----------------------------------------------------------------------------
|
|
322
|
-
# Needed ONLY when CLEAROTRON_DATABASE=euipo (section 4).
|
|
322
|
+
# Needed ONLY when CLEAROTRON_DATABASE=euipo (section 4). They used to be read by a side
|
|
323
323
|
# tool that attached to every register stage whether or not they were set — so an instance with no
|
|
324
324
|
# EUIPO key looked identical to one with a key. EUIPO is a register provider now: unset credentials
|
|
325
325
|
# make a run REFUSE at preflight, by name, before any model spend.
|
|
@@ -342,7 +342,7 @@ EUIPO_ENVIRONMENT=production
|
|
|
342
342
|
PROFILE_REPO_ROOT=
|
|
343
343
|
SIGNA_FIXTURES_DIR= # canned signa payloads — the $0 seam for that adapter
|
|
344
344
|
|
|
345
|
-
# ── Names the audit could not see until
|
|
345
|
+
# ── Names the audit could not see until the catalogue widened ────────────────────────────────────
|
|
346
346
|
# Each of these is read through a name held in a string constant — `const IDENT = "NAME"` in one file,
|
|
347
347
|
# `process.env[IDENT]` in another. Both halves are literals at the author's keyboard, so they were
|
|
348
348
|
# always governed names; the scanner simply could not reach them. They are catalogued here now.
|
|
@@ -356,7 +356,7 @@ SIGNA_FIXTURES_DIR= # canned signa payloads — the $0 seam for that
|
|
|
356
356
|
# sets one. This name has no default — unset, the lane refuses. Moving it there would spend that
|
|
357
357
|
# header's credibility, which every other row in that file depends on, to buy a tidier taxonomy.
|
|
358
358
|
# `.env.example` promises "what you decide at install", and a must-set variable fits deciding-at-install
|
|
359
|
-
# better than it fits never-set-one. Owner ruling, 2026-08-30
|
|
359
|
+
# better than it fits never-set-one. Owner ruling, 2026-08-30.
|
|
360
360
|
#
|
|
361
361
|
# GIVING THE LANE A DEFAULT WAS CONSIDERED AND REFUSED: refuse-by-name-when-unset is the honest design —
|
|
362
362
|
# the same family as the pool root, where an unset value THROWS rather than quietly resolving somewhere
|
|
@@ -368,7 +368,7 @@ CLEAROTRON_JX_SUBCLASS_DB=
|
|
|
368
368
|
# box's ledger and never inherits it. Sits BELOW an explicitly-named ledger file: a test that names its
|
|
369
369
|
# own path is being deliberate, and this exists for the runs that name nothing.
|
|
370
370
|
#
|
|
371
|
-
# CANNOT LEAVE THIS FILE WHILE PRODUCT CODE READS IT
|
|
371
|
+
# CANNOT LEAVE THIS FILE WHILE PRODUCT CODE READS IT. The catalogue ratchet
|
|
372
372
|
# refuses any product-read name with no row, and the backlog it would otherwise join turns ONE WAY.
|
|
373
373
|
# So the remedy is the knobs step, not the surface step: remove the READ, not the row. A fixture
|
|
374
374
|
# seam reached through the environment is that argument in its purest form.
|
|
@@ -385,7 +385,6 @@ CLEAROTRON_SUITE_TELEMETRY_DIR=
|
|
|
385
385
|
# listed here because the catalogue ratchet is about what an operator can FIND, not what they should set.
|
|
386
386
|
# Replaces PORTAL_DEMO, which named only one of the processes that has to know.
|
|
387
387
|
# Read by driver/portal-service.mjs, driver/demo-posture.mjs and mcp-server/http-server.mjs.
|
|
388
|
-
# Refs tracker issue 2015, 2106.
|
|
389
388
|
# effect: deployment
|
|
390
389
|
CLEAROTRON_DEMO=
|
|
391
390
|
|
|
@@ -400,7 +399,7 @@ CLEAROTRON_DEMO=
|
|
|
400
399
|
# IT IS NOT A RUN-SLOT, deliberately. A what-if that took a slot from CLEAROTRON_MAX_CONCURRENT_RUNS could
|
|
401
400
|
# BLOCK an admitted paid run rather than merely share the machine with it — the same starvation one
|
|
402
401
|
# layer up. So the two pools are separate and only this one bounds experiments.
|
|
403
|
-
# Read by driver/whatif-worker.mjs.
|
|
402
|
+
# Read by driver/whatif-worker.mjs.
|
|
404
403
|
# effect: tuning
|
|
405
404
|
CLEAROTRON_WHATIF_MAX_CONCURRENT=1
|
|
406
405
|
|
|
@@ -421,7 +420,7 @@ CLEAROTRON_WHATIF_MAX_CONCURRENT=1
|
|
|
421
420
|
#
|
|
422
421
|
# Surfaced by the cut-over overlay control once the withheld `ops/` bucket was laid back over the public
|
|
423
422
|
# tree: the ratchets that would have caught it had had no subject since the cut, so this is a gap of
|
|
424
|
-
# long standing rather than a regression.
|
|
423
|
+
# long standing rather than a regression.
|
|
425
424
|
#
|
|
426
425
|
# Left EMPTY here on purpose. A path in this file would read as a default; there is none, and the
|
|
427
426
|
# installer supplies the real value.
|
|
@@ -438,7 +437,7 @@ CLEAROTRON_CHECKOUT_DIR=
|
|
|
438
437
|
# GitHub sets GITHUB_*, so a row would document somebody else's decision. We set these, so a row
|
|
439
438
|
# documents ours.
|
|
440
439
|
#
|
|
441
|
-
# Found by the audit
|
|
440
|
+
# Found by the audit rather than by the diagnosis that prompted it — they arrived with
|
|
442
441
|
# tonight's release-pipeline work and the catalogue ratchet caught them on the next run, which is the
|
|
443
442
|
# ratchet doing its job. Raised with the release lane rather than silently absorbed.
|
|
444
443
|
|
|
@@ -485,7 +484,7 @@ CLEAROTRON_RELEASE_WAIT_MS=
|
|
|
485
484
|
TRADEMARK_MCP_KEY_SOCKET=
|
|
486
485
|
|
|
487
486
|
# ── Who the completion notice reaches ────────────────────────────────────────────────────────────
|
|
488
|
-
# Both arrived
|
|
487
|
+
# Both arrived together and shipped undeclared: they are read by product code and were in
|
|
489
488
|
# neither this file nor the governance table, which six private environment-contract ratchets caught on
|
|
490
489
|
# the next overlay run. Catalogued here on the same terms as the release names above — they are OUR
|
|
491
490
|
# names, read by code that ships.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -6,6 +6,10 @@ you cannot run and why, and the three rules that fail CI if you miss them.
|
|
|
6
6
|
Start with [README.md](README.md) for what the engine does and [INSTALL.md](INSTALL.md) for a real
|
|
7
7
|
installation.
|
|
8
8
|
|
|
9
|
+
If a word in the code means something you did not expect, [`docs/GLOSSARY.md`](docs/GLOSSARY.md)
|
|
10
|
+
defines the ones that carry a local meaning — arm, seat, plant, ledger, receipt, carry-through and
|
|
11
|
+
the rest — with the file that owns each.
|
|
12
|
+
|
|
9
13
|
## What you can run, with nothing but a clone
|
|
10
14
|
|
|
11
15
|
**Node 22 is a hard floor.** `package.json` declares it, `.nvmrc` pins it, and the free US register
|
|
@@ -91,13 +95,13 @@ any writing pass over the documentation, applies to them.
|
|
|
91
95
|
|
|
92
96
|
## The three rules that fail CI
|
|
93
97
|
|
|
94
|
-
**1.
|
|
95
|
-
source
|
|
96
|
-
fails
|
|
98
|
+
**1. Build `portal-ui/dist` before you push.** The bundle is not committed; it is gitignored, and
|
|
99
|
+
CI runs `npm run build:ui` from source. So there is nothing to add — run it locally when you touch
|
|
100
|
+
`portal-ui/src`, because a bundle that does not build fails CI and there is no committed copy to
|
|
101
|
+
fall back on:
|
|
97
102
|
|
|
98
103
|
```bash
|
|
99
104
|
npm run build:ui
|
|
100
|
-
git add portal-ui/dist
|
|
101
105
|
```
|
|
102
106
|
|
|
103
107
|
CI builds on the exact Node version named in
|
package/INSTALL.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# Install & Operate
|
|
1
|
+
# Install & Operate — the reference
|
|
2
|
+
|
|
3
|
+
[QUICKSTART.md](QUICKSTART.md) gets one search running in three commands. This is everything else.
|
|
2
4
|
|
|
3
5
|
Two documents in one file, and most readers need only the first. The engine needs no agent gateway — the
|
|
4
6
|
reasoning stages' only external LLM dependency is a coding CLI: the Claude CLI (the default) or the codex
|
|
@@ -46,9 +48,22 @@ run is [mcp-server/CONNECT.md](mcp-server/CONNECT.md), and why something is the
|
|
|
46
48
|
- **macOS, Linux, or native Windows for the demo; WSL2 for a clearance.** `npx clearotron
|
|
47
49
|
demo` runs anywhere Node does, native Windows included. A real clearance does not: the engine resolves
|
|
48
50
|
the reasoning CLI the POSIX way, so a native-Windows clearance refuses at preflight even with the CLI
|
|
49
|
-
on `PATH`. On Windows, `wsl --install`, then
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
on `PATH`. On Windows, `wsl --install -d Ubuntu`, then `wsl -d Ubuntu`, and work through this page
|
|
52
|
+
from **inside** that distribution. Name it: plain `wsl` can open a minimal image with no apt, no
|
|
53
|
+
curl and no bash, and everything below assumes Ubuntu. A fresh Ubuntu has no Node at all, and
|
|
54
|
+
apt's package is below the floor above, so `npx` answers "not found" before anything of ours runs.
|
|
55
|
+
From the Ubuntu prompt:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
sudo apt update && sudo apt install -y curl
|
|
59
|
+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
|
|
60
|
+
. "$HOME/.nvm/nvm.sh" && nvm install 22 # 22.13 or newer, per the floor above
|
|
61
|
+
npm install -g @anthropic-ai/claude-code
|
|
62
|
+
claude # once, interactively, to sign in
|
|
63
|
+
npx clearotron install
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
A *hosted* deployment needs Linux for one further thing, the systemd outbox trigger —
|
|
52
67
|
[driver/systemd/README.md](driver/systemd/README.md).
|
|
53
68
|
- **A reasoning CLI on your `PATH`, signed in.** This is the prerequisite people miss. Every stage runs
|
|
54
69
|
as a headless turn of a third-party binary, and `CLEAROTRON_AI` picks which one for the whole install.
|
|
@@ -151,6 +166,11 @@ you want the second one** — the first assumes access to the repository, which
|
|
|
151
166
|
|
|
152
167
|
### From the repository
|
|
153
168
|
|
|
169
|
+
**This is the development tree, and it is for contributors.** If you want to run a clearance, take one
|
|
170
|
+
of the two routes above instead. A clone is not a smaller version of the package — it carries the
|
|
171
|
+
fixtures and sample brand owners the project develops against, and those load as real records. They
|
|
172
|
+
are not yours and they are not in the package, which excludes them deliberately.
|
|
173
|
+
|
|
154
174
|
```
|
|
155
175
|
git clone <this-repo> && cd <repo>
|
|
156
176
|
npm install # installs all workspaces
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ web for conflicts, reasons about the risk the way a clearance lawyer would, and
|
|
|
15
15
|
report with a machine-readable audit trail behind every finding. It runs headless on your own machine:
|
|
16
16
|
no gateway, no platform, and nothing about your matters reaches us.
|
|
17
17
|
|
|
18
|
-
[Install & operate](INSTALL.md) · [Docs](docs/README.md) · [Security](docs/SECURITY.md) · [Contributing](CONTRIBUTING.md) · [Licence](#licence)
|
|
18
|
+
[Quickstart](QUICKSTART.md) · [Install & operate](INSTALL.md) · [Docs](docs/README.md) · [Security](docs/SECURITY.md) · [Contributing](CONTRIBUTING.md) · [Licence](#licence)
|
|
19
19
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
@@ -71,7 +71,7 @@ sentence, or set the classes, marketplaces and search depth yourself:
|
|
|
71
71
|

|
|
72
72
|
|
|
73
73
|
A finished clearance reads like this — the verdict, the risk band and the four answers. **The mark
|
|
74
|
-
VENQORI is invented; the
|
|
74
|
+
VENQORI is invented; the register data behind it is real and live**, and the report says so on
|
|
75
75
|
its own face:
|
|
76
76
|
|
|
77
77
|

|
|
@@ -90,7 +90,7 @@ npx clearotron run --job my-job.json
|
|
|
90
90
|
|
|
91
91
|
## How it fits together
|
|
92
92
|
|
|
93
|
-
- **A reasoning CLI does the thinking.** Every stage runs as a headless turn of the [Claude CLI](https://claude.com/claude-code) (`claude`) or the Codex CLI (`codex`),
|
|
93
|
+
- **A reasoning CLI does the thinking.** Every stage runs as a headless turn of the [Claude CLI](https://claude.com/claude-code) (`claude`) or the Codex CLI (`codex`), which must be installed. `CLEAROTRON_AI_BILLING` chooses what pays for the turn: your signed-in subscription, or an API key. Either way the CLI is what runs — there is no path that calls the model directly.
|
|
94
94
|
- **One register credential sets coverage and cost.** `CLEAROTRON_DATABASE` has no default — a run refuses rather than picking a vendor for you. EUIPO and a local USPTO index cost nothing; Signa, Clarivate and Corsearch are subscriptions. [The six, and what each reaches](providers/README.md).
|
|
95
95
|
- **One research key.** `PERPLEXITY_API_KEY` covers the open web and the marketplaces. A clearance refuses without it at the door, before a register stage has spent.
|
|
96
96
|
- **A run takes hours, and survives interruption.** Every finished stage stays on disk; a resume re-runs only what is missing, and a run parked on a provider cap continues by itself.
|
|
@@ -115,7 +115,8 @@ credential.
|
|
|
115
115
|
|
|
116
116
|
| Goal | Start here |
|
|
117
117
|
|---|---|
|
|
118
|
-
|
|
|
118
|
+
| Get one search running | [QUICKSTART.md](QUICKSTART.md) |
|
|
119
|
+
| Install, configure and operate it | [INSTALL.md](INSTALL.md) — the reference |
|
|
119
120
|
| Pick a register, or run without a paid vendor | [INSTALL.md § 3a](INSTALL.md#3a-running-without-a-paid-register-vendor) |
|
|
120
121
|
| Submit jobs, or consume what a run emits | [INTAKE](docs/INTAKE.md) · [DELIVERY](docs/DELIVERY.md) |
|
|
121
122
|
| Read and question a finished run from a chat app | [mcp-server/CONNECT.md](mcp-server/CONNECT.md) |
|
|
@@ -128,8 +129,8 @@ credential.
|
|
|
128
129
|
A clone is the working tree, not a way to install the product — install it from the package above.
|
|
129
130
|
|
|
130
131
|
```bash
|
|
131
|
-
git clone https://github.com/CordilleraSarl/
|
|
132
|
-
cd
|
|
132
|
+
git clone https://github.com/CordilleraSarl/clearotron
|
|
133
|
+
cd clearotron
|
|
133
134
|
npm install # every workspace
|
|
134
135
|
npm run build -w portal-ui # the browser bundle is not committed — build it once
|
|
135
136
|
npm test # the offline suite — no credentials, no network
|
package/bin/example.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// npx clearotron demo replay demo into ~/trademark-demo and open the portal
|
|
7
7
|
// npx clearotron demo --product <id> replay a different product's demo (the ids are listed below)
|
|
8
8
|
// npx clearotron demo --run-dir <dir> replay a frozen example from somewhere else
|
|
9
|
-
// npx clearotron demo --base <dir> put the whole demo somewhere else (
|
|
9
|
+
// npx clearotron demo --base <dir> put the whole demo somewhere else (one directory to remove later)
|
|
10
10
|
// npx clearotron demo --port 9000 serve on another port (the demo opens three doors:
|
|
11
11
|
// 9000, 9001 and 9002)
|
|
12
12
|
// npx clearotron demo --no-open do not try to open a browser
|
|
@@ -39,6 +39,7 @@ import "../shared/env-local.mjs"; // step 4 / — FIRST: this program read a
|
|
|
39
39
|
// back-filled. Placed above every other import because a side-effecting import runs in order.
|
|
40
40
|
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
41
41
|
import { homedir, tmpdir } from "node:os";
|
|
42
|
+
import { removeDirectory } from "../shared/os-advice.mjs";
|
|
42
43
|
import { invoke } from "../shared/invocation.mjs"; // — the printed command is resolved once, for the reader who is actually standing there
|
|
43
44
|
import { basename, dirname, join, resolve, sep } from "node:path";
|
|
44
45
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -257,8 +258,8 @@ const published = results[0].published;
|
|
|
257
258
|
|
|
258
259
|
// THE LABEL. The reader is about to look at a document that reads like advice about a real mark. It is
|
|
259
260
|
// not, and the demo says so before the browser opens rather than in a footnote nobody reaches.
|
|
260
|
-
console.log(" Real engine output for the fictional mark VENQORI
|
|
261
|
-
console.log("
|
|
261
|
+
console.log(" Real engine output for the fictional mark VENQORI, captured against Clarivate Compumark.");
|
|
262
|
+
console.log(" Replaying it needs no account, no key and no network.");
|
|
262
263
|
console.log(" Every number, band and citation below was produced by that real run and is being");
|
|
263
264
|
console.log(" re-rendered from its artifacts. It is an example, not advice.\n");
|
|
264
265
|
// NAMES THE POPULATION. This printed "13 finding(s)" beside a report showing
|
|
@@ -315,7 +316,7 @@ if (has("--once")) {
|
|
|
315
316
|
// the base there would tell a reader to remove a directory that does not exist and leave the one that
|
|
316
317
|
// does — worse than silence, because it reads as an answer.
|
|
317
318
|
const created = flag("--pool") ? poolRoot : demoBase;
|
|
318
|
-
console.log(` Removing it later is one directory:
|
|
319
|
+
console.log(` Removing it later is one directory: ${removeDirectory(created)}\n`);
|
|
319
320
|
// NOT A BARE ZERO. A demo that failed to replay one of its four sets `exitCode` above, and exiting 0
|
|
320
321
|
// here would discard it — printing the failure and then reporting success, which is the shape this
|
|
321
322
|
// change exists to remove. `--once` is also the invocation a script is most likely to use, so it is
|
|
@@ -364,7 +365,7 @@ const startArgs = ["--demo", "--base", demoBase];
|
|
|
364
365
|
if (flag("--port")) startArgs.push("--port", flag("--port"));
|
|
365
366
|
if (has("--no-open")) startArgs.push("--no-open");
|
|
366
367
|
|
|
367
|
-
console.log(` Removing this demo later is one directory:
|
|
368
|
+
console.log(` Removing this demo later is one directory: ${removeDirectory(demoBase)}`);
|
|
368
369
|
strayFromAnOlderDemo();
|
|
369
370
|
console.log("");
|
|
370
371
|
|