clearotron 0.3.2-beta.7 → 0.3.2-beta.9
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 +58 -26
- package/CONTRIBUTING.md +8 -8
- package/INSTALL.md +148 -81
- package/README.md +3 -3
- package/SECURITY.md +3 -3
- package/bin/brandowner.mjs +3 -3
- package/bin/framework-preflight.mjs +1 -1
- package/bin/onboard.mjs +637 -216
- package/bin/start.mjs +151 -27
- package/bin/update.mjs +58 -11
- package/build-info.json +2 -2
- package/docs/DELIVERY.md +2 -1
- package/docs/INTAKE.md +1 -1
- package/docs/ONBOARDING.md +1 -1
- package/docs/architecture/03-run-lifecycle.md +6 -6
- package/docs/architecture/04-configuration-reference.md +32 -14
- package/docs/architecture/05-config-governance.md +23 -8
- package/docs/architecture/05-customer-profiles.md +2 -2
- package/docs/architecture/06-operations-runbook.md +3 -3
- package/docs/architecture/08-development-guide.md +6 -6
- package/docs/configuration.md +5 -5
- package/docs/decisions/0003-credential-model.md +1 -1
- package/docs/writing-standard.md +4 -0
- package/driver/CHANGELOG.md +124 -0
- package/driver/README.md +3 -3
- package/driver/band-size.mjs +59 -0
- package/driver/binding-layers.mjs +1 -1
- package/driver/citation-census.json +3 -3
- package/driver/{prelim-variants-record.mjs → clearance-variants-record.mjs} +24 -24
- package/driver/common-law-receipts.mjs +2 -2
- package/driver/company-bundle.mjs +3 -3
- package/driver/compose-read.mjs +8 -14
- package/driver/config-inventory.mjs +112 -9
- package/driver/consumption-ledger.mjs +2 -2
- package/driver/contract-arm2-baseline.json +2 -5
- package/driver/contract-dictation-registry.mjs +19 -19
- package/driver/contract-e3-backlog.mjs +43 -43
- package/driver/contract-e3-baseline.json +14 -14
- package/driver/contract-vocabulary.mjs +68 -27
- package/driver/deliver-trigger.sh +16 -16
- package/driver/demo-container.mjs +3 -3
- package/driver/dev-portal.mjs +3 -3
- package/driver/disposition-call.mjs +1 -1
- package/driver/door-gates.mjs +41 -7
- package/driver/doubt-ledger.mjs +2 -2
- package/driver/drainer-identity.mjs +34 -8
- package/driver/driver.config.mjs +367 -104
- package/driver/engine/CONTRACT.md +10 -3
- package/driver/engine/README.md +2 -2
- package/driver/engine/anthropic-agent.mjs +77 -21
- package/driver/engine/auth.mjs +129 -10
- package/driver/engine/jx-turn.mjs +7 -6
- package/driver/engine/mcp/README.md +1 -1
- package/driver/engine/mcp/dispositions-server.mjs +3 -3
- package/driver/engine/mcp/gather-config.mjs +9 -9
- package/driver/engine/mcp/perplexity-server.mjs +2 -2
- package/driver/engine/mcp/recording-server.mjs +18 -5
- package/driver/engine/openai-agent.mjs +4 -2
- package/driver/engine/probe.mjs +110 -23
- package/driver/enqueue-schema.mjs +6 -2
- package/driver/findings-model.mjs +6 -3
- package/driver/flag-snapshot.mjs +34 -8
- package/driver/form-neighbourhood.mjs +54 -7
- package/driver/framework.mjs +4 -4
- package/driver/gateway.mjs +36 -24
- package/driver/jx-lanes.mjs +23 -4
- package/driver/jx-units.mjs +7 -4
- package/driver/jx.mjs +34 -4
- package/driver/knockout-review-record.mjs +56 -4
- package/driver/known-conflicts.mjs +1 -1
- package/driver/matter-frame-record.mjs +90 -1
- package/driver/named-band.mjs +1 -1
- package/driver/ordinary-words.mjs +51 -0
- package/driver/outbox-backoff.mjs +31 -16
- package/driver/package.json +1 -1
- package/driver/partial-payload-baseline.json +2 -2
- package/driver/phase0.mjs +3 -3
- package/driver/pipeline-knockout.mjs +5 -5
- package/driver/pipeline.mjs +396 -81
- package/driver/placement-form.mjs +77 -1
- package/driver/placement-model.mjs +1 -1
- package/driver/portal-config-view.mjs +30 -1
- package/driver/portal-report.mjs +107 -6
- package/driver/portal-service.mjs +80 -14
- package/driver/portal-upstream.mjs +1 -1
- package/driver/predelivery-lint.mjs +12 -2
- package/driver/preserve-merge.mjs +3 -3
- package/driver/product-rows.mjs +2 -2
- package/driver/products.mjs +1 -1
- package/driver/profiles/README.md +3 -3
- package/driver/profiles/demo-brand-owner.json +2 -2
- package/driver/profiles.mjs +55 -17
- package/driver/progress.mjs +18 -8
- package/driver/provider-usage.mjs +8 -8
- package/driver/publish/index.mjs +154 -8
- package/driver/publish/knockout.mjs +39 -5
- package/driver/publish/pool-admin.mjs +1 -1
- package/driver/publish/publish-inputs.mjs +18 -2
- package/driver/publish/render-knockout.mjs +184 -31
- package/driver/publish/render.mjs +323 -93
- package/driver/publish/report-data.mjs +4 -1
- package/driver/publish/report-topbar.mjs +58 -0
- package/driver/publish/search-depth.mjs +133 -4
- package/driver/publish/templates/report.css +78 -4
- package/driver/publish/xlsx.mjs +20 -1
- package/driver/queue-order.mjs +2 -2
- package/driver/recording-agreement.mjs +1 -1
- package/driver/reference-score.mjs +1 -1
- package/driver/register-availability.mjs +2 -2
- package/driver/register-count.mjs +50 -5
- package/driver/register-coverage.mjs +161 -1
- package/driver/register-digest-record.mjs +236 -11
- package/driver/register-grant-vocabulary.mjs +1 -1
- package/driver/register-plan.mjs +189 -2
- package/driver/registry-fidelity.mjs +3 -3
- package/driver/repair-composers.mjs +1 -1
- package/driver/repair-contract.mjs +1 -1
- package/driver/replay-archive.mjs +6 -6
- package/driver/report-overview-record.mjs +2 -2
- package/driver/result-noun-fields.mjs +2 -2
- package/driver/run-economics.mjs +41 -10
- package/driver/run-requirements.mjs +173 -9
- package/driver/runner.mjs +5 -5
- package/driver/scope-facts.mjs +20 -5
- package/driver/scope-ledger.mjs +5 -5
- package/driver/search-policy.mjs +22 -12
- package/driver/skills/README.md +15 -15
- package/driver/skills/blind-frame/SKILL.md +2 -2
- package/driver/skills/case-law-citation/SKILL.md +4 -4
- package/driver/skills/case-law-citation/sources/eurlex.md +1 -1
- package/driver/skills/{prelim-common-law → clearance-common-law}/SKILL.md +22 -22
- package/driver/skills/{prelim-common-law → clearance-common-law}/perplexity-prompts.md +1 -1
- package/driver/skills/{prelim-register → clearance-register}/SKILL.md +10 -10
- package/driver/skills/{prelim-register → clearance-register}/digest.md +2 -2
- package/driver/skills/{prelim-register → clearance-register}/providers/README.md +1 -1
- package/driver/skills/{prelim-register → clearance-register}/providers/clarivate.md +37 -35
- package/driver/skills/{prelim-register → clearance-register}/providers/corsearch.md +20 -11
- package/driver/skills/{prelim-register → clearance-register}/providers/signa.md +5 -5
- package/driver/skills/{prelim-register → clearance-register}/register-recipes.md +3 -3
- package/driver/skills/{prelim-register → clearance-register}/status-rules.md +2 -2
- package/driver/skills/{prelim-register → clearance-register}/stealth-filer-indicators.md +1 -1
- package/driver/skills/{prelim-register → clearance-register}/unit.md +2 -2
- package/driver/skills/{prelim-search → clearance-search}/SKILL.md +31 -31
- package/driver/skills/{prelim-search → clearance-search}/delivery-contract.md +1 -1
- package/driver/skills/{prelim-search → clearance-search}/phase2-execution.md +18 -18
- package/driver/skills/{prelim-search → clearance-search}/synthesis-rules.md +7 -7
- package/driver/skills/{prelim-variants → clearance-variants}/SKILL.md +18 -18
- package/driver/skills/{prelim-variants → clearance-variants}/transliteration-scripts.md +5 -5
- package/driver/skills/frame-diff/SKILL.md +1 -1
- package/driver/skills/knockout-assess/SKILL.md +10 -7
- package/driver/skills/matter-frame/SKILL.md +3 -3
- package/driver/skills/narrative-refutation/SKILL.md +9 -9
- package/driver/skills/placement-inquiry/SKILL.md +5 -5
- package/driver/stage-context.mjs +1 -1
- package/driver/stages-knockout.mjs +4 -4
- package/driver/stages.mjs +65 -61
- package/driver/status-snapshot.mjs +2 -2
- package/driver/suite-census.json +340 -136
- package/driver/surface-exit-verdict.mjs +58 -0
- package/driver/systemd/README.md +9 -6
- package/driver/systemd/clearotron-worker.service +1 -1
- package/driver/terminal-clamp.mjs +109 -1
- package/driver/tokens.mjs +169 -3
- package/driver/unit-environment.mjs +42 -15
- package/driver/unit-inventory.mjs +19 -2
- package/driver/usage-ledger.mjs +1 -1
- package/driver/variant-manifest-model.mjs +4 -4
- package/driver/verify-knockout.mjs +27 -0
- package/driver/verify.mjs +94 -6
- package/driver/whatif-queue.mjs +1 -1
- package/driver/wordlists/en.txt +63906 -0
- package/mcp-server/CHANGELOG.md +8 -0
- package/mcp-server/README.md +1 -1
- package/mcp-server/lib/README.md +1 -1
- package/mcp-server/lib/options.mjs +8 -7
- package/mcp-server/lib/plan.mjs +18 -2
- package/mcp-server/lib/runs.mjs +1 -1
- package/mcp-server/lib/usage.mjs +3 -3
- package/mcp-server/lib/whatif.mjs +1 -1
- package/mcp-server/package.json +1 -1
- package/mcp-server/server.mjs +18 -1
- package/package.json +12 -11
- package/portal-ui/dist/assets/{index-CVOIvdhc.css → index-CtvwLCti.css} +207 -3
- package/portal-ui/dist/assets/{index-5UyqAyNM.js → index-EVaSo5-g.js} +1580 -527
- package/portal-ui/dist/index.html +2 -2
- package/portal-ui/package.json +1 -1
- package/providers/README.md +1 -1
- package/providers/_shared/enumerate.mjs +6 -6
- package/providers/_shared/execute-plan.mjs +3 -3
- package/providers/_shared/ledger.mjs +119 -5
- package/providers/_shared/provider-text.mjs +2 -2
- package/providers/_shared/screen.mjs +2 -2
- package/providers/_shared/script-form.mjs +3 -3
- package/providers/_shared/territory-codes.mjs +23 -3
- package/providers/clarivate/README.md +1 -1
- package/providers/clarivate/src/capabilities.js +12 -12
- package/providers/clarivate/src/core.js +37 -43
- package/providers/corsearch/README.md +1 -1
- package/providers/corsearch/src/capabilities.js +5 -5
- package/providers/corsearch/src/core.js +3 -3
- package/providers/jx/README.md +2 -1
- package/providers/jx/src/turn-envelope.mjs +8 -3
- package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
- package/providers/oauth-mcp-bridge/package.json +1 -1
- package/providers/perplexity/src/core.js +1 -1
- package/providers/signa/README.md +1 -1
- package/providers/signa/src/capabilities.js +42 -49
- package/providers/signa/src/core.js +106 -29
- package/providers/uspto-local/README.md +1 -1
- package/providers/uspto-local/src/sync.js +1 -1
- package/scripts/README.md +1 -0
- package/scripts/ask-ai-render-check.mjs +127 -1
- package/scripts/authority-boundary-probe.mjs +8 -6
- package/scripts/backfill-started-at.mjs +2 -2
- package/scripts/census-merge-driver.mjs +33 -2
- package/scripts/citation-anchor-report.mjs +181 -0
- package/scripts/dead-names.mjs +1 -1
- package/scripts/deprecate-below.mjs +66 -8
- package/scripts/drain-preflight.mjs +1 -1
- package/scripts/e2e.mjs +174 -0
- package/scripts/env-audit.mjs +39 -6
- package/scripts/env-classify.mjs +20 -2
- package/scripts/freeze-example-run.mjs +61 -18
- package/scripts/generated-files-are-current.mjs +69 -4
- package/scripts/live-surface-check.mjs +124 -41
- package/scripts/markdown-link-check.mjs +1 -1
- package/scripts/merge-shape-check.mjs +242 -0
- package/scripts/mint-names-in-force.mjs +5 -5
- package/scripts/mint-offered-territories.mjs +72 -0
- package/scripts/mint-public-residue.mjs +2 -2
- package/scripts/mint-reference-strip-backlog.mjs +2 -2
- package/scripts/mint-suite-census.mjs +75 -2
- package/scripts/mint-writing-standard-backlog.mjs +2 -2
- package/scripts/purge-runs.mjs +7 -7
- package/scripts/reconcile-runs.mjs +2 -2
- package/scripts/release-approve-parked.mjs +20 -2
- package/scripts/release-await-cut.mjs +120 -1
- package/scripts/release-note-required.mjs +76 -8
- package/scripts/report-header-render-check.mjs +164 -0
- package/scripts/settings-render-check.mjs +75 -2
- package/scripts/test-full.mjs +96 -3
- package/scripts/test-run.mjs +10 -0
- package/shared/brand.mjs +27 -0
- package/shared/connect-clients.mjs +39 -11
- package/shared/deployment-box.mjs +7 -2
- package/shared/driver-dir.mjs +1 -1
- package/shared/env-aliases.mjs +1 -1
- package/shared/identifier-scan.mjs +65 -9
- package/shared/identifier-sentinels.mjs +22 -0
- package/shared/names-in-force.mjs +4 -2
- package/shared/offered-territories.json +738 -0
- package/shared/pre-rename-spellings.mjs +53 -0
- package/shared/reference-guard-classes.mjs +40 -2
- package/shared/stdio-connect.mjs +39 -4
- package/shared/tree-commit.mjs +48 -0
- /package/driver/skills/{prelim-register → clearance-register}/providers/euipo.md +0 -0
- /package/driver/skills/{prelim-register → clearance-register}/providers/free-tier.md +0 -0
- /package/driver/skills/{prelim-register → clearance-register}/providers/uspto-local.md +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/field-doctrine-pharma.md +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/firm-wide-reasoning.md +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/report-prose.md +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/risk-framework-demo.manifest.json +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/risk-framework-demo.md +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/risk-framework-triage.manifest.json +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/risk-framework-triage.md +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/risk-framework.manifest.json +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/risk-framework.md +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/template-formatting.md +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/templates/email/generic.md +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/templates/search-request-form.html +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/worked-examples-demo.md +0 -0
- /package/driver/skills/{prelim-search → clearance-search}/worked-examples.md +0 -0
|
@@ -29,7 +29,7 @@ time, so all of them honour a mid-process env flip — the file's own NOTE besid
|
|
|
29
29
|
`./driver.config.mjs` resolves to ONE cached module instance across the offline test fleet, so
|
|
30
30
|
import-time captures silently pinned every test to the first test's env. What IS frozen at first import
|
|
31
31
|
is the module-level declarations beside it — the consts `REGISTER_PROVIDER` and
|
|
32
|
-
`UNREACHABLE_SENIOR_POLICY
|
|
32
|
+
`UNREACHABLE_SENIOR_POLICY`.
|
|
33
33
|
Because the driver runs as a systemd **oneshot** (a fresh process per activation), editing the
|
|
34
34
|
deployment's `.env` takes effect on the next queue-triggered run with no deploy and no restart — that is the
|
|
35
35
|
supported way to change caps and A/B toggles. One trap: `synthesis.model` reads
|
|
@@ -74,7 +74,7 @@ does after the stage's full retry ladder fails ([03 §5](03-run-lifecycle.md#5--
|
|
|
74
74
|
| # | Stage | Model · effort | Timeout / stall | Gated output (file truth) | Fatality |
|
|
75
75
|
|---|---|---|---|---|---|
|
|
76
76
|
| 1 | `matter-frame` | opus · high | 300 / 300 | `matter-context.md` | fatal |
|
|
77
|
-
| 2 | `
|
|
77
|
+
| 2 | `clearance-variants` | opus · high | 600 / 450 | `variant-manifest.md` (+ `.json` sibling, strict-parsed) | fatal |
|
|
78
78
|
| 3 | `blind-frame` | opus · high | 600 / 450 | `blind-frame-model.json` (strict-parsed; the prose twin was retired 2026-08-03 — nothing read it) | non-fatal (frame-diff skipped this run) |
|
|
79
79
|
| 4 | `common-law` | haiku · low | 2250 / 1100 | `common-law-findings.md` (+ grid ledger, plugin-written) | fatal at fan-in |
|
|
80
80
|
| 5 | `common-law-half` | per seat: `COMMON_LAW_SEAT_TIER` — halves `a`/`b` haiku · low; meaning seat `m` `CLEAROTRON_MEANING_SEAT_MODEL` \|\| haiku · low | 2250 / 1100 | `common-law-findings.half-{a,b,m}.md` (+ per-seat grid ledgers) | fatal at fan-in; one-half transient quarantine allowed |
|
|
@@ -130,17 +130,22 @@ through anything containing `/`):
|
|
|
130
130
|
| gemini | `google/gemini-3.1-pro-preview` |
|
|
131
131
|
| gemini-flash | `google/gemini-3-flash-preview` |
|
|
132
132
|
| deepseek-v4-pro | `together/deepseek-ai/DeepSeek-V4-Pro` |
|
|
133
|
-
| azure | `
|
|
133
|
+
| azure | `azure-openai/gpt-5.4` |
|
|
134
134
|
|
|
135
135
|
The bottom four are **legacy names that no stage declares and no engine can run** — they resolve at
|
|
136
136
|
level 1 and then throw at level 2 (below). They are catalogue entries, not available tiers.
|
|
137
137
|
|
|
138
138
|
**Level 2 — the active engine** maps aliases to the CLI's own model names. On `anthropic-agent`
|
|
139
|
-
(`CLAUDE_MODEL` in `engine/anthropic-agent.mjs`):
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
(`CLAUDE_MODEL` in `engine/anthropic-agent.mjs`): `opus`, `sonnet`, `haiku` and `fable` pass through
|
|
140
|
+
as aliases, so each tier follows the vendor's newest model; to hold one still, set
|
|
141
|
+
`ANTHROPIC_DEFAULT_OPUS_MODEL` (or `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`,
|
|
142
|
+
`ANTHROPIC_DEFAULT_FABLE_MODEL`).
|
|
143
|
+
The catalog ids `anthropic/claude-opus-5` and `anthropic/claude-sonnet-5` are passed as those
|
|
144
|
+
concrete models; `anthropic/claude-haiku-4-5` goes over as the `haiku` alias, so it follows the
|
|
145
|
+
vendor the same way. A bare or dated Anthropic id (`claude-haiku-4-5-20251001`) still resolves to
|
|
146
|
+
its family — that is a naming form of a model the CLI can run, not a substitution of a different
|
|
147
|
+
one. Telemetry keeps the level-1 catalog id as the model asked for, and the attempt row records the
|
|
148
|
+
id the program reports it served.
|
|
144
149
|
|
|
145
150
|
**Anything else throws.** There is no regex fall-through to sonnet and no cross-provider
|
|
146
151
|
substitution: the `gemini`/`gemini-flash`/`deepseek-v4-pro`/`azure` mappings are gone with the
|
|
@@ -170,8 +175,8 @@ timeout shot, warm patch, backoff), the lane-wedge re-dispatch, and the rate-lim
|
|
|
170
175
|
| Setting | Values | Effect |
|
|
171
176
|
|---|---|---|
|
|
172
177
|
| `CLEAROTRON_AI` | `anthropic-agent` (default) \| `openai-agent` | Compute engine (a registered provider adapter). `anthropic-agent` = `claude -p`; `openai-agent` = `codex exec` (both off-gateway, same normalized contract). An **unregistered** value — a typo, or the gateway-runtime adapter removed in the extraction — **fails loud**: no silent wrong-provider run. Production default is unchanged. |
|
|
173
|
-
| `CLEAROTRON_AI_BILLING` | `subscription` (default) \| `api-key` | Billing mode for the selected engine. ONE variable for both, and only the LIVE engine's setting is read — it fills each engine's billing knob, and the engine that is not selected is never consulted. **`anthropic-agent`:** subscription **deletes `ANTHROPIC_API_KEY` from the child env** so `claude -p` uses OAuth subscription credentials (a present key would override them); `api-key` keeps the key — the scale setting and standing fallback. **`openai-agent`:** subscription seeds `auth.json` into the per-run `CODEX_HOME` from `CLEAROTRON_OPENAI_AUTH_FILE` (default `~/.codex/auth.json`) and strips API keys; `api-key` keeps `CODEX_API_KEY
|
|
174
|
-
| `CLEAROTRON_CLAUDE_PATH` · `CLEAROTRON_CODEX_PATH` | `claude` / `codex` on `PATH
|
|
178
|
+
| `CLEAROTRON_AI_BILLING` | `subscription` (default) \| `api-key` \| `cloud` | Billing mode for the selected engine. ONE variable for both, and only the LIVE engine's setting is read — it fills each engine's billing knob, and the engine that is not selected is never consulted. **`anthropic-agent`:** subscription **deletes `ANTHROPIC_API_KEY` from the child env** so `claude -p` uses OAuth subscription credentials (a present key would override them); `api-key` keeps the key — the scale setting and standing fallback; **`cloud`** bills Claude per use through the reader's own cloud account, named by the Claude program's own switch — `CLAUDE_CODE_USE_VERTEX`, `CLAUDE_CODE_USE_FOUNDRY` or `CLAUDE_CODE_USE_BEDROCK`, or `ANTHROPIC_BASE_URL` alone for a gateway (see the credentials table below) — and deletes `ANTHROPIC_API_KEY` as subscription does. **`openai-agent`:** subscription seeds `auth.json` into the per-run `CODEX_HOME` from `CLEAROTRON_OPENAI_AUTH_FILE` (default `~/.codex/auth.json`) and strips API keys; `api-key` keeps `CODEX_API_KEY`; `cloud` is refused. **Fail-loud, never a guess, never the subscription in its place:** `api-key` with no `ANTHROPIC_API_KEY` / `CODEX_API_KEY` throws; on `anthropic-agent`, `cloud` with two switches on, or with none and no `ANTHROPIC_BASE_URL`, throws, and so does a switch left on under `subscription` or `api-key`, because the program bills that cloud whatever this says; a value that is none of the three throws on both engines. `clearotron start` and `clearotron doctor` report each refusal against the settings the services read, naming a value that is not a billing mode by its setting and never quoting it, and the runner refuses the search when it is ordered, before anything is spent. The resolved mode is stamped on every stage telemetry row (`engine`, `authMode`, `apiBilled`, and `cloud`, null when no cloud bills), and the attempt row also carries `providerReported`, the program's own word for who served the turn. |
|
|
179
|
+
| `CLEAROTRON_CLAUDE_PATH` · `CLEAROTRON_CODEX_PATH` | `claude` / `codex` on `PATH`, then the copy Clearotron installed | The engine binary to spawn, ONE PER ENGINE: `CLEAROTRON_CLAUDE_PATH` under `anthropic-agent`, `CLEAROTRON_CODEX_PATH` under `openai-agent`. Only the live engine's is read, and a machine that runs both sets both — they were one variable until it met a machine needing two different paths. A path set here must be **absolute**: stage subprocesses run with cwd set to the run directory, so a relative path does not resolve there, and `npx clearotron doctor` refuses one. **Unset**, or set to the bare word `claude` / `codex` (which means the same), the engine uses the program on `PATH` when the machine has one, and otherwise the copy Clearotron installed in `~/.local/share/clearotron/engines`: `clearotron install` offers to put the chosen engine's program there (`@anthropic-ai/claude-code` or `@openai/codex`, this platform's build only), and `clearotron update` refreshes it. Nothing is bundled into the package. A value naming anything else is used as given and never falls back. `clearotron doctor` says which copy it found, and its version when npm installed that copy. |
|
|
175
180
|
| `CLEAROTRON_OPENAI_AUTH_FILE` | `~/.codex/auth.json` | The credentials file seeded into the per-run `CODEX_HOME` under subscription billing. Was exempted from the August 2026 rename as an `openai-agent` internal rather than an install-surface name; the owner's 2026-09-04 ruling **reversed that exemption** and renamed the whole namespace, so it carries the house prefix like everything else. One spelling, no exceptions. |
|
|
176
181
|
| `CLEAROTRON_OPENAI_MODEL_JUDGMENT` / `CLEAROTRON_OPENAI_MODEL_SWEEP` / `CLEAROTRON_OPENAI_MODEL_CHEAP` | `gpt-5.6-sol` / `gpt-5.6-terra` / `gpt-5.6-luna`. | Maps the driver's abstract `opus`/`sonnet`/`haiku` tiers onto the codex ladder, the way the anthropic engine maps onto its own (ruling 2026-09-02, superseding the single-model mapping). A tier that cannot hold its stage contract announces itself at that stage — `missing:negative-results`, `no_coverage_status_row`, `named_band_missing` in `_driver/<stage>.jsonl` — not at delivery. |
|
|
177
182
|
| ↳ why they are three, and what the old measurement still says | superseded 2026-09-02, not erased | The three defaulted to `sol` alone on a MEASUREMENT, never a placeholder: on 2026-08-11/12, with `SWEEP=gpt-5.6-terra` / `CHEAP=gpt-5.6-luna`, every codex clearance died on structural-output gates — `missing:negative-results`, `no_coverage_status_row`, `named_band_missing` — over 2 scenarios × 3 stage families, **byte-identically on retry**, so no retry budget rescued it. That measurement stands for the code and the codex CLI **of that date**, and it is why the judgment tier keeps `sol`. Three weeks of stage-contract work and several codex minor versions sit between it and the 2026-09-02 ruling that split the three. **The symptom to match against this cause is unchanged**: those same three gates, as a fail row in`_driver/<stage>.jsonl`, inside the first few dispatches of a clearance and identical on every retry — a model incapable of a contract is not flaky at it. It reads as an engine bug when the only fault is this configuration. A cheap-tier experiment still belongs in the three constants in `driver/engine/openai-agent.mjs` where a reviewer sees it, not in an untraceable env line. |
|
|
@@ -196,8 +201,8 @@ deployment may override (verify live values per deployment).
|
|
|
196
201
|
| `CLEAROTRON_REPORTS_DIR` | **none — set it** | Publish pool (web-served). **No default since: unset refuses and names the variable.** It read`/srv/trademark-archive` — a deployed server's real archive — so a forgotten export published into somebody else's clearances, and two entry points already carried hand-written defences against exactly that (`bin/onboard.mjs`, `bin/example.mjs`). Same shape as `CLEAROTRON_DATABASE` and `scripts/purge-runs.mjs`: guessing wrong is expensive, so it does not guess. Read-only surfaces (flag snapshot, status page, MCP options) degrade to "no pool" instead of throwing; anything that writes refuses. `driver/production-pool-guard.mjs` still names `/srv/trademark-archive` on purpose — that constant is a fact about where the archive is, not a default. |
|
|
197
202
|
| `CLEAROTRON_REPORTS_URL` | **none — set it** | Pool base URL used in notification links. No placeholder default: unset ⇒ the link is omitted and the runner logs `deployment config MISSING` at activation. It does not gate the queue (a missing hostname costs a link, not the deliverable), so treat that log line as the alarm. |
|
|
198
203
|
| `CLEAROTRON_ACCESS_DOMAIN` | unset (note omitted) | Identity domain named in the delivery email's access note ("sign in with a `<domain>` account"). Unset ⇒ the note is omitted rather than naming the wrong domain. |
|
|
199
|
-
| `CLEAROTRON_RUN_LOCK_DIR` | `<workspaceRoot>/
|
|
200
|
-
| `CLEAROTRON_OUTBOX_DIR` | `<workspaceRoot>/
|
|
204
|
+
| `CLEAROTRON_RUN_LOCK_DIR` | `<workspaceRoot>/clearance-run-locks` | Run-slot lock dir (turn locks under `…/turns`). |
|
|
205
|
+
| `CLEAROTRON_OUTBOX_DIR` | `<workspaceRoot>/clearance-outbox` | Delivery outbox (`<runId>.pending` wake markers). Renamed from `clearance-outbox`; when this variable is unset the old directory is still READ, so a box that never pinned it does not orphan markers it has already written. Writers use the new name only. |
|
|
201
206
|
| `CLEAROTRON_OAUTH_BRIDGE` | module-relative `providers/oauth-mcp-bridge/bridge.mjs` | Case-law MCP bridge script. (Portable since the module-relative default; set explicitly only for a bridge outside the repo tree.) |
|
|
202
207
|
| `CLEAROTRON_REGISTER_CALL_LOG` | `~/trademark/telemetry/register-calls.jsonl`, or the existing file wherever it already is | Billing-grade provider-call ledger, shared by whichever ONE register provider is wired — not a vendor artifact. Every read site derives the default from`homedir()` at call time (2026-07-19: two sites had hardcoded a literal home directory, splitting the ledger under any other service account — guarded by `test/deployment-hostnames.test.mjs`). |
|
|
203
208
|
| `CLEAROTRON_REGISTER_RECORD_LOG` | **runtime-injected per run**: `<runDir>/_driver/register-record-bodies.jsonl` | Citation-fidelity log: the BODY of every fetched official record. ** moved it INTO the run** — created with the run, unioned into the run's`_records/`, archived and purged with it. There is no retention setting and no cleanup job, because it no longer grows on the box: held globally it reached 432 MB in 61 days on production and needed a rotation timer on every install. **Do not set this by hand** — a fixed value pins every run's bodies to one file and restores the problem. A box upgraded across still holds its old global file; nothing writes or reads it, the driver names it once per process on stderr, and archiving it is one`mv`. An empty log cannot read as verified: the run's successful `record_fetch` rows in the (still global) call ledger are compared against the assembled record set, and a gap is reported as a failure. |
|
|
@@ -207,6 +212,7 @@ deployment may override (verify live values per deployment).
|
|
|
207
212
|
| `USPTO_LOCAL_DB` | **none — set it to use `uspto-local`** | The local USPTO index (`node:sqlite` + FTS5) that `bin/uspto-sync.mjs` builds and the free US register reads. Named in `.env.example`; this is the reference row. |
|
|
208
213
|
| `CLEAROTRON_JX_SUBCLASS_DB` | unset ⇒ the lane refuses by name | Path to the built similar-group database the JX subclass lane reads, produced by `providers/jx-subclass/load-public.mjs` from the committed public tables. It names WHERE the table lives; what the table says is the build's. Absence is a refusal rather than an empty answer — a clearance that silently found no similar groups is indistinguishable from one where the file was missing. |
|
|
209
214
|
| `CLEAROTRON_SUITE_TELEMETRY_DIR` | unset ⇒ the box's ledger | Redirects the provider telemetry ledger into a suite run's own temp root, so a suite never writes the box's ledger and never inherits it. Sits BELOW an explicitly-named ledger file: a test naming its own path is being deliberate, and this exists for the runs that name nothing. |
|
|
215
|
+
| `CLEAROTRON_ENGINES_DIR` | unset ⇒ `~/.local/share/clearotron/engines` | The folder `clearotron install` installs the chosen engine's program into, `clearotron update` refreshes, and the engine resolver reads as its last step after the explicit setting and `PATH`: an npm project holding `node_modules/@anthropic-ai/claude-code` or `node_modules/@openai/codex`, where an empty directory means there is none. The test suite points it at an empty directory, so a test never reaches a program the developer's own setup installed. |
|
|
210
216
|
| `FEEDBACK_GH_TOKEN` | unset ⇒ `gh`'s own auth | GitHub token for the unattended feedback minter (`scripts/feedback-mint.mjs`), for a service account with no `gh auth` login. Present ⇒ exported to `gh` as `GH_TOKEN` for that call only. A credential: it is not a placeholder value and must not be committed. |
|
|
211
217
|
| `USPTO_API_KEY` | unset ⇒ the download path refuses | API key for the USPTO bulk download path in `bin/uspto-sync.mjs`. The INGEST path needs no key and says so; only the download half reads this. A credential. |
|
|
212
218
|
|
|
@@ -297,6 +303,8 @@ because the rule is about what PRODUCT CODE reads, not about what a run reads.
|
|
|
297
303
|
| `CLEAROTRON_UPDATER_STAMP` | `_updater-identity.json` beside the update script, in the directory the updater runs from | The full path of the file in which the updater that deploys this box records which copy of itself ran. The updater writes it and deploy health reads it under this one name, so a box that moves the stamp sets it once for both. On a box with no updater unit, setting it says an updater exists elsewhere and is to be judged. Effect class `deployment`. |
|
|
298
304
|
| `CLEAROTRON_CUT_REF` | `HEAD` | Which ref the cut decision reads the version from. **Read only by the release workflow, never set on a deployment.** The jobs that ask about `main` set it to `origin/main` explicitly, because their checkout is pinned to the run's own ref and `HEAD` there is that ref rather than the branch they are deciding about. A job that asks the wrong subject gets a confident wrong answer. |
|
|
299
305
|
| `CLEAROTRON_RELEASE_WAIT_MS` | 25 minutes | How long a requested cut waits for the version pull request to merge itself before giving up. **Read only by the release workflow.** A rehearsal sets it to `0` so the wiring is exercised without holding a runner. Giving up is a quiet success by design — the scheduled run underneath catches a cut whose wait expired — so this budget failing shows up as a slow job rather than a red one. |
|
|
306
|
+
| `CLEAROTRON_CUT_REQUESTED` | unset (⇒ not dispatched) | Whether this release run was dispatched to cut. **Read only by the release workflow, never set on a deployment.** The workflow sets `true` on a dispatch that is not a rehearsal. Set, a wait that expires with no version published is a failure that names why; a push or the schedule leaves expiry a quiet success. Effect class `tuning`. |
|
|
307
|
+
| `CLEAROTRON_CUT_PR` | unset | The number of the version pull request the same run opened. **Read only by the release workflow, never set on a deployment.** A failed wait reads why that pull request did not merge from it. Unset or not a whole number, a dispatched wait says it found no pull request to wait on. Effect class `tuning`. |
|
|
300
308
|
| `ACTIONS_APPROVE_TOKEN` | unset | A GitHub token with Actions read and write, used to approve the version pull request's parked CI run so a cut does not wait for a person. **Read only by the release workflow, never set on a deployment.** The built-in token cannot approve a run — GitHub blocks self-approval — so this is a second, separate credential. Unset is the ordinary case and not an error: the script names the absent token and exits successfully, and the version run waits for a person as it did before. Actions write is broader than approval alone — it also dispatches workflows, cancels any run in the repository and deletes run logs. |
|
|
301
309
|
| `CLEAROTRON_AGENT_MCP_URL` | unset (⇒ `null`) | The API-key MCP door advertised to a signed-in person. Null until that door is deployed, and the UI keeps its honest empty state rather than inventing a URL. |
|
|
302
310
|
| `CLEAROTRON_AGENTS` | derived | Comma-separated agent ids for `scripts/purge-runs.mjs` to sweep. |
|
|
@@ -317,7 +325,14 @@ cannot be read as one list.
|
|
|
317
325
|
|
|
318
326
|
| Var | Consumer |
|
|
319
327
|
|---|---|
|
|
320
|
-
| `ANTHROPIC_API_KEY` | Engine child env in `api-key` mode only (deleted in subscription
|
|
328
|
+
| `ANTHROPIC_API_KEY` | Engine child env in `api-key` mode only (deleted in subscription and cloud modes). |
|
|
329
|
+
| `CLAUDE_CODE_OAUTH_TOKEN` | The headless subscription sign-in's token, printed by `claude setup-token` on any machine that can sign in. Read by the Claude program itself: the engine's stage process inherits it untouched in every billing mode, which is how a browserless server authenticates the subscription lane. Setup names it as the token to paste. |
|
|
330
|
+
| `CLAUDE_CODE_USE_VERTEX` / `CLAUDE_CODE_USE_FOUNDRY` / `CLAUDE_CODE_USE_BEDROCK` | **Read by the Claude program**, which sends every turn to that cloud; `1`, `true`, `yes` or `on` switches one on. Clearotron reads them to name the cloud under `CLEAROTRON_AI_BILLING=cloud` and to refuse a switch left on under `subscription` or `api-key`. Under `CLEAROTRON_AI_BILLING=cloud`, `clearotron start --background` carries the switch that is on, and every setting in the five rows below that is set, the model pins included, into `~/.env` (a switch that is set and not on stays behind); under `subscription` or `api-key` it carries none. It adds only a line `~/.env` lacks, and names any of these on which that file and its own configuration differ. A missing switch is reported by `clearotron start` and `clearotron doctor`, and refuses a search when it is ordered. Doctor and setup's proof turn carry these and the five rows below from the settings file a search reads, which is the one at the old location while an install is still configured there (`CLOUD_SETTINGS` in `driver/engine/auth.mjs`). A value in the shell wins over the file's: setup's proof turn keeps a blank one, as a run does, where doctor passes over it and takes the file's. In setup, an answer given wins over both. A run takes the whole file. |
|
|
331
|
+
| `ANTHROPIC_VERTEX_PROJECT_ID` / `CLOUD_ML_REGION` / `GOOGLE_APPLICATION_CREDENTIALS` | Vertex AI's project, region and service-account key, read by the Claude program. Without the key file it uses gcloud's sign-in. |
|
|
332
|
+
| `ANTHROPIC_FOUNDRY_RESOURCE` / `ANTHROPIC_FOUNDRY_API_KEY` | The Foundry resource and its key, read by the Claude program. Without the key it uses the machine's Azure sign-in. |
|
|
333
|
+
| `AWS_REGION` / `AWS_PROFILE` / `AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY` / `AWS_SESSION_TOKEN` | Bedrock's region, optionally the AWS profile, and the standard AWS key variables (the session token only for temporary credentials), read by the Claude program. Without the keys it uses the machine's other AWS credentials, such as an instance role. |
|
|
334
|
+
| `ANTHROPIC_BASE_URL` / `ANTHROPIC_AUTH_TOKEN` | A gateway in front of a cloud, and its token, read by the Claude program. With no cloud switch, `ANTHROPIC_BASE_URL` is the gateway form of `CLEAROTRON_AI_BILLING=cloud`; the gateway's credential must then be the token, because `ANTHROPIC_API_KEY` is deleted. |
|
|
335
|
+
| `ANTHROPIC_DEFAULT_OPUS_MODEL` / `ANTHROPIC_DEFAULT_SONNET_MODEL` / `ANTHROPIC_DEFAULT_HAIKU_MODEL` / `ANTHROPIC_DEFAULT_FABLE_MODEL` | The model each tier's alias resolves to, read by the Claude program: on Foundry, the deployment names; anywhere, a way to hold a tier still. Set the fable one to your Fable deployment's name if you set `CLEAROTRON_SYNTHESIS_MODEL=fable`; setup does not ask for it. |
|
|
321
336
|
| `OPENAI_API_KEY` | **Read only to be DELETED.** The `openai-agent` adapter strips it from the `codex exec` environment under subscription billing, so an unrelated key exported on the box cannot spoil a clean subscription bill. It is never the api-key credential for this product — that is `CODEX_API_KEY`. Listed because a reader who has one set needs to know it is removed. |
|
|
322
337
|
| `CORSEARCH_SESSION_KEY` | Register provider auth (session cookie). **Preflighted at run start — a missing credential fails fast before any model spend.** |
|
|
323
338
|
| `CLARIVATE_API_KEY` / `CLARIVATE_API_BASE` | Clarivate adapter — on the engine path: `clarivate-server.mjs` in `gather-config.mjs`'s stage-grant table, plus driver-side `recordFetch` / `countHits` / `listRecords` / `executePlan`. `CLARIVATE_API_BASE` overrides the core's `DEFAULT_BASE`. |
|
|
@@ -341,7 +356,6 @@ cannot be read as one list.
|
|
|
341
356
|
| `CLEAROTRON_SYNTHESIS_MODEL` | unset (⇒ opus) | Stage-specific synthesis model override — the live A/B toggle (e.g. `fable`). Alias must be registered in the engine map or the dispatch REFUSES by name (; it used to run sonnet silently and log the alias asked for). Read at module load; effective per fresh oneshot process. |
|
|
342
357
|
| `CLEAROTRON_MEANING_SEAT_MODEL` | unset (⇒ `haiku`) | The common-law MEANING seat's model (`COMMON_LAW_SEAT_TIER[MEANING_SEAT]`, `stages.mjs`). The default moved sonnet → haiku on measured evidence: 2 attempts / 423 s against 1 attempt / 1674 s for the same outcome. **Margin:** sufficient at every load the test suite exercises, but at its densest scenario haiku used the last rung of the retry ladder — suspect this variable first if a dense matter's meaning seat goes terminal. Set`sonnet` to roll back with no code change. The thinking budget is NOT overridable (one variable, by design). |
|
|
343
358
|
| `CLEAROTRON_STAGE_THINKING` | unset (⇒ each stage's declared tier) | Per-stage thinking-tier override, `<stage>=<tier>[,…]` (e.g. `register-digest=high`) — the A/B instrument, so a suite arm needs no code fork or redeploy between runs. Thinking only: models are deliberately not overridable here, so one arm can never move two variables. **The env override is a dev/test instrument**; a permanent change edits the tier in `stages.mjs` and ships. Unknown stage or tier **throws** — `effortFor()` falls back to `medium`, so a typo would otherwise run a stage at a tier nobody chose and every number measured against it would be wrong. Read per call, so an arm can flip mid-process. |
|
|
344
|
-
| `CLEAROTRON_AZURE_MODEL` | `azure-openai/gpt-5.4` | Target of the `azure` alias — a legacy catalogue entry no engine can run (see model tiers above). |
|
|
345
359
|
| `CLEAROTRON_DUMP_JSON` | unset | Dump each attempt's raw engine envelope to `_driver/<stage>.attempt<N>.rawjson.json`. Opt-in: any value except `0`/`off`/`false`/`no`/empty arms it. |
|
|
346
360
|
| `CLEAROTRON_DISPATCH_RECORD` | **on** | Write the verbatim message of every stage dispatch to `_driver/<stage>.attempt<N>[.repair<M>].dispatch.txt`, with `{file, sha, bytes, chars, kind}` on the attempt row. **Default ON** — `0`/`off`/`false`/`no` disarms it. Unlike `CLEAROTRON_DUMP_JSON` beside it, this is opt-OUT: the question it answers ("was the model given this?") is asked *after* the run that raised it, so a flag someone had to remember would be off on exactly the run that needed it. The files carry the company's identity verbatim and are deliberately not in the artifact table. |
|
|
347
361
|
| `CLEAROTRON_GATHER_SESSION_KEY` / `CLEAROTRON_GATHER_AGENT` / `CLEAROTRON_GATHER_SESSION_ID` | set per stage | Telemetry attribution into the provider-call ledger (set by the gather config; not operator-set). |
|
|
@@ -356,8 +370,12 @@ The settings below were deleted. Nothing in any environment set them, so each be
|
|
|
356
370
|
had always resolved to. **They are listed because an operator whose `.env` still carries one needs to
|
|
357
371
|
know it is inert** — an unread setting is indistinguishable from a setting that works.
|
|
358
372
|
|
|
373
|
+
`CLEAROTRON_AZURE_MODEL` left for a different reason, on 2026-09-15: it retargeted the `azure` alias,
|
|
374
|
+
which no stage names and no engine runs, so no run ever used its value.
|
|
375
|
+
|
|
359
376
|
| Was | Now fixed at |
|
|
360
377
|
|---|---|
|
|
378
|
+
| `CLEAROTRON_AZURE_MODEL` | `azure-openai/gpt-5.4`, the target of the `azure` alias (see model tiers above) |
|
|
361
379
|
| `CLEAROTRON_BAND_SHAPE_PART_CHARS` | 70000 characters per shape part |
|
|
362
380
|
| `CLEAROTRON_DEDUP_WINDOW_HOURS` | 24 hours, and the window can no longer be disabled |
|
|
363
381
|
| `CLEAROTRON_FETCH_MAX_CHARS` | 200000 characters per fetched page |
|
|
@@ -91,7 +91,7 @@ product doc.
|
|
|
91
91
|
| **Job spec** (per matter): id, forwarder(+email/domain), markName/marks[], classes\|goods/use, ref, profileKey, projectKey, searchLevel/recipeKey, deliveryRoute, `customer`(+Unknown), deliverableSpec, commercialFlexibility, priorUse, dupOverride, deadline, brief | T1 | agent conversation → `start_run` MCP verb (ops token) → queue; validated by `enqueue-schema.mjs` | queue → run dir | LIVE (conversational; portal `run/plan`+`run` API exists) |
|
|
92
92
|
| **Company profile** (17 keys — identity/rating/provenance: name, matchDomains, selfExclusionOwners, frameworkPath, workedExamplesPath, allowedRecipes, jxPolicy, runCaps, demoData (`true` marks the record as demo data; a real clearance is refused at the runner's admission wall); overlayable: platforms, defaultClasses, defaultJurisdictions, marketplaceDensity, delivery, riskAppetite, industry, defaultProduct) | T2 (staff) + T1 (a company's people edit its own via portal §C) | profile-service UI (staff, `/profiles/*`); the portal (own profile) | config store, git auto-commit | LIVE. Merge law: project **replaces** every overlayable key except `platforms`, which **unions** (the company's floor is never subtractable) |
|
|
93
93
|
| **Project overlays** (8 overlayable keys) | T2 | profile-service UI | config store `profiles/projects/<cust>/` | LIVE. The project form deliberately withholds `defaultProduct` and both `delivery` sub-keys — for the first the sparse save path has no `""` ⇒ clear branch, so the control could only ever be turned on; for the second the engine replaces `delivery` wholesale, so a partial overlay would silently drop the company's other sub-keys. Both are company-level controls until the server side changes |
|
|
94
|
-
| **Frameworks / skills** (risk-framework-<key>.md + .manifest.json, worked examples, SKILL.md) | T2 (senior-lawyer content) | git edits in the config store (deliberate — the prose deck is the rating authority) | config store `skills/
|
|
94
|
+
| **Frameworks / skills** (risk-framework-<key>.md + .manifest.json, worked examples, SKILL.md) | T2 (senior-lawyer content) | git edits in the config store (deliberate — the prose deck is the rating authority) | config store `skills/clearance-search/` | LIVE via git; no UI by design |
|
|
95
95
|
| **Recipes / saved searches** (base level + component toggles + emailTable/defaultDeadlineDays/standingInstructions) | T2 | recipe-service UI | `<recipesDir>/<cust>/<slug>.json`, git | **DARK** — code complete, no unit deployed. A saved search is honoured wherever it resolves (the `CLEAROTRON_RECIPES_MODE` door was retired 2026-07-27) |
|
|
96
96
|
| **Run curation** (archive folds, republish, index regen) | T2 | `pool-admin.mjs` CLI only | pool `archive-tags.json` | LIVE, CLI-only |
|
|
97
97
|
| **Allowlist** (`{version, grants:[{email, customer}]}`) | T2 | git + PR on the `CLIENT_ACCESS_MAP` file | see §2 row 4 | LIVE, file-only; surfaced read-only at `admin.access` |
|
|
@@ -159,13 +159,19 @@ structural, or dev seam); [dev] = dev/test seam, never set in prod.
|
|
|
159
159
|
### 5.2 Engine & models — T3
|
|
160
160
|
|
|
161
161
|
`CLEAROTRON_AI` (anthropic-agent | openai-agent; default anthropic-agent), `CLEAROTRON_AI_BILLING`
|
|
162
|
-
(subscription|api-key
|
|
162
|
+
(subscription|api-key|cloud; cloud is Claude only), `CLEAROTRON_CODEX_PATH`,
|
|
163
163
|
`CLEAROTRON_OPENAI_AUTH_FILE`, `CLEAROTRON_OPENAI_MODEL_JUDGMENT` / `CLEAROTRON_OPENAI_MODEL_SWEEP` /
|
|
164
164
|
`CLEAROTRON_OPENAI_MODEL_CHEAP` (all gpt-5.6-sol),
|
|
165
|
-
`CLEAROTRON_CLAUDE_PATH` (claude),
|
|
165
|
+
`CLEAROTRON_CLAUDE_PATH` (claude on PATH, then the copy Clearotron installed),
|
|
166
166
|
`CLEAROTRON_SYNTHESIS_MODEL` (opus), `CLEAROTRON_KNOCKOUT_MODEL` (opus),
|
|
167
167
|
`CLEAROTRON_KNOCKOUT_PRESET` (pro-search), `CLEAROTRON_MAX_BUDGET_USD` (unset).
|
|
168
168
|
|
|
169
|
+
The Claude program's own cloud settings — `CLAUDE_CODE_USE_FOUNDRY`, `CLAUDE_CODE_USE_VERTEX` and
|
|
170
|
+
`CLAUDE_CODE_USE_BEDROCK`, each cloud's own settings, the gateway pair and the model pins — are the
|
|
171
|
+
vendor's names, not this tier's; the configuration reference's credentials table lists them. Written out
|
|
172
|
+
rather than as one wildcard: a guard reads these documents for the names they govern, and a trailing `*`
|
|
173
|
+
matches nothing it can check, so a name hidden behind one reads as governed while being invisible.
|
|
174
|
+
|
|
169
175
|
### 5.3 Concurrency, admission, retries, walls — T3 (walls are load-bearing; change deliberately)
|
|
170
176
|
|
|
171
177
|
`CLEAROTRON_MAX_CONCURRENT_RUNS` (2), `CLEAROTRON_GATHER_CONCURRENCY` (7), `CLEAROTRON_CARD_CONCURRENCY` (8),
|
|
@@ -472,6 +478,12 @@ It must be **asked for**: a real deployment behind its upstream still reports be
|
|
|
472
478
|
blank value is not a declaration, and the doctor names this variable in its output when it obeys it. Set
|
|
473
479
|
it in CI and nowhere else — on a deployed box it silences the one check that notices the box is stale.
|
|
474
480
|
|
|
481
|
+
Engines folder: `CLEAROTRON_ENGINES_DIR` — where setup installs the chosen engine's program, where
|
|
482
|
+
`clearotron update` refreshes it, and where the engine resolver in `driver/driver.config.mjs` looks for it
|
|
483
|
+
after the explicit setting and `PATH`. Unset on a deployment, where it is
|
|
484
|
+
`~/.local/share/clearotron/engines`. The suite runner points it at an empty directory, so a test never
|
|
485
|
+
reaches a program the developer's own setup installed.
|
|
486
|
+
|
|
475
487
|
> **Write every name out. No `*`, no `{A,B}`, no `/_SUFFIX`.** The enforcement test matches a name on
|
|
476
488
|
> a word boundary, so shorthand documents a variable to a human and hides it from the guard. This row
|
|
477
489
|
> is where that was found: `*_AUTH_DISABLED`, `*_DEV` and `CLEAROTRON_REPLAY_SNAPSHOT`/`_ROOTS` left five
|
|
@@ -483,11 +495,9 @@ it in CI and nowhere else — on a deployed box it silences the one check that n
|
|
|
483
495
|
> see `providers/oauth-mcp-bridge/README.md`) were listed there for years and read by nothing, which
|
|
484
496
|
> made a reader configure a variable and get no behaviour.
|
|
485
497
|
>
|
|
486
|
-
>
|
|
487
|
-
>
|
|
488
|
-
>
|
|
489
|
-
> defect as inviting someone to set a variable this product reads — the rule above is about the
|
|
490
|
-
> second.
|
|
498
|
+
> Both are gone. The four `AZURE_OPENAI_*` names left `.env.example` on 2026-09-15: on a page that
|
|
499
|
+
> explains paying for Claude through an Azure account, four Azure variables nothing in Clearotron reads
|
|
500
|
+
> looked like that setup's settings, and they are not.
|
|
491
501
|
|
|
492
502
|
`portal-ui/` has **zero** env config (no `VITE_*`, no `import.meta.env`) — the SPA talks to its
|
|
493
503
|
origin; all portal config lives server-side in portal-service.
|
|
@@ -517,6 +527,11 @@ up is a quiet success by design and the scheduled run underneath catches what it
|
|
|
517
527
|
is wrong shows up as a slow job rather than a red one — which is why it is written down rather than left
|
|
518
528
|
to be inferred from a timeout.
|
|
519
529
|
|
|
530
|
+
`CLEAROTRON_CUT_REQUESTED` and `CLEAROTRON_CUT_PR` — whether this run was dispatched to cut, and the
|
|
531
|
+
version pull request it opened. The workflow sets both; nothing on a deployment reads either. Together they
|
|
532
|
+
separate a run that set nothing in motion, whose expired wait stays a quiet success, from a dispatched cut
|
|
533
|
+
that published nothing, which fails and names why the pull request did not merge.
|
|
534
|
+
|
|
520
535
|
## 6. Drift patterns — values that are mirrored by design
|
|
521
536
|
|
|
522
537
|
Wherever one value must exist in more than one place, name every copy and rotate them in one
|
|
@@ -16,7 +16,7 @@ rating is refused by pattern guards and by stage-level firewalls.
|
|
|
16
16
|
## The bundle
|
|
17
17
|
|
|
18
18
|
A company = one git-owned JSON file `profiles/<key>.json`, plus optionally: a prose context pack
|
|
19
|
-
(`<key>.context.md`), a per-company rating framework pair in `skills/
|
|
19
|
+
(`<key>.context.md`), a per-company rating framework pair in `skills/clearance-search/`
|
|
20
20
|
(`risk-framework-<key>.md` + its `.manifest.json`, plus worked examples), and per-engagement
|
|
21
21
|
project overlays under `profiles/projects/<key>/`.
|
|
22
22
|
|
|
@@ -182,7 +182,7 @@ this source tree.
|
|
|
182
182
|
`matchDomains` for forwarder-based fallback. A profile with empty `matchDomains` is reachable by
|
|
183
183
|
profileKey only.
|
|
184
184
|
- **Per-company framework** (optional; git-only, legal-team work — the UI cannot set it): add the
|
|
185
|
-
deck + manifest + worked examples under `skills/
|
|
185
|
+
deck + manifest + worked examples under `skills/clearance-search/`, set the two paths in the profile
|
|
186
186
|
JSON via git. Until then the company rates under the Generic default.
|
|
187
187
|
- **Per-engagement overlay** (optional): `profiles/projects/<key>/<slug>.json` with the 8
|
|
188
188
|
overlayable keys; intake stamps `job.projectKey` to select it.
|
|
@@ -112,7 +112,7 @@ and the environment file holding the secrets.
|
|
|
112
112
|
`XDG_RUNTIME_DIR` must be set for `systemctl --user` to work from cron.
|
|
113
113
|
- **Pin the agent id before upgrading an install made before 0.2.2.** The default agent id changed
|
|
114
114
|
from `clawdi` to `localagent`, and that id is a path segment: runs live under
|
|
115
|
-
`<workspaceRoot>/workspace-<agent>/studio/
|
|
115
|
+
`<workspaceRoot>/workspace-<agent>/studio/clearance-search/`. An install that never set one starts
|
|
116
116
|
reading an empty workspace, and empty reads as "no runs" rather than as an error. Set **both**
|
|
117
117
|
variables in the environment file — the gather servers read their own:
|
|
118
118
|
|
|
@@ -129,7 +129,7 @@ and the environment file holding the secrets.
|
|
|
129
129
|
|
|
130
130
|
| Surface | What it tells you |
|
|
131
131
|
|---|---|
|
|
132
|
-
| `systemctl --user status prelim-driver.{path,timer,service}
|
|
132
|
+
| `systemctl --user status prelim-driver.{path,timer,service} clearance-outbox.{path,timer,service} profile-service` | Trigger health; remember "activating = draining" |
|
|
133
133
|
| `journalctl --user -u prelim-driver.service -f` | Runner notes (stderr): claims, dedup parks, preflight failures, orphan reclaims |
|
|
134
134
|
| Run dir `status.json` / `run.jsonl` | Per-run state + the append-only decision trace; grep keys: `axes`, `profile`, `verdict`, `escalation`, `postponed`, `delivered`, `profile-mismatch` |
|
|
135
135
|
| `_driver/<stage>.jsonl` | Per-attempt telemetry: status, fail token, kill signals, wall, tokens |
|
|
@@ -173,7 +173,7 @@ survive until terminal state.
|
|
|
173
173
|
| Run parked with `*.tainted-N` artifacts | Timeout-taint convergence loop ([07 §3](07-quality-and-audit.md#3--completed-coverage-honesty-in-code)) | Let it converge; repeated signature goes terminal honestly |
|
|
174
174
|
| Chat failure ping never arrived for a failed run | By design: nothing here sends. The failure packet IS the notice, and an integrator consumes it | Check `_driver/failure.json` + the outbox lane (the guaranteed notice) |
|
|
175
175
|
| Deploy refused because a run is in flight | The in-flight guard above | Wait for the run. A force-restart of the gateway is not the answer — that is for a wedged gateway |
|
|
176
|
-
| Everything quiet after a deploy abort | Should not happen (EXIT trap restarts triggers) — if it does: `systemctl --user start prelim-driver.{path,timer}
|
|
176
|
+
| Everything quiet after a deploy abort | Should not happen (EXIT trap restarts triggers) — if it does: `systemctl --user start prelim-driver.{path,timer} clearance-outbox.{path,timer}` and file it |
|
|
177
177
|
|
|
178
178
|
## Selftest — retired
|
|
179
179
|
|
|
@@ -144,7 +144,7 @@ The reasoning layer dictates what it needs; a thin adapter supplies it. Concrete
|
|
|
144
144
|
preflighted at run start. Add the id to `KNOWN_REGISTER_PROVIDERS` too, or the error message that
|
|
145
145
|
tells an operator what to set will omit it. Selection is `CLEAROTRON_DATABASE` in every
|
|
146
146
|
environment, production included; there is no committed default to flip.
|
|
147
|
-
4. **Skill doc**: `skills/
|
|
147
|
+
4. **Skill doc**: `skills/clearance-register/providers/<provider>.md` — the provider-specific craft
|
|
148
148
|
the register stages read.
|
|
149
149
|
5. **The empirical verification checklist** — the real work is not code volume: operator
|
|
150
150
|
vocabulary and composition semantics, pagination behaviour to `has_more:false`, status-enum
|
|
@@ -157,8 +157,8 @@ The reasoning layer dictates what it needs; a thin adapter supplies it. Concrete
|
|
|
157
157
|
|
|
158
158
|
The methodology lives in the driver's `skills/` tree — 12 top-level directories, nearly all of it
|
|
159
159
|
Markdown carrying **prose only**, no executable code. The machine-parsed
|
|
160
|
-
exceptions are the four framework manifests (`skills/
|
|
161
|
-
further non-Markdown file rides along, `skills/
|
|
160
|
+
exceptions are the four framework manifests (`skills/clearance-search/risk-framework*.manifest.json`); one
|
|
161
|
+
further non-Markdown file rides along, `skills/clearance-search/templates/search-request-form.html`, named
|
|
162
162
|
only in `publish/index.mjs`.
|
|
163
163
|
The engine reads skills **in place from the git-deployed driver tree**: `absolutizeSkillRefs`
|
|
164
164
|
rewrites `skills/…` tokens to absolute paths and grants `--add-dir`. Code comments saying skills
|
|
@@ -168,8 +168,8 @@ What to know before editing:
|
|
|
168
168
|
|
|
169
169
|
- **Which stage reads what** is dictated solely by each stage message's `reads([...])` in
|
|
170
170
|
`stages.mjs` — read it there rather than trusting this summary. Broadly: matter-frame,
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
clearance-variants (+ `transliteration-scripts.md`), blind-frame, clearance-common-law (every grid seat),
|
|
172
|
+
clearance-register spine + `unit.md` *xor* `digest.md` (mode-routed — a unit must never read
|
|
173
173
|
digest doctrine and vice versa) + the active provider's `providers/<name>.md`,
|
|
174
174
|
placement-inquiry, `phase2-execution.md` §skeptic (that one section only), frame-diff,
|
|
175
175
|
synthesis (synthesis-rules + per-profile framework + worked examples + conditionally
|
|
@@ -186,7 +186,7 @@ What to know before editing:
|
|
|
186
186
|
- Several skill files are **legacy and not stage-read** (email/Excel templates, the formatting
|
|
187
187
|
reference). Verify a file appears in some stage's `reads([...])` before treating its claims as
|
|
188
188
|
live; where a legacy file and the code disagree, the code and `stages.mjs` win.
|
|
189
|
-
- The pharma module (`skills/
|
|
189
|
+
- The pharma module (`skills/clearance-search/field-doctrine-pharma.md`, loaded by a code predicate on
|
|
190
190
|
pharma-shaped matters) ships behind a named legal reviewer's sign-off — doctrine edits in
|
|
191
191
|
regulated verticals go through the practitioner, not just review.
|
|
192
192
|
|
package/docs/configuration.md
CHANGED
|
@@ -95,7 +95,7 @@ A framework is two files that travel together:
|
|
|
95
95
|
| `risk-framework.manifest.json` | A small sidecar carrying the framework's **vocabulary**: band labels, their severity order, the entity label, provenance. |
|
|
96
96
|
|
|
97
97
|
The Generic default ships at
|
|
98
|
-
[`driver/skills/
|
|
98
|
+
[`driver/skills/clearance-search/risk-framework.md`](../driver/skills/clearance-search/risk-framework.md)
|
|
99
99
|
with bands Very High · High · Moderate · Manageable.
|
|
100
100
|
|
|
101
101
|
**Replace it with your own.** Write your rubric as prose, add a manifest naming your bands,
|
|
@@ -174,14 +174,14 @@ prints what they declare, and where the deck and the manifest disagree it names
|
|
|
174
174
|
the deck did not do. It creates nothing, rates nothing and contacts nobody.
|
|
175
175
|
|
|
176
176
|
```
|
|
177
|
-
clearotron framework skills/
|
|
177
|
+
clearotron framework skills/clearance-search/your-framework.md
|
|
178
178
|
```
|
|
179
179
|
|
|
180
180
|
```
|
|
181
|
-
Framework: skills/
|
|
182
|
-
deck /srv/clearotron-config/skills/
|
|
181
|
+
Framework: skills/clearance-search/your-framework.md
|
|
182
|
+
deck /srv/clearotron-config/skills/clearance-search/your-framework.md
|
|
183
183
|
read from the configured store
|
|
184
|
-
manifest /srv/clearotron-config/skills/
|
|
184
|
+
manifest /srv/clearotron-config/skills/clearance-search/your-framework.manifest.json
|
|
185
185
|
read from the configured store
|
|
186
186
|
|
|
187
187
|
It declares itself "Your firm's clearance risk framework" (your-firm-2026), a bands-shaped
|
|
@@ -32,7 +32,7 @@ disclosure are both acceptable; degrading in silence is not. Which one applies i
|
|
|
32
32
|
| Register | refuses at preflight, by name | An unconfigured register that answered "no conflicts found" is the most dangerous output this system can produce |
|
|
33
33
|
| Case law (Full country search) | runs without the bridge, and the run's ledger records that the sweep did not dispatch | Access is free but auth breaks in practice. `driver/verify.mjs` plus `case-law-citations.json` stop any report claiming "no adverse case law" when nothing was read — the disclosure is the guard |
|
|
34
34
|
| Native-script lane | degrades and says so | Reached only on CJK territories |
|
|
35
|
-
| Research sweep (open web / marketplaces) | **on a Knockout search: degrades and says so.** On the three clearance searches: **refuses at preflight, by name** | acceptance 6, 2026-08-20. A knockout carries`registerProbe: true`, so its register half is a whole product without the sweep — refusing the screen threw away an answer the deployment could give. The three clearances carry `commonLawGrid: true` and their unregistered-use half is not severable, so nothing there degrades quietly into a clearance with a missing half. -6, 2026-08-20: that clearance failure MOVED to preflight — it used to happen at the common-law stage, after every register stage had been paid for. Same outcome, no spend.`preflightResearchCredential` gates on the component, never on the pipeline: `
|
|
35
|
+
| Research sweep (open web / marketplaces) | **on a Knockout search: degrades and says so.** On the three clearance searches: **refuses at preflight, by name** | acceptance 6, 2026-08-20. A knockout carries`registerProbe: true`, so its register half is a whole product without the sweep — refusing the screen threw away an answer the deployment could give. The three clearances carry `commonLawGrid: true` and their unregistered-use half is not severable, so nothing there degrades quietly into a clearance with a missing half. -6, 2026-08-20: that clearance failure MOVED to preflight — it used to happen at the common-law stage, after every register stage had been paid for. Same outcome, no spend.`preflightResearchCredential` gates on the component, never on the pipeline: `clearance-register-only` is a clearance carrying `commonLawGrid: false` and is not refused |
|
|
36
36
|
|
|
37
37
|
## Consequences
|
|
38
38
|
|
package/docs/writing-standard.md
CHANGED
|
@@ -83,3 +83,7 @@ their problem.
|
|
|
83
83
|
`enforcement.md` lists the classes a CI check refuses in a diff. Tone is not one of them, and no word
|
|
84
84
|
list will ever catch it: a reviewer reads the rendered page as someone who has never seen this product,
|
|
85
85
|
against `writing-rules.md`, and asks what they would think each sentence means.
|
|
86
|
+
|
|
87
|
+
A stylesheet that is inlined into a delivered document is delivered with it, comments included — the
|
|
88
|
+
reader receives the file, so a class name in a CSS comment is engineering vocabulary on a page they can
|
|
89
|
+
open, exactly as it would be in prose.
|
package/driver/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,129 @@
|
|
|
1
1
|
# clearotron-driver
|
|
2
2
|
|
|
3
|
+
## 0.3.2-beta.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 09f51e0: Fixed: A country named in words now reaches its register, and naming one in words and by code no longer counts as two places.
|
|
8
|
+
- 09f51e0: Fixed: A search that failed can be picked up again with its codename alone. The command the engine prints when a search stops no longer names a job file that is no longer on the machine.
|
|
9
|
+
- 09f51e0: For operators: Resuming a failed search by its codename now works without the original job file, and refuses by name when the run's record is incomplete.
|
|
10
|
+
- 09f51e0: Fixed: A knockout report no longer scrolls sideways on a phone when a finding cites a long web address.
|
|
11
|
+
- 09f51e0: Fixed: a knockout report's Registers counted row reads "186 registers, on" the register service, without a list of territories folded under it.
|
|
12
|
+
- 09f51e0: New: A knockout search now delivers the engine's own assessment and findings alongside the report, as a full clearance already did.
|
|
13
|
+
- 09f51e0: Fixed: A report no longer says the local-language investigation did not run when the run's own record shows it did.
|
|
14
|
+
- 09f51e0: Fixed: On a phone, the rights-holder panel now shows a scrollbar when its rows run past the right edge.
|
|
15
|
+
|
|
16
|
+
Fixed: "Web and marketplace names" lists names again. Readings of what a mark means are carried by the connotation section, where they were already stated in full.
|
|
17
|
+
- 09f51e0: Fixed: when a register reports only that it holds more than a figure, the knockout counts table and workbook show that figure, not "not available".
|
|
18
|
+
- 09f51e0: Fixed: Preliminary searches on one register now report the registered marks the assessment found, instead of a register section left empty.
|
|
19
|
+
|
|
20
|
+
Fixed: A search whose register assessment cannot be recorded now stops with an error instead of delivering a report silent on the register.
|
|
21
|
+
- 09f51e0: Fixed: A report's section links now sit in the header and stay on screen while you read, instead of scrolling away.
|
|
22
|
+
- 09f51e0: Fixed: A report no longer reads "Case-law research could not be completed for ." when the search covered a register that does not publish per-country records.
|
|
23
|
+
- 09f51e0: New: A report states whether the local-language investigation ran at the depth configured for the matter.
|
|
24
|
+
- 09f51e0: Fixed: On a knockout report, the risk band marker no longer overlaps the words above it.
|
|
25
|
+
- 09f51e0: Fixed: A running search now reports the stage it is on, not the last one finished, so progress no longer appears to go backwards.
|
|
26
|
+
- 09f51e0: Fixed: A knockout report no longer states, for each name, whether that name should proceed to a full clearance search. It reports what the screen found.
|
|
27
|
+
- 09f51e0: New: A report table that continues past the right edge now shows a scrollbar, so it is clear there is more to see.
|
|
28
|
+
- 09f51e0: Fixed: When a register search did not finish, the verdict's condition no longer names the engine's internal label for the unfinished part.
|
|
29
|
+
- 09f51e0: New: a worldwide search names the register service that searches it, on the New clearance form and on the report's coverage line.
|
|
30
|
+
- 09f51e0: Fixed: Worldwide searches on a register that keeps no record archive now show how many register records were read and in which countries.
|
|
31
|
+
- 09f51e0: Fixed: Searches of a named company's own trademark portfolio now run on every register. On one register they were refused before the search was sent, and the report told the reader those holdings could not be reached.
|
|
32
|
+
- 09f51e0: Fixed: After upgrading, existing companies, past clearances and queued searches stay visible, with no folder to rename and no company file to edit.
|
|
33
|
+
|
|
34
|
+
Fixed: A company file that cannot be read no longer empties the company list; that company is named with the reason instead.
|
|
35
|
+
- 09f51e0: Fixed: each finding's "Ask AI about this finding" button in a report now opens Ask AI, with that finding's number in the question.
|
|
36
|
+
- 09f51e0: New: Searches no longer look up ordinary English words one letter away from the mark that sound different, such as CODE beside CORE.
|
|
37
|
+
- 09f51e0: Before you upgrade: reports left waiting in the delivery folder's old name are found and sent again. Nothing needs moving, and none is sent twice.
|
|
38
|
+
- 09f51e0: Fixed: The forward-decisions section of a clearance report is headed "What happens next", as the approved design heads it.
|
|
39
|
+
- 09f51e0: New: A clearance report carries a section strip along the top, so a reader can jump to the findings, the next steps or what was searched.
|
|
40
|
+
- 09f51e0: New: The new clearance form now offers every country a supported register can search, not a fixed list of 37.
|
|
41
|
+
- 09f51e0: Fixed: The new clearance form no longer repeats in paragraphs what each product row and each place already say.
|
|
42
|
+
- 09f51e0: Fixed: on a phone, the list of clearances made the whole page slide sideways instead of scrolling the table. The table now scrolls on its own and the page stays put.
|
|
43
|
+
- 09f51e0: Fixed: on a narrow window the buttons at the end of each clearance row pushed the page sideways, and every date broke onto two lines. The buttons now fit the space they are given and the date stays on one line.
|
|
44
|
+
- 09f51e0: Before you upgrade: the folder a finished report waits in while it is sent has been renamed. If you have never set that folder yourself, nothing needs moving. Reports already waiting in the old folder are still sent.
|
|
45
|
+
- 09f51e0: Fixed: Knockout reports no longer print a caveat line under the register counts table.
|
|
46
|
+
- 09f51e0: New: A knockout report carries a section strip along the top, so a reader can jump to the conflicts, the filings or the next steps.
|
|
47
|
+
- 09f51e0: Fixed: A mark whose official record could not be retrieved is no longer listed as a condition on the verdict. The report still names it where the search's coverage is set out.
|
|
48
|
+
- 09f51e0: Fixed: Installs inside WSL now show a second setup command, for an assistant running inside WSL as well as one on Windows.
|
|
49
|
+
- 09f51e0: Fixed: a clearance report's "What was searched" section shows register totals, counts per country and a link to the audit workbook, as designed.
|
|
50
|
+
|
|
51
|
+
## 0.3.2-beta.8
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- d194d41: Fixed: A knockout search now covers the territories the form is showing you, rather than searching the whole world instead of them.
|
|
56
|
+
|
|
57
|
+
Fixed: A new clearance recommends and preselects a search when the form is showing your company's own territories. It previously offered none and said no search was picked, beside a summary naming those same countries.
|
|
58
|
+
- d194d41: Fixed: A report opened on a phone fits the screen instead of scrolling sideways.
|
|
59
|
+
- d194d41: Fixed: A knockout search that is running says it usually takes 5 to 10 minutes. It previously showed 1.5 to 2.5 hours, which is how long a full clearance takes.
|
|
60
|
+
- d194d41: Fixed: A running search says which step it is on, such as "Register sweeps", rather than "Register sweeps · 3 of 9". How many steps a search has varies with what it needs to do, so the number did not mean what it looked like.
|
|
61
|
+
- d194d41: New: Each search in your list now says which of the four searches it was.
|
|
62
|
+
- d194d41: Fixed: A new clearance now offers only the territories your register can search. Before, it offered countries your register cannot reach, and choosing one stopped the search from starting.
|
|
63
|
+
|
|
64
|
+
Fixed: You can now remove one of your company's default territories on the clearance form. Before, if your register could not search one of them, nothing on that screen let you take it off and carry on.
|
|
65
|
+
- d194d41: Fixed: A report now gives the specific reason each name was set aside. Before, every such name carried the same general sentence, and the reason the search actually recorded for it was not shown.
|
|
66
|
+
- d194d41: Fixed: A search naming a territory your trademark register does not cover is now refused before it starts, and says which territory to remove. Before, the search ran and that territory was reported as not searched at the end.
|
|
67
|
+
- d194d41: New: Pay for Claude through your own Google Cloud, Microsoft Azure or Amazon Bedrock account with `CLEAROTRON_AI_BILLING=cloud`. Tested on Microsoft Azure; Google Cloud and Amazon Bedrock use the Claude program's own settings.
|
|
68
|
+
|
|
69
|
+
New: Each run records which cloud account paid for it, and `clearotron doctor` names the cloud account it charges.
|
|
70
|
+
|
|
71
|
+
New: Setup asks how Claude is paid for, and for a cloud account asks which cloud and checks it with one turn.
|
|
72
|
+
|
|
73
|
+
New: `clearotron start`, when no billing is set, names a cloud account for Claude beside a subscription and an API key.
|
|
74
|
+
|
|
75
|
+
New: `clearotron start --background` carries the cloud account's settings to the background services.
|
|
76
|
+
|
|
77
|
+
New: `clearotron doctor` says how the background services pay, and warns when your own configuration sets a different way of paying.
|
|
78
|
+
|
|
79
|
+
New: Global config's Engine row names the cloud account that pays, and turns red, naming the setting to change, when searches would be refused.
|
|
80
|
+
|
|
81
|
+
Fixed: An install that pays with an API key and runs as background services now hands the services its key. Before, every search stopped after it was ordered.
|
|
82
|
+
|
|
83
|
+
Fixed: A subscription install signed in with a long-lived token from `claude setup-token` now hands that token to its background services.
|
|
84
|
+
|
|
85
|
+
Fixed: `clearotron start` now reports a billing setting that would stop every search, such as an API key that is not set. `clearotron doctor` also checks the settings the background services read.
|
|
86
|
+
|
|
87
|
+
For operators: `clearotron start --background` names each setting on which `~/.env` and Clearotron's settings disagree, such as a rotated key, without printing values. It adds only settings `~/.env` lacks and never replaces one, so change a setting in both files.
|
|
88
|
+
|
|
89
|
+
Before you upgrade: A billing setting Clearotron does not recognise now stops a search before it starts, where it used to bill the subscription. Run `clearotron doctor` after upgrading.
|
|
90
|
+
|
|
91
|
+
Before you upgrade: On a Claude install, a cloud's own switch left on, such as `CLAUDE_CODE_USE_FOUNDRY`, now stops a search unless `CLEAROTRON_AI_BILLING=cloud`.
|
|
92
|
+
- d194d41: Fixed: Connect your AI now sits last in the sidebar, under Company settings. It used to sit second, directly under Home.
|
|
93
|
+
- d194d41: Fixed: `clearotron doctor` and `clearotron start --background` look for Claude Code or the Codex CLI on the PATH the background services use. They used to say every search would be refused on a machine whose searches found the program and ran.
|
|
94
|
+
- d194d41: Fixed: When a background service's unit and its settings file set the same value, `clearotron doctor` and `clearotron connect` take the file's, as systemd does.
|
|
95
|
+
|
|
96
|
+
Fixed: `clearotron doctor` and `clearotron connect` read a doubled percent sign (`%%`) in a background service's unit as one, as systemd does.
|
|
97
|
+
- d194d41: Fixed: When the background services found the reasoning program and this machine cannot, `clearotron doctor` now suggests installing it here with setup. It used to suggest installing it where the services could already see it.
|
|
98
|
+
|
|
99
|
+
New: If a restart does not help the background services find the reasoning program, `clearotron doctor` says how to point them at it.
|
|
100
|
+
- d194d41: New: `clearotron doctor --probe-engine` tries Claude with the cloud settings in Clearotron's settings file, the Amazon keys included, as a search does.
|
|
101
|
+
- d194d41: Fixed: A search on a short or common word could return so many unrelated marks that one query filled most of the results. Any single query now contributes at most a fixed number of records. Anything beyond that is reported as a crowd, with its full count, rather than left out silently.
|
|
102
|
+
- d194d41: Fixed: A report made before this summer, reopened today, states its conditions in the same words as a new one.
|
|
103
|
+
- d194d41: New: The sign-in command from setup, `clearotron doctor` and a starting search names the copy setup installed, which is not on the PATH.
|
|
104
|
+
- d194d41: New: Setup's test turn tries Claude with the cloud settings in Clearotron's settings file, the Amazon keys included, as a search does.
|
|
105
|
+
- 6c7c7f1: For operators: the offline test suite runs in four parallel shards, so a change is checked in about a quarter of the time it used to take.
|
|
106
|
+
- d194d41: Fixed: A search covering a very large number of register records could finish with no findings document at all. Those records are now accounted for in fixed batches instead of all at once. An interrupted attempt resumes from the records still outstanding, rather than starting again.
|
|
107
|
+
- d194d41: New: A knockout report has an Export button, so anyone who opens the file can save it as a PDF.
|
|
108
|
+
- d194d41: New: Claude steps run on the newest Opus and Sonnet as soon as they ship, unless a setting holds a tier at one model.
|
|
109
|
+
- d194d41: New: Setup offers to install the reasoning program your engine uses. Before it asks, it says how much space the program takes and how to remove it.
|
|
110
|
+
|
|
111
|
+
New: Setup asks which AI should run your searches, Claude or Codex, and says what it found on this computer.
|
|
112
|
+
|
|
113
|
+
New: Claude Code or the Codex CLI already on the machine is still used first. `clearotron update` keeps the installed one current, and `clearotron doctor` says which copy runs, and its version when the program reports one.
|
|
114
|
+
|
|
115
|
+
New: Outside Windows, in demo mode, `clearotron doctor` points to setup to install the reasoning program.
|
|
116
|
+
|
|
117
|
+
New: When the reasoning program cannot be found, Global config's Engine row and the search screen name the setup command that installs it.
|
|
118
|
+
- d194d41: New: Each report names the models that did the work, including those behind the Chinese, Japanese and Korean language steps.
|
|
119
|
+
|
|
120
|
+
New: Through a cloud account, a report names the Claude model or its tier, never your organisation's own name for its deployment.
|
|
121
|
+
- d194d41: New: When a cloud account refuses the credentials, setup, `clearotron doctor` and a starting search name that cloud and the settings to check.
|
|
122
|
+
|
|
123
|
+
Fixed: When an API key is refused, setup, `clearotron doctor` and a starting search name the key to check, rather than asking for a sign-in.
|
|
124
|
+
- d194d41: Fixed: When you have used all of today's searches, the screen names the person to ask for another. On an installation with no name set it read "ask your the operator contact to run this one for you".
|
|
125
|
+
- d194d41: Fixed: A report's verdict now lists every condition it is conditional on. It used to name the first and close with "(and 2 more)". The rest sat in a separate list below it, so a reader could see that conditions existed without reading them.
|
|
126
|
+
|
|
3
127
|
## 0.3.2-beta.7
|
|
4
128
|
|
|
5
129
|
### Patch Changes
|
package/driver/README.md
CHANGED
|
@@ -89,7 +89,7 @@ kind of thing a module is before you open it.
|
|
|
89
89
|
- The `anthropic-agent` engine shells `claude -p` per stage (stream-json, blocking to the final
|
|
90
90
|
result); warm retries `--resume` the same session, fresh retries start clean — see
|
|
91
91
|
`engine/CONTRACT.md §3` for the model-tier map and `§8` for runtime caveats.
|
|
92
|
-
- Stage identity keys are `
|
|
92
|
+
- Stage identity keys are `clearance-<slug>-<codename>-<stage>`; telemetry ledgers record every attempt.
|
|
93
93
|
- A stage's output is judged by **file truth** (the validator on the written artifact), never by the
|
|
94
94
|
engine's own success claim.
|
|
95
95
|
- Retries never re-dispatch the same second an attempt failed: every retry waits
|
|
@@ -114,8 +114,8 @@ conformance → paid run).
|
|
|
114
114
|
|
|
115
115
|
## Single path
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
clearance-search runs **only** via this driver — every intake path lands a job JSON in a queue and the
|
|
118
118
|
driver does the rest. There is no legacy spawn path and no enable/dormant flag. (The old
|
|
119
119
|
LLM-orchestrator `sessions_yield` WAIT/PROCEED/SUPPRESS machinery was stripped from
|
|
120
|
-
`skills/
|
|
120
|
+
`skills/clearance-search/phase2-execution.md` — only the historical removal note at its head remains;
|
|
121
121
|
the file is live methodology the stages read.)
|
package/driver/band-size.mjs
CHANGED
|
@@ -64,3 +64,62 @@ export function bandSizeForStage(stage, paths, io) {
|
|
|
64
64
|
if (!BAND_READING_STAGES.has(stage)) return undefined;
|
|
65
65
|
return bandSizeAtDispatch(paths, io);
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
// ── A STAGE'S TIME LIMIT IS DERIVED FROM WHAT IT IS HANDED, NEVER A FIXED CONSTANT ────────────────
|
|
69
|
+
//
|
|
70
|
+
// THE DEFECT. The two stages that read the register band carried per-stage constants — numbers chosen
|
|
71
|
+
// once, against a band nobody recorded beside them. On a dense matter both died at their wall having
|
|
72
|
+
// written nothing: the placement attempt at 2,765s against a 2,700s budget, the digest at 2,470s
|
|
73
|
+
// against 2,400s. Both sat exactly AT the ceiling, so what ended them was the budget expiring rather
|
|
74
|
+
// than any guard firing; the stall guards had half an hour of quiet to fire in and could not, because
|
|
75
|
+
// tokens were still moving. Nothing malfunctioned. The number was simply sized for a different matter.
|
|
76
|
+
//
|
|
77
|
+
// THE TWO MEASUREMENTS THESE CONSTANTS ARE SET AGAINST, named here because a budget without the band
|
|
78
|
+
// it was measured at is the thing being fixed:
|
|
79
|
+
// · 2026-09-16, the dense matter: an 8 MB merged band; the placement attempt needed more than 2,765s
|
|
80
|
+
// and was killed at 2,700s. The derived limit at that size must exceed what the attempt took.
|
|
81
|
+
// · Every ordinary matter before it: a band at or under REFERENCE_MB, where 2,700s was sufficient and
|
|
82
|
+
// is what those runs are verified at. At or below that size the derivation must return the base
|
|
83
|
+
// unchanged, so no existing run's budget moves and no archived verdict is re-decided.
|
|
84
|
+
export const LIMIT_REFERENCE_MB = 2;
|
|
85
|
+
export const LIMIT_GROWTH_PER_MB = 0.03;
|
|
86
|
+
// The band size above which a stage is refused at dispatch rather than started. A limit past this is
|
|
87
|
+
// not a budget, it is a prediction that the stage will die: the 177 MB band measured on an earlier
|
|
88
|
+
// round would derive past an hour and a half, and starting it spends that hour and a half to arrive
|
|
89
|
+
// where the refusal already is. Refusing NAMES the size, which is the finding; being killed does not.
|
|
90
|
+
export const LIMIT_CEILING_SEC = 5400;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The time limit for this dispatch, derived from the band it is handed. PURE.
|
|
94
|
+
*
|
|
95
|
+
* ABOVE THE REFERENCE SIZE ONLY. A band at or under the reference returns the stage's own base
|
|
96
|
+
* unchanged — that is what every run before this is verified at, and a derivation that moved those
|
|
97
|
+
* numbers would re-decide archived verdicts to fix a defect they never had.
|
|
98
|
+
*
|
|
99
|
+
* AN UNMEASURABLE BAND RETURNS THE BASE, and says so through `basis`. The alternatives are worse in
|
|
100
|
+
* both directions: guessing a bigger number spends a client's money on an input nobody measured, and
|
|
101
|
+
* guessing a smaller one kills a stage for a band that might have been ordinary. The base is what the
|
|
102
|
+
* run would have used anyway, so an absent measurement changes nothing rather than changing something
|
|
103
|
+
* arbitrary.
|
|
104
|
+
*/
|
|
105
|
+
export function derivedLimitSec(baseSec, bandSize) {
|
|
106
|
+
const base = Number.isFinite(baseSec) && baseSec > 0 ? baseSec : null;
|
|
107
|
+
if (base === null) return { sec: null, inputBytes: null, basis: "no base for this stage" };
|
|
108
|
+
const bytes = Number.isFinite(bandSize?.bytes) ? bandSize.bytes : null;
|
|
109
|
+
if (bytes === null) return { sec: base, inputBytes: null, basis: bandSize?.absent ? `band unmeasured: ${bandSize.absent}` : "no band for this stage" };
|
|
110
|
+
const mb = bytes / (1024 * 1024);
|
|
111
|
+
const over = Math.max(0, mb - LIMIT_REFERENCE_MB);
|
|
112
|
+
const sec = Math.round(base * (1 + LIMIT_GROWTH_PER_MB * over));
|
|
113
|
+
return { sec, inputBytes: bytes, basis: over > 0 ? `derived from ${mb.toFixed(1)} MB` : `at or under the ${LIMIT_REFERENCE_MB} MB reference` };
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Is this derived limit past the point where starting the stage only buys a later kill? PURE. */
|
|
117
|
+
export function limitExceedsCeiling(sec) {
|
|
118
|
+
return Number.isFinite(sec) && sec > LIMIT_CEILING_SEC;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** The refusal a dispatch past the ceiling carries — it NAMES the size, which is the finding. PURE. */
|
|
122
|
+
export function ceilingRefusal(stage, derived) {
|
|
123
|
+
const mb = Number.isFinite(derived?.inputBytes) ? (derived.inputBytes / (1024 * 1024)).toFixed(1) : "an unmeasured";
|
|
124
|
+
return `stage_input_over_ceiling:${stage} was handed a ${mb} MB band, which derives a ${derived?.sec}s limit against a ${LIMIT_CEILING_SEC}s ceiling — the stage is refused at dispatch rather than started, because a limit past the ceiling is a prediction that it will be killed and starting it spends the whole budget to arrive at the same place. The band size is the finding: a band this size is the defect, not the budget`;
|
|
125
|
+
}
|