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
package/INSTALL.md
CHANGED
|
@@ -15,7 +15,7 @@ after §5 is needed to produce a report.
|
|
|
15
15
|
|
|
16
16
|
| | Sections | For |
|
|
17
17
|
|---|---|---|
|
|
18
|
-
| **Installing** | §1 Prerequisites · §2 Install · §3 Configuration · §3a Free register route · §4 Config store · §5 Run a clearance | Anyone |
|
|
18
|
+
| **Installing** | §1 Prerequisites · §2 Install · §3 Configuration · §3a Free register route · §3b Paying through a cloud account · §4 Config store · §5 Run a clearance | Anyone |
|
|
19
19
|
| **Operating** | §6 `npx clearotron start` · §7 The MCP server · §8 Access control and isolation | Running it as a service for other people |
|
|
20
20
|
| **Reference** | §9 What an integrator supplies · §10 Licence | — |
|
|
21
21
|
|
|
@@ -46,9 +46,10 @@ run is [mcp-server/CONNECT.md](mcp-server/CONNECT.md), and why something is the
|
|
|
46
46
|
`ERR_UNKNOWN_BUILTIN_MODULE`, saying nothing about Node. `package.json` declares the floor, the
|
|
47
47
|
install refuses below it before writing anything, and `nvm use` picks the pin up.
|
|
48
48
|
- **macOS, Linux, or native Windows for the demo; WSL2 for a clearance.** `npx clearotron
|
|
49
|
-
demo` runs anywhere Node does, native Windows included. A real clearance does not: the engine
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
demo` runs anywhere Node does, native Windows included. A real clearance does not: the engine spawns
|
|
50
|
+
each stage with POSIX path and process semantics, so on native Windows a clearance is refused before it
|
|
51
|
+
starts, even with the program installed. Native Windows clearances are planned for a later
|
|
52
|
+
release. Until then, on Windows,
|
|
52
53
|
`wsl --install -d Ubuntu`, then `wsl -d Ubuntu`, and work through this page
|
|
53
54
|
from **inside** that distribution. Name it: plain `wsl` can open a minimal image with no apt, no
|
|
54
55
|
curl and no bash, and everything below assumes Ubuntu. A fresh Ubuntu has no Node at all, and
|
|
@@ -59,9 +60,7 @@ run is [mcp-server/CONNECT.md](mcp-server/CONNECT.md), and why something is the
|
|
|
59
60
|
sudo apt update && sudo apt install -y curl
|
|
60
61
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
|
|
61
62
|
. "$HOME/.nvm/nvm.sh" && nvm install 22 # 22.13 or newer, per the floor above
|
|
62
|
-
|
|
63
|
-
claude # once, interactively, to sign in
|
|
64
|
-
npx clearotron install
|
|
63
|
+
npx clearotron install # offers to install the reasoning program if the machine has none, and shows you how to sign it in
|
|
65
64
|
```
|
|
66
65
|
|
|
67
66
|
Run from `npx`, the install first installs Clearotron under `~/.local`, as `npm install -g --prefix
|
|
@@ -75,33 +74,30 @@ run is [mcp-server/CONNECT.md](mcp-server/CONNECT.md), and why something is the
|
|
|
75
74
|
|
|
76
75
|
A *hosted* deployment needs Linux for one further thing, the systemd outbox trigger —
|
|
77
76
|
[driver/systemd/README.md](driver/systemd/README.md).
|
|
78
|
-
- **
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
whether one is spawned.
|
|
77
|
+
- **Setup installs the reasoning program.** Clearotron runs each step of a clearance as a short,
|
|
78
|
+
unattended session of Claude Code or the Codex CLI. Setup installs the one your engine uses, for this
|
|
79
|
+
machine, when you say yes. A copy already on the machine is used instead and keeps updating itself.
|
|
82
80
|
|
|
83
|
-
**
|
|
84
|
-
|
|
81
|
+
**Sign in, or give it a key.** Sign in once with a Claude subscription (Pro, Max or Team), paste an
|
|
82
|
+
Anthropic API key, or point it at the Google, Microsoft or Amazon cloud account that already bills you
|
|
83
|
+
for AI. A key or a cloud account skips the sign-in. Hosting Clearotron for other organisations requires
|
|
84
|
+
a key or a cloud account.
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
| `openai-agent` | `codex` | `npm install -g @openai/codex` |
|
|
86
|
+
**Models follow the vendor.** Each step asks for a tier, opus, sonnet or haiku, and the vendor answers
|
|
87
|
+
with its newest model of that tier. Every report names the models that ran. To hold a tier at one
|
|
88
|
+
version, set the vendor's pin, `ANTHROPIC_DEFAULT_OPUS_MODEL` and siblings.
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
`PATH` advice. Run it by your own hand: this product will not execute a piped remote script for you,
|
|
94
|
-
because a command it runs on your box has to be one you can read in full before you answer. There is
|
|
95
|
-
no vendor shell installer for `codex`; on a root-only prefix, move npm's prefix instead.
|
|
90
|
+
`CLEAROTRON_AI` picks the program for the whole install. A key or a cloud account is not a substitute
|
|
91
|
+
for the program: it decides what the program is handed, not whether it runs.
|
|
96
92
|
|
|
97
|
-
|
|
93
|
+
To sign in:
|
|
98
94
|
|
|
99
|
-
| `CLEAROTRON_AI` |
|
|
95
|
+
| `CLEAROTRON_AI` | Program | Signed-in laptop | A machine you cannot complete a sign-in on |
|
|
100
96
|
|---|---|---|---|
|
|
101
|
-
| `anthropic-agent` (default) | `claude` | `claude`
|
|
102
|
-
| `openai-agent` | `codex` | `codex login` | `
|
|
97
|
+
| `anthropic-agent` (default) | `claude` | run the program setup installed (doctor prints its path), or `claude` if the machine has its own, once — rides your subscription | `claude setup-token` once anywhere you *can* log in, then put it on the server as `CLAUDE_CODE_OAUTH_TOKEN` |
|
|
98
|
+
| `openai-agent` | `codex` | `login` on the program setup installed (doctor prints its path), or `codex login` if the machine has its own | `login --device-auth` on the same program — prints a code you complete on another device |
|
|
103
99
|
|
|
104
|
-
**The right-hand column is about where you can complete a sign-in, not about whether the
|
|
100
|
+
**The right-hand column is about where you can complete a sign-in, not about whether the machine has a
|
|
105
101
|
screen.** A server you can reach a browser from takes the left-hand route perfectly well; a laptop
|
|
106
102
|
locked out of the vendor's login page takes the right-hand one. Reading it as "server ⇒ setup-token"
|
|
107
103
|
sends you down the fallback for no reason.
|
|
@@ -113,7 +109,8 @@ run is [mcp-server/CONNECT.md](mcp-server/CONNECT.md), and why something is the
|
|
|
113
109
|
spread of the driver's — and that inheritance is the whole mechanism.
|
|
114
110
|
|
|
115
111
|
Both stay on the subscription. Reach for `CLEAROTRON_AI_BILLING=api-key` (plus `ANTHROPIC_API_KEY` or
|
|
116
|
-
`CODEX_API_KEY`) only when metered billing is what you want
|
|
112
|
+
`CODEX_API_KEY`) only when metered billing is what you want, or for `CLEAROTRON_AI_BILLING=cloud` to
|
|
113
|
+
pay for Claude through your own Google Cloud, Microsoft Azure or Amazon Bedrock account (§3b).
|
|
117
114
|
|
|
118
115
|
**Installed is not usable.** `npx clearotron install` proves the engine can complete a turn before it
|
|
119
116
|
writes anything, and `npx clearotron doctor --probe-engine` re-proves it on a configured box. Both
|
|
@@ -156,7 +153,7 @@ passed, and nothing has driven a live register through it.
|
|
|
156
153
|
|
|
157
154
|
**Upgrading an install made before 0.2.2: pin the agent id first.** The default agent id changed from
|
|
158
155
|
`clawdi` to `localagent`, and that id is part of a path — your runs live under
|
|
159
|
-
`<workspaceRoot>/workspace-<agent>/studio/
|
|
156
|
+
`<workspaceRoot>/workspace-<agent>/studio/clearance-search/`. If you never set an agent id, the upgraded
|
|
160
157
|
install reads a workspace that does not exist yet, and an empty workspace looks like an account with no
|
|
161
158
|
runs rather than like a misconfiguration. Set **both** names in your environment file before starting
|
|
162
159
|
it, because the register-search servers read their own:
|
|
@@ -172,7 +169,7 @@ The rest of this section is about the two ways a package reaches you, which is a
|
|
|
172
169
|
which version it is.
|
|
173
170
|
|
|
174
171
|
There are two routes in, and they are not variations on one another. **If you were sent a `.tgz` file,
|
|
175
|
-
you want the second one** — the first assumes access to the repository, which
|
|
172
|
+
you want the second one** — the first assumes access to the repository, which someone installing the package does not have.
|
|
176
173
|
|
|
177
174
|
### From the repository
|
|
178
175
|
|
|
@@ -192,7 +189,7 @@ npm test # offline, fixture-backed suites — no network, no gatew
|
|
|
192
189
|
|
|
193
190
|
### From a packaged tarball
|
|
194
191
|
|
|
195
|
-
This is the shape
|
|
192
|
+
This is the shape someone installing it receives, and it is the one `scripts/verify-publishable.mjs` drives on every
|
|
196
193
|
CI run — it packs, installs into a tree with no checkout, and runs the verbs: **an empty project with the
|
|
197
194
|
tarball as a dependency.** Not an unpacked archive; there is no step here that untars anything.
|
|
198
195
|
|
|
@@ -354,7 +351,9 @@ clearotron-client-mcp.service
|
|
|
354
351
|
|
|
355
352
|
**And `~/.env`, which only a background install writes.** A service inherits nothing from the terminal
|
|
356
353
|
that installed it, so `clearotron start --background` writes everything those services need into `~/.env`,
|
|
357
|
-
mode 600 — your register credential, your research key and the engine's settings among it.
|
|
354
|
+
mode 600 — your register credential, your research key and the engine's settings among it. A later start
|
|
355
|
+
adds only what the file lacks and never replaces a line, and names any setting on which the file and your
|
|
356
|
+
configuration differ; to change one, change it in both. It is not the
|
|
358
357
|
same file as `~/.config/clearotron/.env`, which configures the product when you run it yourself. Delete
|
|
359
358
|
both, or you leave a file of credentials in your home for services that no longer exist.
|
|
360
359
|
|
|
@@ -417,20 +416,21 @@ Only the integrator-set knobs are shown — copy what you need:
|
|
|
417
416
|
```sh
|
|
418
417
|
# ── Reasoning engine (LLM) ─────────────────────────────────────────────
|
|
419
418
|
CLEAROTRON_AI=anthropic-agent # headless `claude -p`
|
|
420
|
-
CLEAROTRON_CLAUDE_PATH=
|
|
421
|
-
CLEAROTRON_AI_BILLING=subscription # `subscription` (OAuth, default) | `api-key`
|
|
419
|
+
# CLEAROTRON_CLAUDE_PATH= # only to force one copy (default: `claude` on PATH, then the copy setup installed)
|
|
420
|
+
CLEAROTRON_AI_BILLING=subscription # `subscription` (OAuth, default) | `api-key` | `cloud` (§3b)
|
|
422
421
|
# ANTHROPIC_API_KEY=sk-ant-... # only when CLEAROTRON_AI_BILLING=api-key
|
|
422
|
+
# ANTHROPIC_DEFAULT_OPUS_MODEL=... # optional: hold the opus tier at one model (and _SONNET_, _HAIKU_, _FABLE_)
|
|
423
423
|
# CLEAROTRON_AI=openai-agent # …or the second adapter: headless `codex exec`
|
|
424
|
-
# CLEAROTRON_CODEX_PATH=
|
|
424
|
+
# CLEAROTRON_CODEX_PATH= # only to force one copy (default: `codex` on PATH, then the copy setup installed)
|
|
425
425
|
|
|
426
426
|
# ── Where this install keeps its data ──────────────────────────────────
|
|
427
427
|
# REQUIRED. CLEAROTRON_REPORTS_DIR has NO default: unset, a run refuses and names it.
|
|
428
428
|
# It is the one path the engine will not guess, because guessing wrong means
|
|
429
|
-
# publishing a
|
|
429
|
+
# publishing a company's report into somebody else's archive.
|
|
430
430
|
CLEAROTRON_REPORTS_DIR=/home/you/trademark/pool # published reports + audits (outside the repo)
|
|
431
431
|
CLEAROTRON_WORK_DIR=/home/you/trademark/workspace # run directories and queues
|
|
432
432
|
CLEAROTRON_REPORTS_URL=https://reports.example.com # base URL the pool is served at (for report links)
|
|
433
|
-
CLEAROTRON_CUSTOMERS_DIR=/etc/trademark/profiles # your private
|
|
433
|
+
CLEAROTRON_CUSTOMERS_DIR=/etc/trademark/profiles # your private company-config store (default: bundled profiles/)
|
|
434
434
|
|
|
435
435
|
# ── Run it under your own name ─────────────────────────────────────────
|
|
436
436
|
# Optional, and read at start-up. Unset, a report says only what the software is —
|
|
@@ -519,6 +519,69 @@ credentials are in, and the US office rides as a deferred coverage row until the
|
|
|
519
519
|
staleness thresholds that decide when an index is too old to trust are in
|
|
520
520
|
[providers/uspto-local/README.md](providers/uspto-local/README.md).
|
|
521
521
|
|
|
522
|
+
## 3b. Paying for Claude through your cloud account
|
|
523
|
+
|
|
524
|
+
Set `CLEAROTRON_AI_BILLING=cloud` and the lines for your cloud below. The Claude program still has to be
|
|
525
|
+
installed (§1): it is what talks to the cloud. Clearotron checks that exactly one cloud is switched on,
|
|
526
|
+
or that a gateway is named (below). Otherwise every search is refused before anything is spent, and
|
|
527
|
+
`clearotron start` and `clearotron doctor` name what to set. Every run records which cloud account
|
|
528
|
+
paid for it. Codex does not run through a cloud account.
|
|
529
|
+
|
|
530
|
+
`clearotron start --background` carries these settings into `~/.env`, which the background services
|
|
531
|
+
read. It only adds a line `~/.env` lacks and never replaces one, so to change cloud later, change the
|
|
532
|
+
switch in both `~/.env` and Clearotron's settings file, then restart; `start` names any setting on which
|
|
533
|
+
the two differ.
|
|
534
|
+
|
|
535
|
+
Tested on Microsoft Azure. For Google Cloud and Amazon Bedrock these are the Claude program's own
|
|
536
|
+
settings, as its documentation gives them.
|
|
537
|
+
|
|
538
|
+
**Microsoft Azure (Foundry)**
|
|
539
|
+
|
|
540
|
+
```sh
|
|
541
|
+
CLEAROTRON_AI_BILLING=cloud
|
|
542
|
+
CLAUDE_CODE_USE_FOUNDRY=1
|
|
543
|
+
ANTHROPIC_FOUNDRY_RESOURCE=<your Foundry resource name>
|
|
544
|
+
ANTHROPIC_FOUNDRY_API_KEY=<its key> # or leave unset to use an Azure sign-in already on the machine
|
|
545
|
+
ANTHROPIC_DEFAULT_OPUS_MODEL=<your Opus deployment name>
|
|
546
|
+
ANTHROPIC_DEFAULT_SONNET_MODEL=<your Sonnet deployment name>
|
|
547
|
+
ANTHROPIC_DEFAULT_HAIKU_MODEL=<your Haiku deployment name>
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
Foundry calls each model by the name of your deployment, so set the three to your deployment names. A tier
|
|
551
|
+
whose deployment does not exist is refused by Azure, and the run stops and names it. Set
|
|
552
|
+
`ANTHROPIC_DEFAULT_FABLE_MODEL` to your Fable deployment's name if you set `CLEAROTRON_SYNTHESIS_MODEL=fable`.
|
|
553
|
+
|
|
554
|
+
**Google Cloud (Vertex AI)**
|
|
555
|
+
|
|
556
|
+
```sh
|
|
557
|
+
CLEAROTRON_AI_BILLING=cloud
|
|
558
|
+
CLAUDE_CODE_USE_VERTEX=1
|
|
559
|
+
ANTHROPIC_VERTEX_PROJECT_ID=<your project id>
|
|
560
|
+
CLOUD_ML_REGION=global # or the region your Claude quota is in
|
|
561
|
+
GOOGLE_APPLICATION_CREDENTIALS=<path to a service-account key> # or a gcloud sign-in already on the machine
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
**Amazon Bedrock (not yet tested)**
|
|
565
|
+
|
|
566
|
+
```sh
|
|
567
|
+
CLEAROTRON_AI_BILLING=cloud
|
|
568
|
+
CLAUDE_CODE_USE_BEDROCK=1
|
|
569
|
+
AWS_REGION=<the region your Claude models are enabled in>
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
Bedrock uses whatever AWS credentials the machine already has: a profile, an instance role, or the
|
|
573
|
+
standard AWS key variables, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (with `AWS_SESSION_TOKEN` for
|
|
574
|
+
temporary credentials).
|
|
575
|
+
|
|
576
|
+
On Google Cloud and Bedrock, set `ANTHROPIC_DEFAULT_OPUS_MODEL`, `_SONNET_` and `_HAIKU_` to the model
|
|
577
|
+
ids your account offers if the program does not pick up the newest ones by itself, and `_FABLE_` to your Fable
|
|
578
|
+
model's id if you set `CLEAROTRON_SYNTHESIS_MODEL=fable`.
|
|
579
|
+
|
|
580
|
+
**Through a gateway.** If your organisation puts its own proxy in front of a cloud, set
|
|
581
|
+
`CLEAROTRON_AI_BILLING=cloud`, `ANTHROPIC_BASE_URL` to the gateway and `ANTHROPIC_AUTH_TOKEN` to its
|
|
582
|
+
token. Under `cloud`, Clearotron removes `ANTHROPIC_API_KEY` from every step, so the gateway's credential
|
|
583
|
+
has to be the token.
|
|
584
|
+
|
|
522
585
|
## 4. The config-store model
|
|
523
586
|
|
|
524
587
|
### The four things, and what contains what
|
|
@@ -528,8 +591,8 @@ points on it.
|
|
|
528
591
|
|
|
529
592
|
| What it is | What the product calls it | Where it lives | What creates it |
|
|
530
593
|
|---|---|---|---|
|
|
531
|
-
| A group of people and the companies they clear for — a firm, a brand team, one
|
|
532
|
-
| A company you do clearances for | **company** (`account` in `grants.json` and on the wire; the CLI calls it **brand owner**) | a bundle in the
|
|
594
|
+
| A group of people and the companies they clear for — a firm, a brand team, one company on a hosted install | **organisation** (`tenant` in `grants.json`) | a key under `tenants` in `grants.json`, with its `name` | setup creates the first; after that, a key you add to `grants.json` |
|
|
595
|
+
| A company you do clearances for | **company** (`account` in `grants.json` and on the wire; the CLI calls it **brand owner**) | a bundle in the company store, keyed by an account key, and listed under exactly one organisation | the portal's `+ New company`, or `npx clearotron brandowner add <key>` |
|
|
533
596
|
| One engagement under that company — its classes, jurisdictions, platforms | **project** | inside that company's bundle | `npx clearotron project add` |
|
|
534
597
|
| Someone who may see some of it | **person** | `grants.json`: their access under each organisation's `users`, their two switches under `people` | the portal's People page, or `npx clearotron grant add` |
|
|
535
598
|
|
|
@@ -555,23 +618,23 @@ and the command line keep `tenant` and `account`, and the CLI verb stays `brando
|
|
|
555
618
|
break every file and script written against them.
|
|
556
619
|
|
|
557
620
|
|
|
558
|
-
A clearance run is shaped by a **
|
|
559
|
-
marketplaces, default classes/jurisdictions, own
|
|
621
|
+
A clearance run is shaped by a **company profile** — a small JSON file that declares that company's
|
|
622
|
+
marketplaces, default classes/jurisdictions, its own marks to exclude, delivery style, and (optionally)
|
|
560
623
|
a bespoke risk framework. A job resolves to a profile by the **forwarder's email domain**; if nothing
|
|
561
624
|
matches, the neutral Generic default applies.
|
|
562
625
|
|
|
563
626
|
- **Bundled with the package** (`driver/profiles/`): `generic.json` (the Generic default) and
|
|
564
|
-
`demo-brand-owner.json`, the
|
|
627
|
+
`demo-brand-owner.json`, the company the demo runs as, so you can run and read the machinery
|
|
565
628
|
immediately. `driver/profiles/README.md` documents every field. (A clone of the repository carries
|
|
566
629
|
three more, marked `testFixture` in their own files: the test suite reads them, no install offers
|
|
567
630
|
them, and they are excluded from the published package as well.)
|
|
568
|
-
- **Your real
|
|
569
|
-
config store and the engine loads *those*
|
|
570
|
-
the code carries no
|
|
631
|
+
- **Your real companies live outside the repo.** Point `CLEAROTRON_CUSTOMERS_DIR` at your own private
|
|
632
|
+
config store and the engine loads *those* companies instead. **Same engine, different config path** —
|
|
633
|
+
the code carries no company identities.
|
|
571
634
|
|
|
572
635
|
Two things go with it, and both are refusals rather than preferences:
|
|
573
636
|
|
|
574
|
-
- **`PROFILE_REPO_ROOT` moves too.** The
|
|
637
|
+
- **`PROFILE_REPO_ROOT` moves too.** The company directory has to sit inside the repository that
|
|
575
638
|
variable names, because editing a profile is a commit. Point one somewhere new and leave the other
|
|
576
639
|
behind and the portal and the profile service both refuse to start, naming both variables.
|
|
577
640
|
- **That repository needs a `user.name` and a `user.email` of its own.** Saves are committed under
|
|
@@ -588,20 +651,20 @@ matches, the neutral Generic default applies.
|
|
|
588
651
|
`clearotron start` does this for the store it creates. A store you make yourself does not get it,
|
|
589
652
|
and the symptom is the first save failing at a commit rather than anything about profiles.
|
|
590
653
|
- **Run data is external too.** Published reports, audits, and per-run state go to the archive pool at
|
|
591
|
-
`CLEAROTRON_REPORTS_DIR`. Nothing
|
|
654
|
+
`CLEAROTRON_REPORTS_DIR`. Nothing company-specific is committed to the repository.
|
|
592
655
|
|
|
593
656
|
The profile set and the archive pool are the two things a deployment supplies; the engine is otherwise
|
|
594
657
|
self-contained.
|
|
595
658
|
|
|
596
|
-
### What a
|
|
659
|
+
### What a company store holds besides the profile
|
|
597
660
|
|
|
598
|
-
A
|
|
661
|
+
A company is not only its `<key>.json`. Two more things sit beside it, both optional, both shipped as
|
|
599
662
|
working examples in `driver/profiles/`:
|
|
600
663
|
|
|
601
|
-
- **A context pack** — `<key>.context.md`, a sibling of the profile. Free prose about the
|
|
602
|
-
the engine attaches to the profile it loads. One ships beside a bundled demo
|
|
664
|
+
- **A context pack** — `<key>.context.md`, a sibling of the profile. Free prose about the company that
|
|
665
|
+
the engine attaches to the profile it loads. One ships beside a bundled demo company.
|
|
603
666
|
- **Project overlays** — `projects/<customer-key>/<slug>.json`. A project is one engagement under a
|
|
604
|
-
|
|
667
|
+
company: a launch screening, a flagship clearance, a regional push. Each may carry its own
|
|
605
668
|
`<slug>.context.md` beside it. `projects/demo-brand-owner/japan-and-korea-app-launch.json` is the
|
|
606
669
|
shipped example.
|
|
607
670
|
|
|
@@ -609,35 +672,35 @@ working examples in `driver/profiles/`:
|
|
|
609
672
|
|
|
610
673
|
A project overlays eight fields and is refused if it sets any of the other nine:
|
|
611
674
|
|
|
612
|
-
| A project may set | Only the
|
|
675
|
+
| A project may set | Only the company may set |
|
|
613
676
|
|---|---|
|
|
614
677
|
| `platforms` · `defaultClasses` · `defaultJurisdictions` · `marketplaceDensity` · `delivery` · `riskAppetite` · `industry` · `defaultProduct` | `name` · `matchDomains` · `selfExclusionOwners` · `frameworkPath` · `workedExamplesPath` · `allowedRecipes` · `jxPolicy` · `runCaps` · `demoData` |
|
|
615
678
|
|
|
616
|
-
The split is identity and rating authority: a project selects machinery, never who the
|
|
617
|
-
what standard their risk is rated against. Setting a
|
|
679
|
+
The split is identity and rating authority: a project selects machinery, never who the company is or
|
|
680
|
+
what standard their risk is rated against. Setting a company-only key in an overlay fails validation by
|
|
618
681
|
name rather than being ignored.
|
|
619
682
|
|
|
620
|
-
**A project replaces the fields it states — except `platforms`, which is added to the
|
|
621
|
-
|
|
683
|
+
**A project replaces the fields it states — except `platforms`, which is added to the company's.** The
|
|
684
|
+
company's marketplaces are company-mandated: the company asked for those to be swept, and an engagement
|
|
622
685
|
may add to that instruction but never revoke it. Every other overlaid field replaces outright, so an
|
|
623
686
|
overlay stating `defaultClasses` narrows to exactly what it states.
|
|
624
687
|
|
|
625
688
|
### Your store replaces the shipped one — it does not layer on it
|
|
626
689
|
|
|
627
690
|
**Setting `CLEAROTRON_CUSTOMERS_DIR` replaces the whole tree, projects included.** The engine reads your
|
|
628
|
-
store's
|
|
629
|
-
roster holds its own
|
|
691
|
+
store's companies and your store's `projects/`, and none of ours. That is deliberate — a deployment's
|
|
692
|
+
roster holds its own companies and nothing of ours — but it is silent, and it is the one thing here that
|
|
630
693
|
becomes an incident on a real deployment rather than a bundled one:
|
|
631
694
|
|
|
632
695
|
- A job naming a project your store does not carry is **not refused**. The `projectKey` is dropped and
|
|
633
|
-
the run proceeds on the
|
|
696
|
+
the run proceeds on the company's own defaults — its classes, its marketplaces, its product — and the
|
|
634
697
|
report records no project. Nothing warns, so this reads as a clean run of the wrong scope.
|
|
635
698
|
- `generic.json` — the universal fallback — is the ONE file that does fall through: if your store does
|
|
636
699
|
not supply one, the bundled copy is used by name, so an empty store still resolves every unprofiled
|
|
637
700
|
job. (An earlier version of this line said "nothing else fills in"; since the layering change that is
|
|
638
701
|
true of everything EXCEPT generic, and the difference is exactly a fresh install working or 500ing.)
|
|
639
702
|
|
|
640
|
-
Copy or author the
|
|
703
|
+
Copy or author the companies, context packs and project overlays you want; assume you inherit none.
|
|
641
704
|
|
|
642
705
|
## 5. Run a headless clearance report
|
|
643
706
|
|
|
@@ -647,7 +710,7 @@ Copy or author the customers, context packs and project overlays you want; assum
|
|
|
647
710
|
executable on `PATH` that is signed out passes every other check and fails at the first stage.
|
|
648
711
|
|
|
649
712
|
2. Write a **job file**. The required fields are an `id`, a `forwarder` handle, at least one mark
|
|
650
|
-
**name**, and either classes or a goods description — a
|
|
713
|
+
**name**, and either classes or a goods description — a company profile can supply the last one.
|
|
651
714
|
`msgId` is optional: it threads the reply into the original email, and a job without one is warned,
|
|
652
715
|
not refused. A minimal neutral example:
|
|
653
716
|
|
|
@@ -703,7 +766,7 @@ Copy or author the customers, context packs and project overlays you want; assum
|
|
|
703
766
|
[How long a run takes](#how-long-a-run-takes) below gives the provenance of each figure.
|
|
704
767
|
|
|
705
768
|
This run sends the matter off the machine — the mark, its classes, the goods wording, and the
|
|
706
|
-
|
|
769
|
+
company's context reach a reasoning provider and Perplexity, and the mark and its variants reach your
|
|
707
770
|
register. Before the first live matter, read
|
|
708
771
|
[what leaves the machine](docs/architecture/09-security-and-data.md#what-leaves-the-machine).
|
|
709
772
|
|
|
@@ -856,7 +919,7 @@ nobody else at its domain; enrolling anyone else is that same file, exactly as o
|
|
|
856
919
|
**No authentication is switched off to make this work, and none can be.** Both doors prove who the
|
|
857
920
|
caller is — the portal by passphrase and a signed session cookie, the engine door by a mandatory
|
|
858
921
|
access key that `npx clearotron start` mints in memory at every start and never writes down. The key is scoped to
|
|
859
|
-
two verbs and capped to the
|
|
922
|
+
two verbs and capped to the companies this install knows about. The `*_AUTH_DISABLED` switches
|
|
860
923
|
elsewhere in this repository are for something else and are written into the child environment as `0`.
|
|
861
924
|
|
|
862
925
|
### Signing in, and putting your own provider in front
|
|
@@ -936,12 +999,12 @@ front of it is still addressed to the old one.
|
|
|
936
999
|
|
|
937
1000
|
Two lines on a fresh install look worse than they are:
|
|
938
1001
|
|
|
939
|
-
- *"skills overlay unset —
|
|
1002
|
+
- *"skills overlay unset — company risk frameworks will resolve to this repo's demo fixtures."* On a
|
|
940
1003
|
demo install they **are** the demo fixtures, and the warning is correct to fire: it exists so that a
|
|
941
|
-
real deployment never shows a synthetic framework as a
|
|
1004
|
+
real deployment never shows a synthetic framework as a company's own. It goes quiet once
|
|
942
1005
|
`CLEAROTRON_CUSTOMERS_DIR` and `CLEAROTRON_INSTRUCTIONS_DIR` point at your own config store (§4).
|
|
943
1006
|
- *"saved searches ON — store=…"* names a directory under `~/trademark/`, not your repository. Editing a
|
|
944
|
-
**
|
|
1007
|
+
**company profile**, however, still commits into this checkout until `PROFILE_REPO_ROOT` names a
|
|
945
1008
|
config store of your own. Point it at one before you edit a profile you intend to keep.
|
|
946
1009
|
|
|
947
1010
|
`driver/dev-portal.mjs` is **not** this. It is a loopback pool browser for people working on the engine,
|
|
@@ -1026,7 +1089,7 @@ So an install behind `ssh -L` or an editor's port forward serves shape 1 perfect
|
|
|
1026
1089
|
shape 2 at all, however the reader reaches the portal. `npx clearotron connect` says so plainly rather
|
|
1027
1090
|
than printing an address that will be rejected.
|
|
1028
1091
|
|
|
1029
|
-
**The address is set once, at install.** `npx clearotron install` asks for it — *"the address
|
|
1092
|
+
**The address is set once, at install.** `npx clearotron install` asks for it — *"the address companies'
|
|
1030
1093
|
assistants reach this install at"* — and writes `CLEAROTRON_CLIENT_MCP_URL`, which is the single value the
|
|
1031
1094
|
Use-your-AI page, a report's Ask-your-AI control and `doctor` all read. Leave it empty on a local
|
|
1032
1095
|
install: every one of those surfaces then shows its honest empty state, which is correct for a machine
|
|
@@ -1092,7 +1155,7 @@ going to look.
|
|
|
1092
1155
|
|
|
1093
1156
|
**Then confirm the address from outside, and use the one that answered.** Never the one you remember —
|
|
1094
1157
|
hostnames that were provisioned once and never used are exactly the ones that do not resolve, and the
|
|
1095
|
-
failure appears later as a
|
|
1158
|
+
failure appears later as a company whose assistant cannot connect. Ask from off the box:
|
|
1096
1159
|
|
|
1097
1160
|
```
|
|
1098
1161
|
curl -sS -o /dev/null -w '%{http_code}\n' https://<your-host>/mcp
|
|
@@ -1118,12 +1181,16 @@ infer it from an install step. The operational side — issuing and rotating gra
|
|
|
1118
1181
|
|
|
1119
1182
|
What belongs here is only what you set at install time.
|
|
1120
1183
|
|
|
1184
|
+
**Serving other organisations.** An instance that runs searches for organisations other than your own
|
|
1185
|
+
bills Claude through an API key or a cloud account, never a Claude subscription, as Anthropic's terms
|
|
1186
|
+
require.
|
|
1187
|
+
|
|
1121
1188
|
**The guest list.** `CLEAROTRON_ACCESS_FILE` turns account scoping on for **every face at once** — the
|
|
1122
1189
|
portal, the MCP read face, and the client connector. `npx clearotron start` (§6) writes one into its
|
|
1123
1190
|
state directory the first time it runs: you, with access to everything, your organisation if setup was
|
|
1124
1191
|
told its name, and nobody else yet.
|
|
1125
1192
|
[examples/grants.example.json](examples/grants.example.json) is a runnable guest list over the demo
|
|
1126
|
-
|
|
1193
|
+
companies.
|
|
1127
1194
|
|
|
1128
1195
|
**Giving someone access.** `npx clearotron grant add` writes the same file the portal's People page
|
|
1129
1196
|
writes:
|
|
@@ -1179,7 +1246,7 @@ wrong and every layer reports healthy while nothing can connect.
|
|
|
1179
1246
|
|---|---|---|---|---|
|
|
1180
1247
|
| Portal | `trademark.example.com/portal` | `CLEAROTRON_OIDC_AUDIENCE` | your staff, interactively | a browser redirect is fine — a person is at the keyboard |
|
|
1181
1248
|
| Staff MCP door | same host, `/mcp` | `CLEAROTRON_OIDC_AUDIENCE` | staff, **non-interactively** | an OAuth challenge, or a service token |
|
|
1182
|
-
| Client connector | `clients-mcp.example.com/mcp` | `CLEAROTRON_CLIENT_OIDC_AUDIENCE` | your
|
|
1249
|
+
| Client connector | `clients-mcp.example.com/mcp` | `CLEAROTRON_CLIENT_OIDC_AUDIENCE` | your companies' assistants | an OAuth challenge, or a service token |
|
|
1183
1250
|
|
|
1184
1251
|
**The client door needs its own audience, and it refuses to start without one.** Two separate refusals,
|
|
1185
1252
|
both fail-closed and both printed with the reason:
|
|
@@ -1245,9 +1312,9 @@ writes nothing.
|
|
|
1245
1312
|
> goes stale. Nothing on either side says so. If a connector that used to work has stopped, check
|
|
1246
1313
|
> whether the application was recreated before you change anything else.
|
|
1247
1314
|
|
|
1248
|
-
**Seeing what a
|
|
1249
|
-
connector key**: issue one for that
|
|
1250
|
-
client connector with it, and you get exactly that
|
|
1315
|
+
**Seeing what a company sees.** There is no "view as" screen. The documented route is a **client-scoped
|
|
1316
|
+
connector key**: issue one for that company with `npx clearotron key issue`, point an assistant at the
|
|
1317
|
+
client connector with it, and you get exactly that company's scope. Changing `PORTAL_LOCAL_USER` to
|
|
1251
1318
|
impersonate someone is not the answer — local sign-in is one user by design, and the service refuses to
|
|
1252
1319
|
start if the credential does not match the configured address, so you lose your own access and take the
|
|
1253
1320
|
deployment down to answer a question.
|
|
@@ -1278,7 +1345,7 @@ The engine is complete as a clearance-and-report producer. A deployment adds:
|
|
|
1278
1345
|
|
|
1279
1346
|
- **Channel delivery** — the code that reads `_driver/delivery.json` and actually sends the report by
|
|
1280
1347
|
email/chat, plus whatever intake writes the job files.
|
|
1281
|
-
- **
|
|
1348
|
+
- **Company bundles** — the private `CLEAROTRON_CUSTOMERS_DIR` config store and any per-company risk
|
|
1282
1349
|
frameworks or worked-examples the profiles point at.
|
|
1283
1350
|
- **Remote ingress** — if you expose the MCP HTTP face, the reverse proxy / tunnel / IdP in front of it.
|
|
1284
1351
|
|
|
@@ -1297,7 +1364,7 @@ A courier is a loop over one directory, and it needs no unit of its own if you a
|
|
|
1297
1364
|
|
|
1298
1365
|
1. **Watch the outbox** — `$CLEAROTRON_OUTBOX_DIR`. A `.pending` file appears there when a run
|
|
1299
1366
|
finishes. Read the variable rather than guessing the directory: the wizard writes `<data
|
|
1300
|
-
base>/outbox`, but an unset variable falls back to `
|
|
1367
|
+
base>/outbox`, but an unset variable falls back to `clearance-outbox` under the workspace root
|
|
1301
1368
|
(`driver/driver.config.mjs`), so the two are not the same path and only one of them is where your
|
|
1302
1369
|
markers are.
|
|
1303
1370
|
2. **Read what it points at.** A success marker is a few bytes naming the agent, *not* the payload —
|
|
@@ -1310,7 +1377,7 @@ A courier is a loop over one directory, and it needs no unit of its own if you a
|
|
|
1310
1377
|
|
|
1311
1378
|
**An unclaimed marker is the documented terminal state, not a stall.** A box with no courier
|
|
1312
1379
|
accumulates `.pending` files while every report behind them is published and readable. Do not read that
|
|
1313
|
-
count as undelivered
|
|
1380
|
+
count as undelivered company work.
|
|
1314
1381
|
|
|
1315
1382
|
## 10. Licence, and what it does not cover
|
|
1316
1383
|
|
|
@@ -1324,10 +1391,10 @@ About page, the MCP server's `server_info`, and `npx clearotron start --license`
|
|
|
1324
1391
|
**Everything §1 told you to bring is outside it.** Read this before you count the licence as your
|
|
1325
1392
|
answer on any of them:
|
|
1326
1393
|
|
|
1327
|
-
- **The reasoning
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
part of it.
|
|
1394
|
+
- **The reasoning program is third-party software.** Claude Code is proprietary; the Codex CLI is open
|
|
1395
|
+
source, under the licence OpenAI publishes with it. Every reasoning stage spawns one of them as a child
|
|
1396
|
+
process. Setup installs it only when you say yes; you sign in to it, and your use of it is governed by
|
|
1397
|
+
its vendor's terms. AGPL-3.0 grants you nothing over it, and this repository redistributes no part of it.
|
|
1331
1398
|
- **Register and research providers are your own agreements.** EUIPO, the USPTO bulk product,
|
|
1332
1399
|
`PERPLEXITY_API_KEY`, CourtListener, and the subscription registers (Clarivate, Signa, Corsearch)
|
|
1333
1400
|
each sit on terms you accept directly with that provider. The adapters in `providers/` are ours and
|
package/README.md
CHANGED
|
@@ -46,8 +46,8 @@ Node 22.13 or newer, on macOS or Linux. It needs no root: it puts the program un
|
|
|
46
46
|
before it saves it. With `~/.local/bin` on your `PATH`, every command below works in the short form;
|
|
47
47
|
otherwise use the full path `install` prints at the end. **On Windows the demo above runs natively; a
|
|
48
48
|
real clearance needs WSL2.** Native Windows clearances are planned for a later release. Until then the
|
|
49
|
-
engine does not run on native Windows: it
|
|
50
|
-
|
|
49
|
+
engine does not run on native Windows: it spawns each stage with POSIX path and process semantics, so
|
|
50
|
+
a clearance is refused there before it starts.
|
|
51
51
|
|
|
52
52
|
`npm install -g clearotron` also works where npm's global directory is yours to write. On a Linux Node
|
|
53
53
|
from the distribution or NodeSource that directory is `/usr`, owned by root, and npm refuses with
|
|
@@ -107,7 +107,7 @@ clearotron run --job my-job.json
|
|
|
107
107
|
|
|
108
108
|
## How it fits together
|
|
109
109
|
|
|
110
|
-
- **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`)
|
|
110
|
+
- **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`); setup installs it if the machine has none. `CLEAROTRON_AI_BILLING` chooses what pays: your signed-in subscription, an API key, or your own Google, Microsoft or Amazon cloud account. Whichever pays, the CLI is what runs — there is no path that calls the model directly.
|
|
111
111
|
- **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; Clarivate, Signa and Corsearch are subscriptions. [The six, and what each reaches](providers/README.md).
|
|
112
112
|
- **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.
|
|
113
113
|
- **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.
|
package/SECURITY.md
CHANGED
|
@@ -26,7 +26,7 @@ affected versions, and a fix or a written decision not to fix. We will credit yo
|
|
|
26
26
|
ask us not to.
|
|
27
27
|
|
|
28
28
|
**Never attach a run artifact to a report.** Reports, audit workbooks, run directories and pool
|
|
29
|
-
contents can carry
|
|
29
|
+
contents can carry company names, marks and matters. Describe the shape of the data instead, or
|
|
30
30
|
reproduce it against the repo's synthetic fixtures.
|
|
31
31
|
|
|
32
32
|
## What is in scope
|
|
@@ -42,8 +42,8 @@ In particular, we want to hear about anything that breaks these:
|
|
|
42
42
|
- **Fail-closed construction.** The HTTP face refuses to start without an audience, an issuer, and an
|
|
43
43
|
identity gate. Any path that serves a request with authentication silently absent is in scope.
|
|
44
44
|
- **The dev portal's loopback bind.** `driver/dev-portal.mjs` must refuse every non-loopback host.
|
|
45
|
-
- **
|
|
46
|
-
rendered into a report or a
|
|
45
|
+
- **Company-facing surfaces leaking internals.** An env var name, a switch name, or an internal path
|
|
46
|
+
rendered into a report or a company-visible error.
|
|
47
47
|
- **Traversal and injection** into artifact reads, pool paths, or run directories.
|
|
48
48
|
|
|
49
49
|
[`docs/SECURITY.md`](docs/SECURITY.md) documents the whole envelope — what protects what, and where
|
package/bin/brandowner.mjs
CHANGED
|
@@ -113,7 +113,7 @@ const USAGE = `
|
|
|
113
113
|
--domains comma-separated email domains that resolve to this owner
|
|
114
114
|
--platforms comma-separated marketplaces their searches cover
|
|
115
115
|
omitted ⇒ the Generic default's platforms are applied and named in the output
|
|
116
|
-
--framework their risk framework, as skills/
|
|
116
|
+
--framework their risk framework, as skills/clearance-search/<file>.md
|
|
117
117
|
omitted ⇒ the Generic default is applied and named in the output
|
|
118
118
|
--industry free text, shown on their profile
|
|
119
119
|
--context a file whose contents become this owner's context pack
|
|
@@ -121,7 +121,7 @@ const USAGE = `
|
|
|
121
121
|
|
|
122
122
|
clearotron brandowner framework <key> <path>
|
|
123
123
|
|
|
124
|
-
Point an existing company at a risk framework, as skills/
|
|
124
|
+
Point an existing company at a risk framework, as skills/clearance-search/<file>.md.
|
|
125
125
|
The deck is checked before anything is written: a path that does not resolve, or a
|
|
126
126
|
manifest that will not load, is refused and the company is left exactly as it was.
|
|
127
127
|
|
|
@@ -298,7 +298,7 @@ export async function framework(argv, {
|
|
|
298
298
|
} = {}) {
|
|
299
299
|
const [key, path] = argv;
|
|
300
300
|
if (!key) throw new Refusal(`this command needs a company key.${USAGE}`);
|
|
301
|
-
if (!path) throw new Refusal(`this command needs a framework path, as skills/
|
|
301
|
+
if (!path) throw new Refusal(`this command needs a framework path, as skills/clearance-search/<file>.md.${USAGE}`);
|
|
302
302
|
try { assertProfileKey(key); }
|
|
303
303
|
catch (e) { throw new Refusal(e?.message ?? String(e)); }
|
|
304
304
|
|
|
@@ -20,7 +20,7 @@ import { invocationPrefix } from "../shared/invocation.mjs";
|
|
|
20
20
|
import { preflightFramework, formatPreflight } from "../driver/framework-preflight.mjs";
|
|
21
21
|
|
|
22
22
|
const USAGE = (cmd) => `
|
|
23
|
-
${cmd} framework <skills/
|
|
23
|
+
${cmd} framework <skills/clearance-search/your-framework.md>
|
|
24
24
|
|
|
25
25
|
Reads a risk framework deck and the manifest beside it, and reports what they declare —
|
|
26
26
|
the ladder, the company the deck names, the shape, and which file answered where.
|