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.
Files changed (272) hide show
  1. package/.env.example +58 -26
  2. package/CONTRIBUTING.md +8 -8
  3. package/INSTALL.md +148 -81
  4. package/README.md +3 -3
  5. package/SECURITY.md +3 -3
  6. package/bin/brandowner.mjs +3 -3
  7. package/bin/framework-preflight.mjs +1 -1
  8. package/bin/onboard.mjs +637 -216
  9. package/bin/start.mjs +151 -27
  10. package/bin/update.mjs +58 -11
  11. package/build-info.json +2 -2
  12. package/docs/DELIVERY.md +2 -1
  13. package/docs/INTAKE.md +1 -1
  14. package/docs/ONBOARDING.md +1 -1
  15. package/docs/architecture/03-run-lifecycle.md +6 -6
  16. package/docs/architecture/04-configuration-reference.md +32 -14
  17. package/docs/architecture/05-config-governance.md +23 -8
  18. package/docs/architecture/05-customer-profiles.md +2 -2
  19. package/docs/architecture/06-operations-runbook.md +3 -3
  20. package/docs/architecture/08-development-guide.md +6 -6
  21. package/docs/configuration.md +5 -5
  22. package/docs/decisions/0003-credential-model.md +1 -1
  23. package/docs/writing-standard.md +4 -0
  24. package/driver/CHANGELOG.md +124 -0
  25. package/driver/README.md +3 -3
  26. package/driver/band-size.mjs +59 -0
  27. package/driver/binding-layers.mjs +1 -1
  28. package/driver/citation-census.json +3 -3
  29. package/driver/{prelim-variants-record.mjs → clearance-variants-record.mjs} +24 -24
  30. package/driver/common-law-receipts.mjs +2 -2
  31. package/driver/company-bundle.mjs +3 -3
  32. package/driver/compose-read.mjs +8 -14
  33. package/driver/config-inventory.mjs +112 -9
  34. package/driver/consumption-ledger.mjs +2 -2
  35. package/driver/contract-arm2-baseline.json +2 -5
  36. package/driver/contract-dictation-registry.mjs +19 -19
  37. package/driver/contract-e3-backlog.mjs +43 -43
  38. package/driver/contract-e3-baseline.json +14 -14
  39. package/driver/contract-vocabulary.mjs +68 -27
  40. package/driver/deliver-trigger.sh +16 -16
  41. package/driver/demo-container.mjs +3 -3
  42. package/driver/dev-portal.mjs +3 -3
  43. package/driver/disposition-call.mjs +1 -1
  44. package/driver/door-gates.mjs +41 -7
  45. package/driver/doubt-ledger.mjs +2 -2
  46. package/driver/drainer-identity.mjs +34 -8
  47. package/driver/driver.config.mjs +367 -104
  48. package/driver/engine/CONTRACT.md +10 -3
  49. package/driver/engine/README.md +2 -2
  50. package/driver/engine/anthropic-agent.mjs +77 -21
  51. package/driver/engine/auth.mjs +129 -10
  52. package/driver/engine/jx-turn.mjs +7 -6
  53. package/driver/engine/mcp/README.md +1 -1
  54. package/driver/engine/mcp/dispositions-server.mjs +3 -3
  55. package/driver/engine/mcp/gather-config.mjs +9 -9
  56. package/driver/engine/mcp/perplexity-server.mjs +2 -2
  57. package/driver/engine/mcp/recording-server.mjs +18 -5
  58. package/driver/engine/openai-agent.mjs +4 -2
  59. package/driver/engine/probe.mjs +110 -23
  60. package/driver/enqueue-schema.mjs +6 -2
  61. package/driver/findings-model.mjs +6 -3
  62. package/driver/flag-snapshot.mjs +34 -8
  63. package/driver/form-neighbourhood.mjs +54 -7
  64. package/driver/framework.mjs +4 -4
  65. package/driver/gateway.mjs +36 -24
  66. package/driver/jx-lanes.mjs +23 -4
  67. package/driver/jx-units.mjs +7 -4
  68. package/driver/jx.mjs +34 -4
  69. package/driver/knockout-review-record.mjs +56 -4
  70. package/driver/known-conflicts.mjs +1 -1
  71. package/driver/matter-frame-record.mjs +90 -1
  72. package/driver/named-band.mjs +1 -1
  73. package/driver/ordinary-words.mjs +51 -0
  74. package/driver/outbox-backoff.mjs +31 -16
  75. package/driver/package.json +1 -1
  76. package/driver/partial-payload-baseline.json +2 -2
  77. package/driver/phase0.mjs +3 -3
  78. package/driver/pipeline-knockout.mjs +5 -5
  79. package/driver/pipeline.mjs +396 -81
  80. package/driver/placement-form.mjs +77 -1
  81. package/driver/placement-model.mjs +1 -1
  82. package/driver/portal-config-view.mjs +30 -1
  83. package/driver/portal-report.mjs +107 -6
  84. package/driver/portal-service.mjs +80 -14
  85. package/driver/portal-upstream.mjs +1 -1
  86. package/driver/predelivery-lint.mjs +12 -2
  87. package/driver/preserve-merge.mjs +3 -3
  88. package/driver/product-rows.mjs +2 -2
  89. package/driver/products.mjs +1 -1
  90. package/driver/profiles/README.md +3 -3
  91. package/driver/profiles/demo-brand-owner.json +2 -2
  92. package/driver/profiles.mjs +55 -17
  93. package/driver/progress.mjs +18 -8
  94. package/driver/provider-usage.mjs +8 -8
  95. package/driver/publish/index.mjs +154 -8
  96. package/driver/publish/knockout.mjs +39 -5
  97. package/driver/publish/pool-admin.mjs +1 -1
  98. package/driver/publish/publish-inputs.mjs +18 -2
  99. package/driver/publish/render-knockout.mjs +184 -31
  100. package/driver/publish/render.mjs +323 -93
  101. package/driver/publish/report-data.mjs +4 -1
  102. package/driver/publish/report-topbar.mjs +58 -0
  103. package/driver/publish/search-depth.mjs +133 -4
  104. package/driver/publish/templates/report.css +78 -4
  105. package/driver/publish/xlsx.mjs +20 -1
  106. package/driver/queue-order.mjs +2 -2
  107. package/driver/recording-agreement.mjs +1 -1
  108. package/driver/reference-score.mjs +1 -1
  109. package/driver/register-availability.mjs +2 -2
  110. package/driver/register-count.mjs +50 -5
  111. package/driver/register-coverage.mjs +161 -1
  112. package/driver/register-digest-record.mjs +236 -11
  113. package/driver/register-grant-vocabulary.mjs +1 -1
  114. package/driver/register-plan.mjs +189 -2
  115. package/driver/registry-fidelity.mjs +3 -3
  116. package/driver/repair-composers.mjs +1 -1
  117. package/driver/repair-contract.mjs +1 -1
  118. package/driver/replay-archive.mjs +6 -6
  119. package/driver/report-overview-record.mjs +2 -2
  120. package/driver/result-noun-fields.mjs +2 -2
  121. package/driver/run-economics.mjs +41 -10
  122. package/driver/run-requirements.mjs +173 -9
  123. package/driver/runner.mjs +5 -5
  124. package/driver/scope-facts.mjs +20 -5
  125. package/driver/scope-ledger.mjs +5 -5
  126. package/driver/search-policy.mjs +22 -12
  127. package/driver/skills/README.md +15 -15
  128. package/driver/skills/blind-frame/SKILL.md +2 -2
  129. package/driver/skills/case-law-citation/SKILL.md +4 -4
  130. package/driver/skills/case-law-citation/sources/eurlex.md +1 -1
  131. package/driver/skills/{prelim-common-law → clearance-common-law}/SKILL.md +22 -22
  132. package/driver/skills/{prelim-common-law → clearance-common-law}/perplexity-prompts.md +1 -1
  133. package/driver/skills/{prelim-register → clearance-register}/SKILL.md +10 -10
  134. package/driver/skills/{prelim-register → clearance-register}/digest.md +2 -2
  135. package/driver/skills/{prelim-register → clearance-register}/providers/README.md +1 -1
  136. package/driver/skills/{prelim-register → clearance-register}/providers/clarivate.md +37 -35
  137. package/driver/skills/{prelim-register → clearance-register}/providers/corsearch.md +20 -11
  138. package/driver/skills/{prelim-register → clearance-register}/providers/signa.md +5 -5
  139. package/driver/skills/{prelim-register → clearance-register}/register-recipes.md +3 -3
  140. package/driver/skills/{prelim-register → clearance-register}/status-rules.md +2 -2
  141. package/driver/skills/{prelim-register → clearance-register}/stealth-filer-indicators.md +1 -1
  142. package/driver/skills/{prelim-register → clearance-register}/unit.md +2 -2
  143. package/driver/skills/{prelim-search → clearance-search}/SKILL.md +31 -31
  144. package/driver/skills/{prelim-search → clearance-search}/delivery-contract.md +1 -1
  145. package/driver/skills/{prelim-search → clearance-search}/phase2-execution.md +18 -18
  146. package/driver/skills/{prelim-search → clearance-search}/synthesis-rules.md +7 -7
  147. package/driver/skills/{prelim-variants → clearance-variants}/SKILL.md +18 -18
  148. package/driver/skills/{prelim-variants → clearance-variants}/transliteration-scripts.md +5 -5
  149. package/driver/skills/frame-diff/SKILL.md +1 -1
  150. package/driver/skills/knockout-assess/SKILL.md +10 -7
  151. package/driver/skills/matter-frame/SKILL.md +3 -3
  152. package/driver/skills/narrative-refutation/SKILL.md +9 -9
  153. package/driver/skills/placement-inquiry/SKILL.md +5 -5
  154. package/driver/stage-context.mjs +1 -1
  155. package/driver/stages-knockout.mjs +4 -4
  156. package/driver/stages.mjs +65 -61
  157. package/driver/status-snapshot.mjs +2 -2
  158. package/driver/suite-census.json +340 -136
  159. package/driver/surface-exit-verdict.mjs +58 -0
  160. package/driver/systemd/README.md +9 -6
  161. package/driver/systemd/clearotron-worker.service +1 -1
  162. package/driver/terminal-clamp.mjs +109 -1
  163. package/driver/tokens.mjs +169 -3
  164. package/driver/unit-environment.mjs +42 -15
  165. package/driver/unit-inventory.mjs +19 -2
  166. package/driver/usage-ledger.mjs +1 -1
  167. package/driver/variant-manifest-model.mjs +4 -4
  168. package/driver/verify-knockout.mjs +27 -0
  169. package/driver/verify.mjs +94 -6
  170. package/driver/whatif-queue.mjs +1 -1
  171. package/driver/wordlists/en.txt +63906 -0
  172. package/mcp-server/CHANGELOG.md +8 -0
  173. package/mcp-server/README.md +1 -1
  174. package/mcp-server/lib/README.md +1 -1
  175. package/mcp-server/lib/options.mjs +8 -7
  176. package/mcp-server/lib/plan.mjs +18 -2
  177. package/mcp-server/lib/runs.mjs +1 -1
  178. package/mcp-server/lib/usage.mjs +3 -3
  179. package/mcp-server/lib/whatif.mjs +1 -1
  180. package/mcp-server/package.json +1 -1
  181. package/mcp-server/server.mjs +18 -1
  182. package/package.json +12 -11
  183. package/portal-ui/dist/assets/{index-CVOIvdhc.css → index-CtvwLCti.css} +207 -3
  184. package/portal-ui/dist/assets/{index-5UyqAyNM.js → index-EVaSo5-g.js} +1580 -527
  185. package/portal-ui/dist/index.html +2 -2
  186. package/portal-ui/package.json +1 -1
  187. package/providers/README.md +1 -1
  188. package/providers/_shared/enumerate.mjs +6 -6
  189. package/providers/_shared/execute-plan.mjs +3 -3
  190. package/providers/_shared/ledger.mjs +119 -5
  191. package/providers/_shared/provider-text.mjs +2 -2
  192. package/providers/_shared/screen.mjs +2 -2
  193. package/providers/_shared/script-form.mjs +3 -3
  194. package/providers/_shared/territory-codes.mjs +23 -3
  195. package/providers/clarivate/README.md +1 -1
  196. package/providers/clarivate/src/capabilities.js +12 -12
  197. package/providers/clarivate/src/core.js +37 -43
  198. package/providers/corsearch/README.md +1 -1
  199. package/providers/corsearch/src/capabilities.js +5 -5
  200. package/providers/corsearch/src/core.js +3 -3
  201. package/providers/jx/README.md +2 -1
  202. package/providers/jx/src/turn-envelope.mjs +8 -3
  203. package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
  204. package/providers/oauth-mcp-bridge/package.json +1 -1
  205. package/providers/perplexity/src/core.js +1 -1
  206. package/providers/signa/README.md +1 -1
  207. package/providers/signa/src/capabilities.js +42 -49
  208. package/providers/signa/src/core.js +106 -29
  209. package/providers/uspto-local/README.md +1 -1
  210. package/providers/uspto-local/src/sync.js +1 -1
  211. package/scripts/README.md +1 -0
  212. package/scripts/ask-ai-render-check.mjs +127 -1
  213. package/scripts/authority-boundary-probe.mjs +8 -6
  214. package/scripts/backfill-started-at.mjs +2 -2
  215. package/scripts/census-merge-driver.mjs +33 -2
  216. package/scripts/citation-anchor-report.mjs +181 -0
  217. package/scripts/dead-names.mjs +1 -1
  218. package/scripts/deprecate-below.mjs +66 -8
  219. package/scripts/drain-preflight.mjs +1 -1
  220. package/scripts/e2e.mjs +174 -0
  221. package/scripts/env-audit.mjs +39 -6
  222. package/scripts/env-classify.mjs +20 -2
  223. package/scripts/freeze-example-run.mjs +61 -18
  224. package/scripts/generated-files-are-current.mjs +69 -4
  225. package/scripts/live-surface-check.mjs +124 -41
  226. package/scripts/markdown-link-check.mjs +1 -1
  227. package/scripts/merge-shape-check.mjs +242 -0
  228. package/scripts/mint-names-in-force.mjs +5 -5
  229. package/scripts/mint-offered-territories.mjs +72 -0
  230. package/scripts/mint-public-residue.mjs +2 -2
  231. package/scripts/mint-reference-strip-backlog.mjs +2 -2
  232. package/scripts/mint-suite-census.mjs +75 -2
  233. package/scripts/mint-writing-standard-backlog.mjs +2 -2
  234. package/scripts/purge-runs.mjs +7 -7
  235. package/scripts/reconcile-runs.mjs +2 -2
  236. package/scripts/release-approve-parked.mjs +20 -2
  237. package/scripts/release-await-cut.mjs +120 -1
  238. package/scripts/release-note-required.mjs +76 -8
  239. package/scripts/report-header-render-check.mjs +164 -0
  240. package/scripts/settings-render-check.mjs +75 -2
  241. package/scripts/test-full.mjs +96 -3
  242. package/scripts/test-run.mjs +10 -0
  243. package/shared/brand.mjs +27 -0
  244. package/shared/connect-clients.mjs +39 -11
  245. package/shared/deployment-box.mjs +7 -2
  246. package/shared/driver-dir.mjs +1 -1
  247. package/shared/env-aliases.mjs +1 -1
  248. package/shared/identifier-scan.mjs +65 -9
  249. package/shared/identifier-sentinels.mjs +22 -0
  250. package/shared/names-in-force.mjs +4 -2
  251. package/shared/offered-territories.json +738 -0
  252. package/shared/pre-rename-spellings.mjs +53 -0
  253. package/shared/reference-guard-classes.mjs +40 -2
  254. package/shared/stdio-connect.mjs +39 -4
  255. package/shared/tree-commit.mjs +48 -0
  256. /package/driver/skills/{prelim-register → clearance-register}/providers/euipo.md +0 -0
  257. /package/driver/skills/{prelim-register → clearance-register}/providers/free-tier.md +0 -0
  258. /package/driver/skills/{prelim-register → clearance-register}/providers/uspto-local.md +0 -0
  259. /package/driver/skills/{prelim-search → clearance-search}/field-doctrine-pharma.md +0 -0
  260. /package/driver/skills/{prelim-search → clearance-search}/firm-wide-reasoning.md +0 -0
  261. /package/driver/skills/{prelim-search → clearance-search}/report-prose.md +0 -0
  262. /package/driver/skills/{prelim-search → clearance-search}/risk-framework-demo.manifest.json +0 -0
  263. /package/driver/skills/{prelim-search → clearance-search}/risk-framework-demo.md +0 -0
  264. /package/driver/skills/{prelim-search → clearance-search}/risk-framework-triage.manifest.json +0 -0
  265. /package/driver/skills/{prelim-search → clearance-search}/risk-framework-triage.md +0 -0
  266. /package/driver/skills/{prelim-search → clearance-search}/risk-framework.manifest.json +0 -0
  267. /package/driver/skills/{prelim-search → clearance-search}/risk-framework.md +0 -0
  268. /package/driver/skills/{prelim-search → clearance-search}/template-formatting.md +0 -0
  269. /package/driver/skills/{prelim-search → clearance-search}/templates/email/generic.md +0 -0
  270. /package/driver/skills/{prelim-search → clearance-search}/templates/search-request-form.html +0 -0
  271. /package/driver/skills/{prelim-search → clearance-search}/worked-examples-demo.md +0 -0
  272. /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 resolves
50
- the reasoning CLI the POSIX way, so a native-Windows clearance refuses at preflight even with the CLI
51
- on `PATH`. Native Windows clearances are planned for a later release. Until then, on Windows,
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
- npm install -g @anthropic-ai/claude-code
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
- - **A reasoning CLI on your `PATH`, signed in.** This is the prerequisite people miss. Every stage runs
79
- as a headless turn of a third-party binary, and `CLEAROTRON_AI` picks which one for the whole install.
80
- An API key is not a substitute for the binary — it decides what the child process is handed, not
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
- **Install one first.** The sign-in table below assumes the binary is already on the box; these are the
84
- same commands the installer offers when it asks you, so nothing here is new advice.
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
- | `CLEAROTRON_AI` | Binary | Install it with |
87
- |---|---|---|
88
- | `anthropic-agent` (default) | `claude` | `npm install -g @anthropic-ai/claude-code` |
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
- **If npm's global prefix needs root and you do not have it**, the `claude` CLI has a second route —
92
- `curl -fsSL https://claude.ai/install.sh | bash`, which lands in `~/.local/bin` and prints its own
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
- Then sign it in:
93
+ To sign in:
98
94
 
99
- | `CLEAROTRON_AI` | Binary | Signed-in laptop | A box you cannot complete a sign-in on |
95
+ | `CLEAROTRON_AI` | Program | Signed-in laptop | A machine you cannot complete a sign-in on |
100
96
  |---|---|---|---|
101
- | `anthropic-agent` (default) | `claude` | `claude` OAuth login — rides your subscription | `claude setup-token` once anywhere you *can* log in, then put it on the server as `CLAUDE_CODE_OAUTH_TOKEN` |
102
- | `openai-agent` | `codex` | `codex login` | `codex login --device-auth` — prints a code you complete on another device |
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 box has a
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/prelim-search/`. If you never set an agent id, the upgraded
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 a customer does not have.
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 a customer receives, and it is the one `scripts/verify-publishable.mjs` drives on every
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. It is not the
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=claude # path to the Claude CLI (default: `claude` on 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=codex # path to the codex CLI (default: `codex` on 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 client's report into somebody else's archive.
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 customer-config store (default: bundled profiles/)
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 customer of 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` |
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 customer store, keyed by an account key, and listed under exactly one organisation | the portal's `+ New company`, or `npx clearotron brandowner add <key>` |
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 **customer profile** — a small JSON file that declares that customer's
559
- marketplaces, default classes/jurisdictions, own-brand names to exclude, delivery style, and (optionally)
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 account the demo runs as, so you can run and read the machinery
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 customers live outside the repo.** Point `CLEAROTRON_CUSTOMERS_DIR` at your own private
569
- config store and the engine loads *those* accounts instead. **Same engine, different config path** —
570
- the code carries no customer identities.
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 customer directory has to sit inside the repository that
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 customer-specific is committed to the repository.
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 customer store holds besides the profile
659
+ ### What a company store holds besides the profile
597
660
 
598
- A customer is not only its `<key>.json`. Two more things sit beside it, both optional, both shipped as
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 account that
602
- the engine attaches to the profile it loads. One ships beside a bundled demo customer.
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
- customer: a launch screening, a flagship clearance, a regional push. Each may carry its own
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 customer may set |
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 customer is or
617
- what standard their risk is rated against. Setting a customer-only key in an overlay fails validation by
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 customer's.** The
621
- customer's marketplaces are client-mandated: the account asked for those to be swept, and an engagement
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 customers and your store's `projects/`, and none of ours. That is deliberate — a deployment's
629
- roster holds its own accounts and nothing of ours — but it is silent, and it is the one thing here that
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 customer's own defaults — its classes, its marketplaces, its product — and 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 customers, context packs and project overlays you want; assume you inherit none.
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 customer profile can supply the last one.
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
- client's context reach a reasoning provider and Perplexity, and the mark and its variants reach your
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 customers this install knows about. The `*_AUTH_DISABLED` switches
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 — customer risk frameworks will resolve to this repo's demo fixtures."* On a
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 client's own. It goes quiet once
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
- **customer profile**, however, still commits into this checkout until `PROFILE_REPO_ROOT` names a
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 clients'
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 client whose assistant cannot connect. Ask from off the box:
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
- clients.
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 clients' assistants | an OAuth challenge, or a service token |
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 client sees.** There is no "view as" screen. The documented route is a **client-scoped
1249
- connector key**: issue one for that client with `npx clearotron key issue`, point an assistant at the
1250
- client connector with it, and you get exactly that client's scope. Changing `PORTAL_LOCAL_USER` to
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
- - **Customer bundles** — the private `CLEAROTRON_CUSTOMERS_DIR` config store and any per-customer risk
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 `prelim-outbox` under the workspace root
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 client work.
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 CLI is proprietary third-party software.** Every reasoning stage spawns the Claude
1328
- CLI or the Codex CLI as a child process. You install it and sign in to it, and your use is governed
1329
- by that vendor's terms. AGPL-3.0 grants you nothing over it, and this repository redistributes no
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 resolves the reasoning CLI the POSIX way, and a clearance
50
- started there refuses at preflight.
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`), which must be installed. `CLEAROTRON_AI_BILLING` chooses what pays for the turn: your signed-in subscription, or an API key. Either way the CLI is what runs — there is no path that calls the model directly.
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 client names, marks and matters. Describe the shape of the data instead, or
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
- - **Client-facing surfaces leaking internals.** An env var name, a switch name, or an internal path
46
- rendered into a report or a client-visible error.
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
@@ -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/prelim-search/<file>.md
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/prelim-search/<file>.md.
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/prelim-search/<file>.md.${USAGE}`);
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/prelim-search/your-framework.md>
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.