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/.env.example CHANGED
@@ -1,7 +1,7 @@
1
1
  # =============================================================================
2
2
  # example.com-trademark — canonical environment contract (.env.example)
3
3
  # =============================================================================
4
- # The prelim-search product reads all of its configuration + credentials from
4
+ # The clearance-search product reads all of its configuration + credentials from
5
5
  # the environment. In production these live in the systemd EnvironmentFile
6
6
  # (`~/.env`, loaded as whichever service account runs the engine); in dev they are
7
7
  # exported before the run. This file is the DOCUMENTED CONTRACT — copy it to
@@ -49,8 +49,6 @@
49
49
  # product code that declares nothing; 96 existing names are a frozen backlog, not a pass. The
50
50
  # declaration records what a class IS, and is not a claim that it is harmless — the guard checks
51
51
  # the string, a reader checks the truth.
52
- # • "Reconstructed" / "verify at deploy" notes flag values that could not be
53
- # confirmed inside this repo (see AZURE_OPENAI_* below).
54
52
  # =============================================================================
55
53
 
56
54
 
@@ -79,12 +77,16 @@
79
77
  # otherwise until the free-register work corrected it:
80
78
  # anthropic-agent `claude -p`, off-gateway. The default.
81
79
  # openai-agent `codex exec`. Built and $0-tested; live verification still pending.
82
- # Either way the reasoning needs a subscription or an API key of its own — that is separate from every
83
- # register credential below, and no register source removes it.
80
+ # Either way the reasoning is paid for on its own: a subscription, an API key, or (Claude only) your own cloud
81
+ # account, chosen by CLEAROTRON_AI_BILLING below. That is separate from every register credential below, and
82
+ # no register source removes it.
84
83
  CLEAROTRON_AI=anthropic-agent
85
- # Path/name of the engine binary — ONE PER ENGINE. Only the live engine's value is read, so a box that
86
- # runs one engine sets one and a box that runs both sets both, to different paths. Give each an ABSOLUTE
87
- # path if the binary is not on PATH: stage subprocesses run with cwd set to the run directory.
84
+ # Path/name of the engine binary — ONE PER ENGINE, and only to force one copy. Left as the engine's own
85
+ # word (`claude`, `codex`) or unset, a run takes the program on PATH, then the copy setup installed. Do not
86
+ # write the path of setup's copy here: it would become the forced copy, and one installed later would never
87
+ # be used. A path set here must be ABSOLUTE: stage subprocesses run with cwd set to the run directory.
88
+ # Only the live engine's value is read, so a machine that runs both engines can set both.
89
+ # effect: setup
88
90
  CLEAROTRON_CLAUDE_PATH=claude
89
91
 
90
92
  # ── openai-agent (codex) knobs — ONLY read when CLEAROTRON_AI=openai-agent ────────────────────────
@@ -92,7 +94,9 @@ CLEAROTRON_CLAUDE_PATH=claude
92
94
  # overwriting the other — these were one variable until that collapse met a box needing two different
93
95
  # paths, and this file shipped two live rows for the single name until then (a last-wins assignment in
94
96
  # the copied `.env`, not a choice).
97
+ # effect: setup
95
98
  CLEAROTRON_CODEX_PATH=codex
99
+
96
100
  CLEAROTRON_WORK_DIR=
97
101
  # Customer/project config store (loadProfiles). Unset ⇒ driver's built-in profiles dir.
98
102
  CLEAROTRON_CUSTOMERS_DIR=
@@ -102,15 +106,28 @@ CLEAROTRON_INSTRUCTIONS_DIR=
102
106
  # REQUIRED — the code default was removed. Unset, the engine refuses and names this variable instead
103
107
  # of falling back to /srv/trademark-archive, which on a deployed box is real client matter.
104
108
  CLEAROTRON_REPORTS_DIR=/srv/trademark-archive
105
- # Run-slot lock dir. Default = $CLEAROTRON_WORK_DIR/prelim-run-locks. Every run takes a slot here,
109
+ # Run-slot lock dir. Default = $CLEAROTRON_WORK_DIR/clearance-run-locks. Every run takes a slot here,
106
110
  # whether the runner dispatched it or somebody launched it by hand, so this is what bounds concurrency
107
111
  # across an install rather than within one process. The portal also reads it to find the worker
108
112
  # heartbeat; two installs pointed at one lock dir would share a cap they do not expect to.
109
113
  # effect: deployment
110
114
  CLEAROTRON_RUN_LOCK_DIR=
111
- # Delivery outbox dir (instant handoff-mode delivery wake). Default = $CLEAROTRON_WORK_DIR/prelim-outbox.
115
+ # Delivery outbox dir (instant handoff-mode delivery wake). Default = $CLEAROTRON_WORK_DIR/clearance-outbox.
116
+ # Was `prelim-outbox`. A box that never set this keeps its markers there and they are still read and drained;
117
+ # new markers are written under the new name. Nothing to move.
112
118
  # effect: deployment
113
119
  CLEAROTRON_OUTBOX_DIR=
120
+ # Where the shared register CALL ledger lives — the per-query record the register spend is counted from.
121
+ # Default = ~/trademark/telemetry/register-calls.jsonl. An install that moves or clears it changes what a
122
+ # later cost read can account for, and nothing else records where it went.
123
+ # effect: deployment
124
+ CLEAROTRON_REGISTER_CALL_LOG=
125
+ # Where the register RECORD log lives — the fetched-record store a "verified from the record" claim on a
126
+ # report joins against. Resolved by EXISTENCE over several directories and filenames, not by name alone,
127
+ # so that an install which inherited an older path keeps reading its own ledger; setting this overrides
128
+ # that ladder outright. An install pointed at an empty path reports no fetched records and no fault.
129
+ # effect: deployment
130
+ CLEAROTRON_REGISTER_RECORD_LOG=
114
131
  # HEADLESS intake: one explicit queue dir (no agent workspaces needed) — the enqueue CLI + ops-MCP
115
132
  # start_run write here and the runner drains it (additive to the workspace scan). See docs/INTAKE.md.
116
133
  CLEAROTRON_QUEUE_DIR=
@@ -181,19 +198,20 @@ CLEAROTRON_DATABASE=clarivate
181
198
 
182
199
 
183
200
  # -----------------------------------------------------------------------------
184
- # 2. MODEL / API CREDS (Anthropic subscription/API + the Azure catalog id)
201
+ # 2. MODEL / API CREDS (a subscription, an API key, or your own cloud account)
185
202
  # -----------------------------------------------------------------------------
186
203
  # Anthropic API key. NOTE: the anthropic-agent engine STRIPS this from the `claude -p`
187
- # subprocess by default so it bills the OAuth SUBSCRIPTION (cheaper), not the API. Keep it set
188
- # for the gateway + as the api-key fallback (see CLEAROTRON_AI_BILLING).
204
+ # subprocess unless CLEAROTRON_AI_BILLING=api-key, so the subscription or your cloud account pays, not
205
+ # the API. A gateway's credential is ANTHROPIC_AUTH_TOKEN (below).
189
206
  ANTHROPIC_API_KEY=sk-ant-...
190
207
  # The headless subscription sign-in's token. `claude setup-token` — run on any
191
208
  # machine you can sign in on — prints it; setup captures it by paste. The stage subprocess inherits it
192
- # untouched in both billing modes (spawnEnv strips only the API key), so this row is the whole
209
+ # untouched in every billing mode (spawnEnv strips only the API key), so this row is the whole
193
210
  # mechanism by which a browserless server authenticates the subscription lane.
194
211
  # external: read by the claude CLI itself, not by this product's code — inheritance is the contract
195
212
  CLAUDE_CODE_OAUTH_TOKEN=
196
- # Auth mode for the engine: "subscription" (default) or "api-key". It applies to WHICHEVER engine
213
+ # Auth mode for the engine: "subscription" (default), "api-key", or "cloud" for Claude through your own
214
+ # cloud account (the block below this setting). It applies to WHICHEVER engine
197
215
  # CLEAROTRON_AI names, and each engine reads a DIFFERENT key under "api-key" — this is the pairing to
198
216
  # get right, because the wrong one is refused at the run door rather than at setup:
199
217
  #
@@ -204,6 +222,16 @@ CLAUDE_CODE_OAUTH_TOKEN=
204
222
  # `npm run setup` asks this as its own question, adopts the key, and proves the pair with one cheap
205
223
  # turn before writing anything — so a hand-edit here is the second-best route.
206
224
  CLEAROTRON_AI_BILLING=subscription
225
+ # CLAUDE THROUGH YOUR OWN CLOUD ACCOUNT: CLEAROTRON_AI_BILLING=cloud, anthropic-agent only. The Claude
226
+ # program reads those names itself; Clearotron has none of its own there. A search is refused unless
227
+ # exactly one cloud is switched on or a gateway URL alone is named, and refused with a switch left on
228
+ # under subscription or api-key. Every run records which cloud paid.
229
+ #
230
+ # The settings themselves are not listed here, because this file is the short one a reader meets first
231
+ # and the cloud rows are sixteen of them. INSTALL.md §3b walks the three clouds and the gateway, and the
232
+ # configuration reference's credentials table gives every name with what reads it. `npm run setup` asks
233
+ # for the same things and proves them with one turn, which is the route to prefer either way.
234
+ #
207
235
  # The api-key credential for openai-agent. Only read when CLEAROTRON_AI=openai-agent and
208
236
  # CLEAROTRON_AI_BILLING=api-key; under "subscription" that engine reads ~/.codex/auth.json instead and
209
237
  # refuses before spending if it is absent, so subscription is not the precondition-free option there.
@@ -214,17 +242,6 @@ CODEX_API_KEY=
214
242
  # set needs to know it is removed, not because setting it here does anything: it never serves as the
215
243
  # api-key credential — CODEX_API_KEY does.
216
244
  OPENAI_API_KEY=
217
- # Azure OpenAI provider creds. RECONSTRUCTED: only $AZURE_OPENAI_DEPLOYMENT is referenced in this
218
- # repo (as the rendered catalog id); these follow the azure-openai provider convention of the agent
219
- # platform that consumes them, NOT this repo directly. Verify the exact names against that platform's
220
- # own configuration at deploy — that config belongs to it and is not in this tree under any name.
221
- # There was never a reader HERE to retire, which is what separates these rows from a stranded one — and
222
- # the line below is what tells the catalogue guard so.
223
- # external: the agent platform's azure-openai provider config
224
- AZURE_OPENAI_API_KEY=changeme
225
- AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
226
- AZURE_OPENAI_DEPLOYMENT=gpt-5.4
227
- AZURE_OPENAI_API_VERSION=2024-10-21
228
245
 
229
246
 
230
247
  # -----------------------------------------------------------------------------
@@ -480,6 +497,21 @@ CLEAROTRON_CUT_REF=
480
497
  # effect: tuning
481
498
  CLEAROTRON_RELEASE_WAIT_MS=
482
499
 
500
+ # Whether this release run was dispatched to cut. The workflow sets `true` on a `workflow_dispatch` that
501
+ # is not a rehearsal, and `false` otherwise. Set, a wait that expires with no version published is a
502
+ # failure that names why, because the one thing the run was dispatched for did not happen; a push or the
503
+ # schedule asks nothing of the wait, so expiry there stays a quiet success. Read by
504
+ # scripts/release-await-cut.mjs.
505
+ # effect: tuning
506
+ CLEAROTRON_CUT_REQUESTED=
507
+
508
+ # The number of the version pull request the same run opened, so a failed wait reads why that pull
509
+ # request did not merge rather than guessing. The workflow sets it from the version job's output. Unset,
510
+ # or not a whole number, a dispatched wait says it found no pull request to wait on. Read by
511
+ # scripts/release-await-cut.mjs.
512
+ # effect: tuning
513
+ CLEAROTRON_CUT_PR=
514
+
483
515
  # A GitHub token carrying Actions read and write. The release workflow supplies it from a repository
484
516
  # secret so that a cut does not wait for a person to approve the version pull request's parked CI run:
485
517
  # that run is authored by the repository's own Actions bot, and GitHub parks bot-authored runs as
package/CONTRIBUTING.md CHANGED
@@ -54,7 +54,7 @@ Four more things run for free:
54
54
  | Command | What it proves |
55
55
  |---|---|
56
56
  | `node mcp-server/smoke.mjs` | Drives the real MCP server over stdio against a built fixture. Prints `SMOKE OK`. |
57
- | `node driver/dev-portal.mjs` | Serves a pool at `http://127.0.0.1:18899/` — archive index, reports, customer pages. Loopback only; it refuses any other host. Needs a pool to point at (`CLEAROTRON_REPORTS_DIR`). |
57
+ | `node driver/dev-portal.mjs` | Serves a pool at `http://127.0.0.1:18899/` — archive index, reports, company pages. Loopback only; it refuses any other host. Needs a pool to point at (`CLEAROTRON_REPORTS_DIR`). |
58
58
  | The $0 mock pipeline | A full run — intake, every stage, publish, delivery packet — on a mocked engine. Recipe in [docs/E2E.md § Tier 1](docs/E2E.md). Follow it as written; the absolute-path trap in it catches everybody. |
59
59
  | `npx clearotron demo` | Replays `demo/` — a real run on a fictional mark — through the real publisher into `~/trademark-demo/pool` and serves it. No keys, no model, no engine. |
60
60
 
@@ -75,7 +75,7 @@ half did not run. `npx clearotron install` walks through both, and
75
75
  [INSTALL.md § 1](INSTALL.md#1-prerequisites) is the full list.
76
76
 
77
77
  **The scenario suite is private by design.** `scripts/e2e.mjs` scores runs against lawyer-written
78
- reference answers on real matters; the references and the config store they load from are client work
78
+ reference answers on real matters; the references and the config store they load from are company work
79
79
  product and will not be published. Its absence weakens nothing you can run — the in-repo suite covers
80
80
  the machinery, and the scenario suite covers the answers. The validation ladder, from the $0 offline
81
81
  suite to a paid live run, is [docs/E2E.md](docs/E2E.md).
@@ -130,13 +130,13 @@ The reviewer is the check. Say what you checked in the PR rather than citing a p
130
130
  **3. Types are enforced, and `vite build` does not typecheck.** `npm run typecheck -w portal-ui`
131
131
  runs as its own CI step. Run it before you push.
132
132
 
133
- **4. Every sentence a customer reads is written against the standard, and five classes of it are
133
+ **4. Every sentence a company reads is written against the standard, and five classes of it are
134
134
  checked.** The standard is [`docs/writing-standard.md`](docs/writing-standard.md); the prose rules
135
135
  under it are [`docs/writing-rules.md`](docs/writing-rules.md), and they apply first. Together they
136
136
  bind report HTML, portal screens, the README and the docs.
137
137
 
138
138
  `node scripts/writing-standard-check.mjs` refuses what your change ADDS to one of those surfaces:
139
- an engineering identifier in text a client reads, a reviewer-only marker in rendered output, a known
139
+ an engineering identifier in text a company reads, a reviewer-only marker in rendered output, a known
140
140
  caveat sentence, a screen that writes its own page heading instead of using `PageHeader`, and a lede
141
141
  whose words are all already in its title. It names the class and prints the line. It never rewrites —
142
142
  a rewritten sentence is a sentence nobody reviewed.
@@ -153,7 +153,7 @@ identifier, no caveat and no banned word and still be the thing the standard exi
153
153
  heading that restates its section, a paragraph explaining what the reader can already see, a sentence
154
154
  that only works if you know how the engine is built.
155
155
 
156
- So: **a pull request that changes text a customer reads is reviewed against the rendered page or
156
+ So: **a pull request that changes text a company reads is reviewed against the rendered page or
157
157
  report, not against the diff.** One reviewer reads it as someone who has never seen this product and
158
158
  asks one question of every new sentence — *what would a reader with zero context think this means?*
159
159
  If the answer needs the codebase, the sentence is cut or rewritten. One reviewer, one question,
@@ -288,9 +288,9 @@ narrower is usually the defect rather than the fix, and it will be read that way
288
288
 
289
289
  ### The three possible outcomes
290
290
 
291
- **Into the base layer.** Your change becomes part of what every install gets, including ours and our
292
- clients'. That is the highest bar: it has to be an improvement for the matters this doctrine is tuned
293
- for, not only for yours.
291
+ **Into the base layer.** Your change becomes part of what every install gets, including ours and the
292
+ installs we run for companies. That is the highest bar: it has to be an improvement for the matters
293
+ this doctrine is tuned for, not only for yours.
294
294
 
295
295
  **Published as a pack.** Doctrine resolves file by file — an install can point at another directory and
296
296
  have its files win, with everything it does not override falling through to ours. So a change that is