clearotron 0.6.0 → 0.7.0-beta.1

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 (146) hide show
  1. package/INSTALL.md +7 -4
  2. package/QUICKSTART.md +1 -0
  3. package/README.md +5 -2
  4. package/THIRD-PARTY-NOTICES.md +1 -1
  5. package/bin/clearotron.mjs +4 -2
  6. package/bin/onboard.mjs +158 -29
  7. package/build-info.json +2 -2
  8. package/docs/CLIENT-MCP.md +3 -1
  9. package/docs/DELIVERY.md +6 -3
  10. package/docs/architecture/02-architecture.md +1 -1
  11. package/docs/architecture/04-configuration-reference.md +105 -8
  12. package/docs/branding.md +4 -4
  13. package/docs/report-data/clearance-1.schema.json +320 -0
  14. package/docs/report-data/knockout-1.schema.json +268 -0
  15. package/driver/CHANGELOG.md +77 -0
  16. package/driver/cancel.mjs +19 -0
  17. package/driver/connotation-search.mjs +1 -1
  18. package/driver/contract-e3-backlog.mjs +41 -41
  19. package/driver/contract-vocabulary.mjs +1 -1
  20. package/driver/coverage-ledger.mjs +18 -2
  21. package/driver/deferral-row.mjs +1 -1
  22. package/driver/degraded-parts.mjs +1 -0
  23. package/driver/driver.config.mjs +5 -5
  24. package/driver/effective-scope.mjs +3 -1
  25. package/driver/engagement-receipt.mjs +3 -3
  26. package/driver/engine/anthropic-agent.mjs +15 -1
  27. package/driver/engine/common.mjs +7 -0
  28. package/driver/engine/mcp/band-server.mjs +7 -16
  29. package/driver/engine/mcp/codex-config.mjs +3 -0
  30. package/driver/engine/mcp/recording-server.mjs +45 -34
  31. package/driver/engine/openai-agent.mjs +74 -7
  32. package/driver/engine/session-record.mjs +44 -2
  33. package/driver/findings-model.mjs +14 -2
  34. package/driver/follow-up-twins.mjs +86 -0
  35. package/driver/gateway.mjs +77 -12
  36. package/driver/jx-units.mjs +3 -1
  37. package/driver/jx.mjs +13 -5
  38. package/driver/manuals-inline.mjs +98 -0
  39. package/driver/manuals-seen.mjs +134 -0
  40. package/driver/mark-logos.mjs +174 -0
  41. package/driver/methodology-witness.mjs +2 -1
  42. package/driver/owner-use-check.mjs +8 -4
  43. package/driver/package.json +1 -1
  44. package/driver/pipeline-knockout.mjs +23 -4
  45. package/driver/pipeline.mjs +128 -15
  46. package/driver/portal-local-auth.mjs +6 -2
  47. package/driver/portal-report.mjs +45 -14
  48. package/driver/portal-routes/me.mjs +4 -1
  49. package/driver/portal-runs.mjs +19 -16
  50. package/driver/predelivery-lint.mjs +7 -5
  51. package/driver/profiles.mjs +4 -4
  52. package/driver/publish/README.md +9 -7
  53. package/driver/publish/email-conditions.mjs +22 -5
  54. package/driver/publish/evidence-words.mjs +21 -0
  55. package/driver/publish/index.mjs +304 -211
  56. package/driver/publish/knockout.mjs +297 -247
  57. package/driver/publish/office-record-links.mjs +11 -9
  58. package/driver/publish/page-shell.mjs +98 -0
  59. package/driver/publish/pool-admin.mjs +2 -2
  60. package/driver/publish/publish-inputs.mjs +4 -0
  61. package/driver/publish/regions.mjs +28 -3
  62. package/driver/publish/register-record-html.mjs +105 -0
  63. package/driver/publish/register-record.mjs +165 -0
  64. package/driver/publish/render-knockout.mjs +299 -671
  65. package/driver/publish/render.mjs +561 -492
  66. package/driver/publish/report-data.mjs +226 -13
  67. package/driver/publish/report-document.mjs +353 -0
  68. package/driver/publish/search-depth.mjs +88 -7
  69. package/driver/publish/shell.mjs +41 -1
  70. package/driver/publish/strings.mjs +810 -0
  71. package/driver/publish/templates/clearance-print.css +23 -0
  72. package/driver/publish/templates/knockout.css +224 -0
  73. package/driver/publish/templates/report.css +112 -53
  74. package/driver/publish/xlsx.mjs +158 -139
  75. package/driver/record-goods.mjs +42 -0
  76. package/driver/reference-score.mjs +4 -1
  77. package/driver/register-count.mjs +5 -1
  78. package/driver/register-reach.mjs +39 -0
  79. package/driver/registry-fidelity.mjs +155 -37
  80. package/driver/repair-composers.mjs +7 -3
  81. package/driver/repair-targets.mjs +4 -1
  82. package/driver/replay-archive.mjs +4 -3
  83. package/driver/run-delivered.mjs +14 -8
  84. package/driver/run-record.mjs +1 -0
  85. package/driver/runner.mjs +73 -29
  86. package/driver/scope-facts.mjs +27 -6
  87. package/driver/search-policy.mjs +9 -4
  88. package/driver/skills/clearance-search/report-prose.md +3 -0
  89. package/driver/skills/knockout-assess/SKILL.md +8 -0
  90. package/driver/stage-freshness.mjs +8 -5
  91. package/driver/stages.mjs +69 -43
  92. package/driver/steps/delivery.mjs +9 -5
  93. package/driver/steps/overview-and-cards.mjs +54 -15
  94. package/driver/steps/register-sweep.mjs +5 -4
  95. package/driver/steps/skeptic-and-follow-up.mjs +3 -2
  96. package/driver/steps/verdict-gate.mjs +35 -14
  97. package/driver/suite-census.json +579 -87
  98. package/driver/synthesis-record.mjs +4 -3
  99. package/driver/terminal-clamp.mjs +6 -1
  100. package/driver/withdrawn-rating.mjs +72 -0
  101. package/mcp-server/CHANGELOG.md +8 -0
  102. package/mcp-server/lib/audit-view.mjs +5 -2
  103. package/mcp-server/lib/brief.mjs +6 -2
  104. package/mcp-server/lib/evidence.mjs +94 -23
  105. package/mcp-server/lib/findings.mjs +19 -2
  106. package/mcp-server/lib/knockout.mjs +13 -4
  107. package/mcp-server/lib/scrub.mjs +1 -1
  108. package/mcp-server/package.json +1 -1
  109. package/mcp-server/server.mjs +22 -3
  110. package/package.json +4 -1
  111. package/portal-ui/dist/assets/{index-CYaO2ygd.js → index-BBlN4CYq.js} +238 -80
  112. package/portal-ui/dist/assets/{index-izLa9apq.css → index-CxAkJXIT.css} +25 -5
  113. package/portal-ui/dist/index.html +2 -2
  114. package/portal-ui/package.json +3 -3
  115. package/providers/_shared/ledger.mjs +30 -2
  116. package/providers/_shared/record-uri.mjs +15 -0
  117. package/providers/clarivate/src/adapter.js +11 -0
  118. package/providers/clarivate/src/core.js +17 -1
  119. package/providers/jx/src/core.js +4 -4
  120. package/providers/jx/src/judge.js +1 -3
  121. package/providers/jx/src/nativeread.js +1 -3
  122. package/providers/oauth-mcp-bridge/CHANGELOG.md +8 -0
  123. package/providers/oauth-mcp-bridge/package.json +1 -1
  124. package/scripts/README.md +147 -3
  125. package/scripts/added-reference-check.mjs +35 -7
  126. package/scripts/e2e-first-time.mjs +4 -4
  127. package/scripts/env-audit.mjs +16 -9
  128. package/scripts/freeze-example-run.mjs +3 -3
  129. package/scripts/mint-public-residue.mjs +3 -3
  130. package/scripts/mint-search-level-tags.mjs +61 -0
  131. package/scripts/mint-source-pin-census.mjs +89 -0
  132. package/scripts/release-note-required.mjs +65 -6
  133. package/scripts/test-durations-reporter.mjs +25 -0
  134. package/scripts/test-full.mjs +72 -18
  135. package/scripts/test-run.mjs +18 -1
  136. package/shared/brand.mjs +93 -6
  137. package/shared/inline-markdown.mjs +53 -0
  138. package/shared/names-in-force.mjs +0 -1
  139. package/shared/portal-tokens.mjs +2 -1
  140. package/shared/reference-guard-classes.mjs +43 -2
  141. package/shared/register-selection.mjs +8 -3
  142. package/shared/search-level-tags.json +25 -0
  143. package/shared/source-spans.mjs +91 -0
  144. package/shared/tools/derive-band-pairs.mjs +10 -0
  145. package/driver/own-rights.mjs +0 -83
  146. package/driver/use-check.mjs +0 -85
@@ -11474,6 +11474,7 @@ function notCommitted(r) {
11474
11474
  if (!detail || !detail.trim()) return null;
11475
11475
  return "Saved, and live — but it was not committed to the store, so it can be lost. Tell an administrator before relying on it.";
11476
11476
  }
11477
+ var PRODUCT_NAME = "Clearotron";
11477
11478
  var operatorName = (brand, opts) => brand || (opts?.lead ? "The operator" : "the operator");
11478
11479
  var asString = (v) => typeof v === "string" && v ? v : null;
11479
11480
  var asNumber = (v) => typeof v === "number" && Number.isFinite(v) ? v : null;
@@ -11551,7 +11552,6 @@ var decodeRun = (raw) => {
11551
11552
  tone: asTone(mm["tone"])
11552
11553
  } : null;
11553
11554
  }).filter((m) => m !== null),
11554
- reportSchema: asNumber(r["reportSchema"]),
11555
11555
  held: r["held"] === true,
11556
11556
  report: asString(r["report"]),
11557
11557
  reports: Array.isArray(r["reports"]) ? r["reports"].flatMap((x) => {
@@ -11870,6 +11870,7 @@ var api = {
11870
11870
  setupRoute: b["setupRoute"] === "packaged" ? "packaged" : b["setupRoute"] === "checkout" ? "checkout" : null,
11871
11871
  channel: b["channel"] === "beta" ? "beta" : b["channel"] === "latest" ? "latest" : null,
11872
11872
  brand: typeof b["brand"] === "string" ? b["brand"] : "",
11873
+ brandName: typeof b["brandName"] === "string" && b["brandName"].trim() ? b["brandName"].trim() : PRODUCT_NAME,
11873
11874
  administratorContact: typeof b["administratorContact"] === "string" && /^(mailto:[^\s]+@|https?:\/\/[^\s])/i.test(b["administratorContact"]) ? b["administratorContact"] : null,
11874
11875
  stopControl: (() => {
11875
11876
  const c = asRecord(asRecord(b["controls"])["stop"]);
@@ -12653,6 +12654,7 @@ function Icon({ name, size = 17, className }) {
12653
12654
  }
12654
12655
  // src/components/Logo.tsx
12655
12656
  var WORDMARK = "clearotron";
12657
+ var wordmarkFor = (brandName) => brandName === "Clearotron" ? WORDMARK : brandName;
12656
12658
  function BracketMark({ size = 20 }) {
12657
12659
  return (0, import_jsx_runtime.jsxs)("svg", {
12658
12660
  viewBox: "0 0 24 24",
@@ -12716,13 +12718,15 @@ function BracketMark({ size = 20 }) {
12716
12718
  ]
12717
12719
  });
12718
12720
  }
12719
- function Logo({ markOnly = false }) {
12721
+ function Logo({ markOnly = false, brandName = PRODUCT_NAME }) {
12720
12722
  return (0, import_jsx_runtime.jsxs)("span", {
12721
12723
  style: {
12722
12724
  display: "inline-flex",
12723
12725
  alignItems: "center",
12724
12726
  gap: 10,
12725
- whiteSpace: "nowrap"
12727
+ whiteSpace: "nowrap",
12728
+ maxWidth: "100%",
12729
+ minWidth: 0
12726
12730
  },
12727
12731
  children: [(0, import_jsx_runtime.jsx)("span", {
12728
12732
  style: {
@@ -12738,9 +12742,13 @@ function Logo({ markOnly = false }) {
12738
12742
  letterSpacing: ".02em",
12739
12743
  color: "var(--text-strong)",
12740
12744
  lineHeight: 1,
12741
- whiteSpace: "nowrap"
12745
+ whiteSpace: "nowrap",
12746
+ overflow: "hidden",
12747
+ textOverflow: "ellipsis",
12748
+ minWidth: 0
12742
12749
  },
12743
- children: WORDMARK
12750
+ title: brandName === "Clearotron" ? void 0 : brandName,
12751
+ children: wordmarkFor(brandName)
12744
12752
  })]
12745
12753
  });
12746
12754
  }
@@ -12995,7 +13003,7 @@ function accessSentence(input) {
12995
13003
  const who = typed || "This person";
12996
13004
  const { run, manage } = input.permissions;
12997
13005
  const can = run && manage ? "can run clearances and add companies and people there" : run ? "can run clearances there" : manage ? "can add companies and people there" : "can read every report there";
12998
- const places = input.everything ? "everything on this Clearotron, including organisations added later" : input.organisations.length || input.companies.length ? `everything ${joinWords([...input.organisations, ...input.companies.map((c) => c.name)].map((p) => `under ${p}`))}` : null;
13006
+ const places = input.everything ? `everything on ${input.installation}, including organisations added later` : input.organisations.length || input.companies.length ? `everything ${joinWords([...input.organisations, ...input.companies.map((c) => c.name)].map((p) => `under ${p}`))}` : null;
12999
13007
  if (!places) return `Choose what ${typed || "this person"} can see. It is what they see here and through their AI.`;
13000
13008
  const partial = input.everything ? [] : [...new Set(input.companies.map((c) => c.organisation))].filter((o) => !input.organisations.includes(o));
13001
13009
  const cannot = !run && !manage ? "cannot start clearances or add companies or people" : !run ? "cannot start clearances" : !manage ? "cannot add companies or people" : null;
@@ -13297,6 +13305,10 @@ function AppShell({ render }) {
13297
13305
  setDrawer(false);
13298
13306
  setAvatarOpen(false);
13299
13307
  }, [path]);
13308
+ const brandName = meResult?.kind === "ok" ? meResult.value.brandName : PRODUCT_NAME;
13309
+ (0, import_react.useEffect)(() => {
13310
+ if (brandName !== "Clearotron") document.title = `${brandName} · Trademark clearance`;
13311
+ }, [brandName]);
13300
13312
  if (!meResult) return (0, import_jsx_runtime.jsx)("div", {
13301
13313
  className: "screen",
13302
13314
  children: (0, import_jsx_runtime.jsx)("p", { children: "Loading…" })
@@ -13398,8 +13410,11 @@ function AppShell({ render }) {
13398
13410
  className: "nav-item",
13399
13411
  style: { padding: "4px 6px" },
13400
13412
  onClick: () => go(HOME.path),
13401
- "aria-label": `${WORDMARK} — go to ${HOME.label.toLowerCase()}`,
13402
- children: (0, import_jsx_runtime.jsx)(Logo, { markOnly: collapsed && !mobile })
13413
+ "aria-label": `${wordmarkFor(me.brandName)} — go to ${HOME.label.toLowerCase()}`,
13414
+ children: (0, import_jsx_runtime.jsx)(Logo, {
13415
+ markOnly: collapsed && !mobile,
13416
+ brandName: me.brandName
13417
+ })
13403
13418
  })
13404
13419
  }),
13405
13420
  (0, import_jsx_runtime.jsxs)("div", {
@@ -13454,7 +13469,7 @@ function AppShell({ render }) {
13454
13469
  }) : null
13455
13470
  ]
13456
13471
  }),
13457
- (0, import_jsx_runtime.jsxs)("div", {
13472
+ (0, import_jsx_runtime.jsxs)("main", {
13458
13473
  className: "main",
13459
13474
  children: [
13460
13475
  (0, import_jsx_runtime.jsxs)("header", {
@@ -14740,6 +14755,12 @@ function takeOverOwnTerritories(d, own, without) {
14740
14755
  replacesOwnTerritories: true
14741
14756
  };
14742
14757
  }
14758
+ function barWhere(d, own, words) {
14759
+ if (words.worldwideOnly) return words.worldwideLine;
14760
+ if (d.territories.length) return d.territories.map(territoryCode).join(", ");
14761
+ if (own.length && !d.replacesOwnTerritories) return own.map(territoryCode).join(", ");
14762
+ return d.replacesOwnTerritories ? words.worldwideLine : words.unset;
14763
+ }
14743
14764
  function geographyFor(d, product = null, resolved = []) {
14744
14765
  if (product?.geography === "worldwide, and nothing else") return {
14745
14766
  mode: "worldwide",
@@ -14771,7 +14792,7 @@ function toggleNativeLanguage(d, product) {
14771
14792
  };
14772
14793
  }
14773
14794
  function chooseProduct(d, product) {
14774
- const territories = product?.geography === "worldwide, and nothing else" ? [] : product?.geography === "exactly one country" ? d.territories.filter((t) => tierOf(t) === "country").slice(0, 1) : d.territories;
14795
+ const territories = product?.geography === "worldwide, and nothing else" ? [] : product?.geography === "exactly one country" ? d.territories.filter((t) => tierOfPlace(t) === "country").slice(0, 1) : d.territories;
14775
14796
  return {
14776
14797
  product: product?.key ?? null,
14777
14798
  territories,
@@ -14781,7 +14802,7 @@ function chooseProduct(d, product) {
14781
14802
  }
14782
14803
  var TIER_OF_CODE = Object.freeze(Object.fromEntries([...offered_territories_default.regions.map((t) => [t.code, "region"]), ...offered_territories_default.countries.map((t) => [t.code, "country"])]));
14783
14804
  var tierOfPlace = (place) => tierOf(place) ?? TIER_OF_CODE[territoryKeyOf(place)] ?? null;
14784
- function recommendSearch(products, names, territories, { own = false } = {}) {
14805
+ function recommendSearch(products, names, territories, { own = false, fromProject = false } = {}) {
14785
14806
  if (territories.length === 0 && names <= 1) return null;
14786
14807
  const live = products.filter((p) => p.available);
14787
14808
  if (names > 1) {
@@ -14798,10 +14819,10 @@ function recommendSearch(products, names, territories, { own = false } = {}) {
14798
14819
  const product = live.find((p) => p.pipeline !== "knockout" && p.geography === geography);
14799
14820
  if (!product) return null;
14800
14821
  const some = (n, one, many) => n === 1 ? `a ${one}` : `${n} ${many}`;
14801
- const named = [regions ? some(regions, "region", "regions") : "", countries ? some(countries, "country", "countries") : ""].filter(Boolean);
14822
+ const places = [regions ? some(regions, "region", "regions") : "", countries ? some(countries, "country", "countries") : ""].filter(Boolean).join(" and ");
14802
14823
  return {
14803
14824
  product,
14804
- reason: own ? `because the company searches ${named.join(" and ")}` : `because you named ${named.join(" and ")}`
14825
+ reason: !own ? `because you named ${places}` : fromProject ? `because the project searches ${places}` : `because the company searches ${places}`
14805
14826
  };
14806
14827
  }
14807
14828
  function templateLine(label, product) {
@@ -15267,6 +15288,7 @@ function inherited({ profile, projectEffective, projectOrigins, ownerLabel, proj
15267
15288
  classesFrom: fromProject && projectLabel ? `from ${projectLabel}` : `from ${ownerLabel}`,
15268
15289
  territories: strings(source["defaultJurisdictions"]),
15269
15290
  territoriesFrom: projectOrigins?.["defaultJurisdictions"] === "project" && projectLabel ? `from ${projectLabel}` : `from ${ownerLabel}`,
15291
+ territoriesFromProject: projectOrigins?.["defaultJurisdictions"] === "project" && Boolean(projectLabel),
15270
15292
  platforms: strings(source["platforms"]),
15271
15293
  density: typeof source["marketplaceDensity"] === "string" ? source["marketplaceDensity"] : null
15272
15294
  };
@@ -16878,6 +16900,40 @@ function AskAi({ runId, markSlug = null, markName, date, kind, productName, acce
16878
16900
  ]
16879
16901
  });
16880
16902
  }
16903
+ // src/contract/levelTags.ts
16904
+ var SEARCH_LEVELS = {
16905
+ _generated: "by scripts/mint-search-level-tags.mjs from driver/search-policy.mjs PRODUCT_POLICIES — do not edit; re-mint",
16906
+ levels: [
16907
+ {
16908
+ "product": "knockout-search",
16909
+ "tag": "KO",
16910
+ "name": "Knockout search"
16911
+ },
16912
+ {
16913
+ "product": "global-preliminary-search",
16914
+ "tag": "Prelim",
16915
+ "name": "Global preliminary search"
16916
+ },
16917
+ {
16918
+ "product": "multi-country-focus-search",
16919
+ "tag": "Multi",
16920
+ "name": "Multi-country focus search"
16921
+ },
16922
+ {
16923
+ "product": "full-country-search",
16924
+ "tag": "Full",
16925
+ "name": "Full country search"
16926
+ }
16927
+ ]
16928
+ }.levels;
16929
+ new Map(SEARCH_LEVELS.map((l) => [l.product, l]));
16930
+ function atLevel(run, filter) {
16931
+ return filter === "all" || run.product === filter;
16932
+ }
16933
+ function levelsOf(runs) {
16934
+ const held = new Set(runs.map((r) => r.product));
16935
+ return SEARCH_LEVELS.filter((l) => held.has(l.product));
16936
+ }
16881
16937
  // src/screens/Clearances.tsx
16882
16938
  var FIRST_CLICK_DESC = {
16883
16939
  date: true,
@@ -16918,6 +16974,7 @@ function Clearances({ ctx }) {
16918
16974
  setTableWidth(el.clientWidth);
16919
16975
  }, []);
16920
16976
  const [filter, setFilter] = (0, import_react.useState)("all");
16977
+ const [level, setLevel] = (0, import_react.useState)("all");
16921
16978
  const [sort, setSort] = (0, import_react.useState)({
16922
16979
  key: "date",
16923
16980
  desc: true
@@ -16969,6 +17026,7 @@ function Clearances({ ctx }) {
16969
17026
  const marks = marksOf(runs.filter((r) => {
16970
17027
  if (filter === "finished" && !TERMINAL.has(r.state)) return false;
16971
17028
  if (filter === "progress" && TERMINAL.has(r.state)) return false;
17029
+ if (!atLevel(r, level)) return false;
16972
17030
  if (q && !displayName(r).toLowerCase().includes(q) && !r.marks.some((m) => m.name.toLowerCase().includes(q))) return false;
16973
17031
  return true;
16974
17032
  }), families).filter((m) => filter === "failed" === (m.current.state === "failed"));
@@ -16985,6 +17043,7 @@ function Clearances({ ctx }) {
16985
17043
  }, [
16986
17044
  runs,
16987
17045
  filter,
17046
+ level,
16988
17047
  query,
16989
17048
  sort,
16990
17049
  grouped,
@@ -17182,6 +17241,29 @@ function Clearances({ ctx }) {
17182
17241
  children: label
17183
17242
  }, k))
17184
17243
  }),
17244
+ (0, import_jsx_runtime.jsxs)("div", {
17245
+ className: "segmented",
17246
+ role: "group",
17247
+ "aria-label": "Filter by search",
17248
+ children: [(0, import_jsx_runtime.jsx)("button", {
17249
+ type: "button",
17250
+ "aria-pressed": level === "all",
17251
+ onClick: () => {
17252
+ setLevel("all");
17253
+ resetPage();
17254
+ },
17255
+ children: "All"
17256
+ }), SEARCH_LEVELS.map((l) => (0, import_jsx_runtime.jsx)("button", {
17257
+ type: "button",
17258
+ "aria-pressed": level === l.product,
17259
+ title: l.name,
17260
+ onClick: () => {
17261
+ setLevel(l.product);
17262
+ resetPage();
17263
+ },
17264
+ children: l.tag
17265
+ }, l.product))]
17266
+ }),
17185
17267
  groupable ? (0, import_jsx_runtime.jsxs)("label", {
17186
17268
  className: "group-toggle",
17187
17269
  children: [(0, import_jsx_runtime.jsx)("input", {
@@ -17318,7 +17400,10 @@ function Clearances({ ctx }) {
17318
17400
  padding: "22px 12px",
17319
17401
  color: "var(--text-muted)"
17320
17402
  },
17321
- children: "No clearances match this view. Pick another company above, or widen the status filter."
17403
+ children: (0, import_jsx_runtime.jsx)("span", {
17404
+ className: "list-empty",
17405
+ children: "No clearances match this view. Pick another company above, or widen the filters."
17406
+ })
17322
17407
  }) }) : null, visible.map((r, i) => {
17323
17408
  const before = visible[i - 1];
17324
17409
  const newGroup = grouped && (!before || runKey(r) !== runKey(before));
@@ -17370,10 +17455,6 @@ function Clearances({ ctx }) {
17370
17455
  })
17371
17456
  }),
17372
17457
  (0, import_jsx_runtime.jsx)(PinnedScrollbar, { target: namesWrapEl }),
17373
- !rows.length ? (0, import_jsx_runtime.jsx)("div", {
17374
- className: "empty",
17375
- children: "No names match this view."
17376
- }) : null,
17377
17458
  canGroup && retired.length ? (0, import_jsx_runtime.jsxs)("div", {
17378
17459
  style: { marginTop: 18 },
17379
17460
  children: [(0, import_jsx_runtime.jsx)("button", {
@@ -17714,6 +17795,17 @@ function FamilyRows({ family, isOpen, onToggle, go, picking, showOwner = false,
17714
17795
  askMenu
17715
17796
  }, m.id)) : null] });
17716
17797
  }
17798
+ function LevelTags({ levels }) {
17799
+ if (!levels.length) return null;
17800
+ return (0, import_jsx_runtime.jsx)("div", {
17801
+ className: "level-tags",
17802
+ children: levels.map((l) => (0, import_jsx_runtime.jsx)("span", {
17803
+ className: "pill",
17804
+ title: l.name,
17805
+ children: l.tag
17806
+ }, l.product))
17807
+ });
17808
+ }
17717
17809
  function MarkRow({ mark, open, onToggle, go, indent = false, picking = false, showOwner = false, ownerLabel = "", picked = false, onPick, onRetire, onRetireRun, askAi, askMenu }) {
17718
17810
  const run = mark.current;
17719
17811
  const threaded = mark.reads.length > 1;
@@ -17762,7 +17854,8 @@ function MarkRow({ mark, open, onToggle, go, indent = false, picking = false, sh
17762
17854
  style: { marginLeft: 8 },
17763
17855
  title: `An earlier search of this name came back ${mark.improvedFrom}. The row shows where it stands now.`,
17764
17856
  children: ["was ", mark.improvedFrom]
17765
- }) : null
17857
+ }) : null,
17858
+ (0, import_jsx_runtime.jsx)(LevelTags, { levels: levelsOf(mark.reads) })
17766
17859
  ] }),
17767
17860
  showOwner ? (0, import_jsx_runtime.jsx)("td", {
17768
17861
  "data-anon": "mark",
@@ -18012,7 +18105,17 @@ function AllowanceLine({ account, brand }) {
18012
18105
  });
18013
18106
  }
18014
18107
  // src/contract/inlineMd.ts
18015
- var INLINE = /\*\*([^*]+)\*\*|\*([^*]+)\*|`([^`]+)`/g;
18108
+ var INLINE = /\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|\*([^*]+)\*|`([^`]+)`/g;
18109
+ var isLinkTarget = (href) => /^https?:\/\//i.test(href) || /^mailto:/i.test(href);
18110
+ function linkLabel(label, href) {
18111
+ const vend = /^(Corsearch)\s*·\s*(.+)$/i.exec(label);
18112
+ if (!vend || !/^https?:\/\//i.test(href) || /corsearch\./i.test(href)) return label;
18113
+ try {
18114
+ return `${new URL(href).host.replace(/^www\./, "")} · ${vend[2]}`;
18115
+ } catch {
18116
+ return label;
18117
+ }
18118
+ }
18016
18119
  function inlineSpans(text) {
18017
18120
  const src = String(text ?? "");
18018
18121
  const out = [];
@@ -18023,8 +18126,18 @@ function inlineSpans(text) {
18023
18126
  text: src.slice(at, m.index),
18024
18127
  style: null
18025
18128
  });
18026
- const [, bold, italic, code] = m;
18027
- if (bold !== void 0) out.push({
18129
+ const [, label, href, bold, italic, code] = m;
18130
+ if (label !== void 0 && href !== void 0) {
18131
+ const text = linkLabel(label, href);
18132
+ out.push(isLinkTarget(href) ? {
18133
+ text,
18134
+ style: "link",
18135
+ href
18136
+ } : {
18137
+ text,
18138
+ style: null
18139
+ });
18140
+ } else if (bold !== void 0) out.push({
18028
18141
  text: bold,
18029
18142
  style: "strong"
18030
18143
  });
@@ -18485,7 +18598,15 @@ function SummaryBlocks({ chunk, first }) {
18485
18598
  }, i)) });
18486
18599
  }
18487
18600
  function Prose({ text }) {
18488
- return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: inlineSpans(text).map((s, i) => s.style === "strong" ? (0, import_jsx_runtime.jsx)("b", { children: s.text }, i) : s.style === "em" ? (0, import_jsx_runtime.jsx)("i", { children: s.text }, i) : s.style === "code" ? (0, import_jsx_runtime.jsx)("span", {
18601
+ return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: inlineSpans(text).map((s, i) => s.style === "link" ? /^https?:\/\//i.test(s.href ?? "") ? (0, import_jsx_runtime.jsx)("a", {
18602
+ href: s.href,
18603
+ target: "_blank",
18604
+ rel: "noopener noreferrer",
18605
+ children: s.text
18606
+ }, i) : (0, import_jsx_runtime.jsx)("a", {
18607
+ href: s.href,
18608
+ children: s.text
18609
+ }, i) : s.style === "strong" ? (0, import_jsx_runtime.jsx)("b", { children: s.text }, i) : s.style === "em" ? (0, import_jsx_runtime.jsx)("i", { children: s.text }, i) : s.style === "code" ? (0, import_jsx_runtime.jsx)("span", {
18489
18610
  className: "mono",
18490
18611
  children: s.text
18491
18612
  }, i) : (0, import_jsx_runtime.jsx)("span", { children: s.text }, i)) });
@@ -18908,7 +19029,7 @@ var NAMES_CLOUDS = new Set([
18908
19029
  "two-clouds",
18909
19030
  "no-cloud"
18910
19031
  ]);
18911
- function billingRefusalSentence(r) {
19032
+ function billingRefusalSentence(r, name = PRODUCT_NAME) {
18912
19033
  const setting = r.setting || "the billing setting";
18913
19034
  const generic = `Searches will be refused over how this machine is set to pay. Check ${setting} and the settings beside it.`;
18914
19035
  if (NAMES_CLOUDS.has(r.kind) && r.clouds.length === 0) return generic;
@@ -18923,19 +19044,19 @@ function billingRefusalSentence(r) {
18923
19044
  }
18924
19045
  case "two-clouds": return `Searches will be refused: payment is set to a cloud account, but ${COUNT[r.clouds.length] ?? r.clouds.length} clouds are switched on, ${listed(r.clouds.map((c) => `${c.name} (${c.setting})`))}. Turn off all but the one you pay through.`;
18925
19046
  case "no-cloud": return `Searches will be refused: payment is set to a cloud account, but no cloud is chosen. Turn on your cloud's switch (${listed(r.clouds.map((c) => `${c.setting} for ${c.name}`), "or")}) with the settings that cloud needs` + (r.gateway ? `, set ${r.gateway} for a gateway,` : ",") + ` or set ${setting} to subscription.`;
18926
- case "not-a-mode": return `Searches will be refused: ${setting} is set to a word Clearotron does not know. Set it to ${listed(r.modes, "or")}.`;
19047
+ case "not-a-mode": return `Searches will be refused: ${setting} is set to a word ${name} does not know. Set it to ${listed(r.modes, "or")}.`;
18927
19048
  case "cloud-on-codex": return `Searches will be refused: payment is set to a cloud account, which pays only for Claude, and this machine runs the Codex engine. Set ${setting} to ${listed(r.modes, "or")}` + (r.engineSetting && r.engineChoice ? `, or set ${r.engineSetting} to ${r.engineChoice} to pay for Claude through your cloud.` : ".");
18928
19049
  default: return generic;
18929
19050
  }
18930
19051
  }
18931
- function engineRowFaults(engine, { programDisputed = false, channel = null } = {}) {
19052
+ function engineRowFaults(engine, { programDisputed = false, channel = null, name = PRODUCT_NAME } = {}) {
18932
19053
  const reason = engine.billing.reason ?? null;
18933
19054
  if (engine.selected === false) return [NO_ENGINE];
18934
19055
  return [
18935
19056
  ...engine.known ? [] : [`This build does not ship an engine called ${engine.id}.`],
18936
19057
  ...engine.billing.missing.length ? ["Set to bill an API key, and no key is set — a run is refused rather than billed to the subscription."] : [],
18937
- ...reason && !engine.billing.missing.length ? [billingRefusalSentence(reason)] : [],
18938
- ...engine.binaryPresent ? [] : engine.program ? [`The engine program \`${engine.program}\` cannot be found or run on this machine. Run the setup wizard, \`npx ${setupPackage(channel)} install\`: it offers to install the program and proves it with one turn. Then restart Clearotron's services, which look for the program when they start.`] : ["The engine program cannot be found or run on this machine."],
19058
+ ...reason && !engine.billing.missing.length ? [billingRefusalSentence(reason, name)] : [],
19059
+ ...engine.binaryPresent ? [] : engine.program ? [`The engine program \`${engine.program}\` cannot be found or run on this machine. Run the setup wizard, \`npx ${setupPackage(channel)} install\`: it offers to install the program and proves it with one turn. Then restart ${name}'s services, which look for the program when they start.`] : ["The engine program cannot be found or run on this machine."],
18939
19060
  ...programDisputed && engine.binaryPresent ? [`The engine program is on this machine, but the engine could not find it when it last started — so a new search will refuse. Restart the engine service so it looks again. If it still cannot find it, set ${engine.programSetting ?? "the engine's program setting"} to the program's full path in the settings file the service reads, then restart it again.`] : []
18940
19061
  ];
18941
19062
  }
@@ -18955,10 +19076,11 @@ function engineNotice({ programDisputed }) {
18955
19076
  after: "Then restart the service: this reading was taken when it started, and it will not notice a new install until it starts again."
18956
19077
  };
18957
19078
  }
18958
- function engineRow(engine, { programDisputed = false, channel = null } = {}) {
19079
+ function engineRow(engine, { programDisputed = false, channel = null, name = PRODUCT_NAME } = {}) {
18959
19080
  const faults = engineRowFaults(engine, {
18960
19081
  programDisputed,
18961
- channel
19082
+ channel,
19083
+ name
18962
19084
  });
18963
19085
  if (engine.selected === false) return {
18964
19086
  ok: false,
@@ -19562,11 +19684,15 @@ function NewClearance({ ctx }) {
19562
19684
  setSaveNote(null);
19563
19685
  };
19564
19686
  const setPick = (next) => edit({ pick: next });
19565
- const recommendation = (0, import_react.useMemo)(() => draft.pick.territories.length ? recommendSearch(levels, names.length, draft.pick.territories) : recommendSearch(levels, names.length, own.territories, { own: true }), [
19687
+ const recommendation = (0, import_react.useMemo)(() => draft.pick.territories.length ? recommendSearch(levels, names.length, draft.pick.territories) : recommendSearch(levels, names.length, own.territories, {
19688
+ own: true,
19689
+ fromProject: own.territoriesFromProject
19690
+ }), [
19566
19691
  levels,
19567
19692
  names.length,
19568
19693
  draft.pick.territories,
19569
- own.territories
19694
+ own.territories,
19695
+ own.territoriesFromProject
19570
19696
  ]);
19571
19697
  (0, import_react.useEffect)(() => {
19572
19698
  if (pickedByHand || draft.savedSearch || editingSlug || !recommendation) return;
@@ -19609,7 +19735,10 @@ function NewClearance({ ctx }) {
19609
19735
  deadline: d.deadline
19610
19736
  };
19611
19737
  let after = applyRead(before, read, own.classes, { worldwide });
19612
- const fits = after.draft.territories.length ? recommendSearch(levels, parseNames(after.names).length, after.draft.territories) : recommendSearch(levels, parseNames(after.names).length, own.territories, { own: true });
19738
+ const fits = after.draft.territories.length ? recommendSearch(levels, parseNames(after.names).length, after.draft.territories) : recommendSearch(levels, parseNames(after.names).length, own.territories, {
19739
+ own: true,
19740
+ fromProject: own.territoriesFromProject
19741
+ });
19613
19742
  if (read.product == null && !pickedByHand && !d.savedSearch && fits) after = {
19614
19743
  ...after,
19615
19744
  draft: chooseProduct(after.draft, fits.product)
@@ -19977,7 +20106,7 @@ function NewClearance({ ctx }) {
19977
20106
  gap: 6,
19978
20107
  margin: "9px 0 12px"
19979
20108
  },
19980
- children: draft.pick.territories.length === 0 ? own.territories.length ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [own.territories.map((t) => (0, import_jsx_runtime.jsxs)("span", {
20109
+ children: draft.pick.territories.length === 0 ? own.territories.length && !draft.pick.replacesOwnTerritories ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [own.territories.map((t) => (0, import_jsx_runtime.jsxs)("span", {
19981
20110
  "data-anon": "mark",
19982
20111
  className: reachesTerritory(t, registerTerritories) ? "chip" : "chip chip-deferred",
19983
20112
  title: reachesTerritory(t, registerTerritories) ? void 0 : notAvailableLine([t], registerLabel),
@@ -20513,7 +20642,11 @@ function NewClearance({ ctx }) {
20513
20642
  tier: activeLevel?.name || activeLevel?.stageLabel || (draft.savedSearch ? "Search template" : "No search picked"),
20514
20643
  detail: [
20515
20644
  names.length ? `${names.length} name${names.length === 1 ? "" : "s"}` : "no names yet",
20516
- whereWorldwide ? worldwideLine(registerLabel) : draft.pick.territories.length ? draft.pick.territories.map(territoryCode).join(", ") : own.territories.length ? own.territories.map(territoryCode).join(", ") : "worldwide",
20645
+ barWhere(draft.pick, own.territories, {
20646
+ worldwideOnly: whereWorldwide,
20647
+ worldwideLine: worldwideLine(registerLabel),
20648
+ unset: "worldwide"
20649
+ }),
20517
20650
  names.length && activeLevel ? checksSummary(effort) : ""
20518
20651
  ].filter(Boolean).join(" · "),
20519
20652
  uses: runCount(effort),
@@ -21948,10 +22081,8 @@ function clearPath(draft, path) {
21948
22081
  else next[head] = pruned;
21949
22082
  return next;
21950
22083
  }
21951
- function revokedPlatforms(customer, project) {
21952
- if (!Array.isArray(project)) return [];
21953
- const kept = new Set((project ?? []).map((p) => String(p).trim().toLowerCase()));
21954
- return (customer ?? []).filter((p) => !kept.has(String(p).trim().toLowerCase()));
22084
+ function revokedPlatforms(_customer, _project) {
22085
+ return [];
21955
22086
  }
21956
22087
  function stripCodeOwned(draft) {
21957
22088
  const out = { ...draft };
@@ -22856,15 +22987,15 @@ function Preferences({ ctx }) {
22856
22987
  setThemeState(next);
22857
22988
  };
22858
22989
  const contact = ctx.me.administratorContact;
22859
- const administrator = contact ? (0, import_jsx_runtime.jsx)("a", {
22990
+ const administrator = contact ? (0, import_jsx_runtime.jsxs)("a", {
22860
22991
  className: "pref-link",
22861
22992
  href: contact,
22862
22993
  .../^https?:/i.test(contact) ? {
22863
22994
  target: "_blank",
22864
22995
  rel: "noreferrer"
22865
22996
  } : {},
22866
- children: "Clearotron administrator"
22867
- }) : "Clearotron administrator";
22997
+ children: [ctx.me.brandName, " administrator"]
22998
+ }) : `${ctx.me.brandName} administrator`;
22868
22999
  return (0, import_jsx_runtime.jsxs)("div", {
22869
23000
  className: "screen",
22870
23001
  children: [(0, import_jsx_runtime.jsx)(PageHeader, { title: "Your preferences" }), (0, import_jsx_runtime.jsxs)("div", {
@@ -23008,8 +23139,8 @@ function connectionPill(aiConnected) {
23008
23139
  };
23009
23140
  return null;
23010
23141
  }
23011
- function watchForConnected(aiConnected) {
23012
- return aiConnected === false ? "This page says **Connected** once your assistant calls Clearotron." : null;
23142
+ function watchForConnected(aiConnected, name) {
23143
+ return aiConnected === false ? `This page says **Connected** once your assistant calls ${name}.` : null;
23013
23144
  }
23014
23145
  var foldsSteps = (aiConnected) => aiConnected === true;
23015
23146
  function continueOffer(input) {
@@ -23028,16 +23159,16 @@ var WHAT_YOU_CAN_DO = [
23028
23159
  ];
23029
23160
  var COPIED_MS = 2600;
23030
23161
  var PLACES = ["disk", "public-http"];
23031
- var WHERE = {
23162
+ var whereFor = (name) => ({
23032
23163
  disk: {
23033
- label: "Clearotron is installed on this machine (laptop/desktop)",
23164
+ label: `${name} is installed on this machine (laptop/desktop)`,
23034
23165
  icon: "laptop"
23035
23166
  },
23036
23167
  "public-http": {
23037
- label: "Clearotron is running elsewhere (e.g. Cloud/Server)",
23168
+ label: `${name} is running elsewhere (e.g. Cloud/Server)`,
23038
23169
  icon: "server"
23039
23170
  }
23040
- };
23171
+ });
23041
23172
  var HELP_URL = "https://github.com/CordilleraSarl/clearotron/blob/main/mcp-server/CONNECT.md";
23042
23173
  async function copy(text) {
23043
23174
  try {
@@ -23063,7 +23194,7 @@ var AT_REST = {
23063
23194
  revealedAt: null,
23064
23195
  revealed: null
23065
23196
  };
23066
- function StepsPanel({ offer, measuring = false, folded = false, watch = null, state = AT_REST, onBlock, onSecret }) {
23197
+ function StepsPanel({ offer, name, measuring = false, folded = false, watch = null, state = AT_REST, onBlock, onSecret }) {
23067
23198
  return (0, import_jsx_runtime.jsxs)("div", {
23068
23199
  className: folded ? "steps-panel-body" : "steps-panel",
23069
23200
  "data-for": measuring ? void 0 : offer.id,
@@ -23076,9 +23207,13 @@ function StepsPanel({ offer, measuring = false, folded = false, watch = null, st
23076
23207
  className: "steps-name",
23077
23208
  children: offer.name
23078
23209
  }),
23079
- offer.door === null && offer.altSteps?.length ? (0, import_jsx_runtime.jsx)("p", {
23210
+ offer.door === null && offer.altSteps?.length ? (0, import_jsx_runtime.jsxs)("p", {
23080
23211
  className: "steps-unknown",
23081
- children: "We could not check how this Clearotron lets an assistant in, so both ways are below. Try the first — your assistant will tell you if it needs the other."
23212
+ children: [
23213
+ "We could not check how ",
23214
+ name,
23215
+ " lets an assistant in, so both ways are below. Try the first — your assistant will tell you if it needs the other."
23216
+ ]
23082
23217
  }) : null,
23083
23218
  (0, import_jsx_runtime.jsx)(StepList, {
23084
23219
  steps: offer.steps,
@@ -23212,13 +23347,19 @@ function StepList({ steps, offset, quiet = false, watch = null, measuring = fals
23212
23347
  })
23213
23348
  });
23214
23349
  }
23215
- function NotOnline() {
23350
+ function NotOnline({ name }) {
23216
23351
  return (0, import_jsx_runtime.jsxs)("div", {
23217
23352
  className: "notice ai-none",
23218
- children: [(0, import_jsx_runtime.jsx)("strong", { children: "Not available on this installation yet" }), (0, import_jsx_runtime.jsx)("p", { children: "Your AI app reaches Clearotron over the internet, and this installation isn’t on the internet yet. Whoever installed it can put it online — it takes about a minute and needs no account." })]
23353
+ children: [(0, import_jsx_runtime.jsx)("strong", { children: "Not available on this installation yet" }), (0, import_jsx_runtime.jsxs)("p", { children: [
23354
+ "Your AI app reaches ",
23355
+ name,
23356
+ " over the internet, and this installation isn’t on the internet yet. Whoever installed it can put it online — it takes about a minute and needs no account."
23357
+ ] })]
23219
23358
  });
23220
23359
  }
23221
23360
  function UseYourAI({ ctx }) {
23361
+ const name = ctx.me.brandName;
23362
+ const where = whereFor(name);
23222
23363
  const [access, setAccess] = (0, import_react.useState)(null);
23223
23364
  const [place, setPlace] = (0, import_react.useState)(null);
23224
23365
  const [picked, setPicked] = (0, import_react.useState)(null);
@@ -23249,7 +23390,7 @@ function UseYourAI({ ctx }) {
23249
23390
  const chosen = here.find((o) => o.id === picked) ?? null;
23250
23391
  const connected = access?.aiConnected ?? null;
23251
23392
  const pill = connectionPill(connected);
23252
- const watch = watchForConnected(connected);
23393
+ const watch = watchForConnected(connected, name);
23253
23394
  const folds = foldsSteps(connected);
23254
23395
  const back = continueOffer({
23255
23396
  aiConnected: connected,
@@ -23306,6 +23447,7 @@ function UseYourAI({ ctx }) {
23306
23447
  };
23307
23448
  const panel = chosen ? (0, import_jsx_runtime.jsx)(StepsPanel, {
23308
23449
  offer: chosen,
23450
+ name,
23309
23451
  folded: folds,
23310
23452
  watch,
23311
23453
  state: {
@@ -23363,10 +23505,10 @@ function UseYourAI({ ctx }) {
23363
23505
  "aria-hidden": "true"
23364
23506
  }), pill.label]
23365
23507
  }) : null]
23366
- }), !served.length ? (0, import_jsx_runtime.jsx)(NotOnline, {}) : (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [asks ? (0, import_jsx_runtime.jsx)("div", {
23508
+ }), !served.length ? (0, import_jsx_runtime.jsx)(NotOnline, { name }) : (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [asks ? (0, import_jsx_runtime.jsx)("div", {
23367
23509
  className: "where-grid",
23368
23510
  role: "group",
23369
- "aria-label": "Where Clearotron is running",
23511
+ "aria-label": `Where ${name} is running`,
23370
23512
  children: PLACES.map((p) => (0, import_jsx_runtime.jsxs)("button", {
23371
23513
  type: "button",
23372
23514
  className: "where-card",
@@ -23385,13 +23527,13 @@ function UseYourAI({ ctx }) {
23385
23527
  "aria-hidden": "true"
23386
23528
  }),
23387
23529
  (0, import_jsx_runtime.jsx)(Icon, {
23388
- name: WHERE[p].icon,
23530
+ name: where[p].icon,
23389
23531
  size: 19
23390
23532
  }),
23391
- WHERE[p].label
23533
+ where[p].label
23392
23534
  ]
23393
23535
  }, p))
23394
- }) : null, active === null ? null : !here.length ? (0, import_jsx_runtime.jsx)(NotOnline, {}) : (0, import_jsx_runtime.jsxs)("div", {
23536
+ }) : null, active === null ? null : !here.length ? (0, import_jsx_runtime.jsx)(NotOnline, { name }) : (0, import_jsx_runtime.jsxs)("div", {
23395
23537
  className: "ai-connect-grid",
23396
23538
  children: [(0, import_jsx_runtime.jsxs)("div", { children: [(0, import_jsx_runtime.jsx)("h3", {
23397
23539
  className: "section-title",
@@ -23492,6 +23634,7 @@ function UseYourAI({ ctx }) {
23492
23634
  "aria-hidden": "true",
23493
23635
  children: here.map((o) => (0, import_jsx_runtime.jsx)(StepsPanel, {
23494
23636
  offer: o,
23637
+ name,
23495
23638
  watch,
23496
23639
  measuring: true
23497
23640
  }, o.id))
@@ -24046,7 +24189,7 @@ function FrameworkBlock({ readOnly, framework, everything, permitted }) {
24046
24189
  value: "Used when rating this company"
24047
24190
  }) : null, entries.map((k) => (0, import_jsx_runtime.jsx)(Row$2, {
24048
24191
  label: LABELS[k] ?? k,
24049
- value: k === "allowedRecipes" ? permitted : k === "jxPolicy" ? jxPolicyValue(readOnly[k]) : readOnlyValue(readOnly[k])
24192
+ value: k === "allowedRecipes" ? permitted : k === "jxPolicy" ? jxPolicyValue(readOnly[k]) : k === "runCaps" ? runCapsValue(readOnly[k]) : readOnlyValue(readOnly[k])
24050
24193
  }, k))]
24051
24194
  }) : null,
24052
24195
  (0, import_jsx_runtime.jsx)("div", {
@@ -24063,6 +24206,12 @@ var LABELS = {
24063
24206
  jxPolicy: "Jurisdiction policy",
24064
24207
  runCaps: "Run limits"
24065
24208
  };
24209
+ function runCapsValue(v) {
24210
+ const caps = v && typeof v === "object" ? v : {};
24211
+ const n = (x) => typeof x === "number" && Number.isFinite(x) ? x : null;
24212
+ const parts = [n(caps["dailyRuns"]) !== null ? `Runs a day: ${n(caps["dailyRuns"])}` : null, n(caps["maxQueued"]) !== null ? `Waiting at once: ${n(caps["maxQueued"])}` : null].filter((p) => p !== null);
24213
+ return parts.length ? parts.join(" · ") : readOnlyValue(v);
24214
+ }
24066
24215
  function Row$2({ label, value }) {
24067
24216
  return (0, import_jsx_runtime.jsxs)("div", {
24068
24217
  className: "fw-row",
@@ -25212,7 +25361,8 @@ function GlobalConfig({ ctx }) {
25212
25361
  children: [v.engine ? (0, import_jsx_runtime.jsx)(Engine, {
25213
25362
  engine: v.engine,
25214
25363
  programDisputed: (v.lastRun?.disagrees ?? []).some((d) => d.what === "engine program"),
25215
- channel: ctx.me.channel ?? null
25364
+ channel: ctx.me.channel ?? null,
25365
+ name: ctx.me.brandName
25216
25366
  }) : (0, import_jsx_runtime.jsx)(NotRecorded, {
25217
25367
  what: "which engine is running",
25218
25368
  source: v.source
@@ -25353,10 +25503,11 @@ var NotServed = () => (0, import_jsx_runtime.jsx)("div", {
25353
25503
  },
25354
25504
  children: "This version of the portal does not report how people sign in. It will say after this service is upgraded — a search engine drain will not add it."
25355
25505
  });
25356
- function Engine({ engine, programDisputed = false, channel = null }) {
25506
+ function Engine({ engine, programDisputed = false, channel = null, name }) {
25357
25507
  return (0, import_jsx_runtime.jsx)(Row$1, { ...engineRow(engine, {
25358
25508
  programDisputed,
25359
- channel
25509
+ channel,
25510
+ name
25360
25511
  }) });
25361
25512
  }
25362
25513
  function Row$1({ ok, off = false, name, mono, state, faults, note = null, detail = null, guide = null, repo = null }) {
@@ -25436,6 +25587,7 @@ function useSourceRepo() {
25436
25587
  return result && isOk(result) && result.value.sourceRepo ? result.value.sourceRepo : null;
25437
25588
  }
25438
25589
  function PeopleAccess({ ctx }) {
25590
+ const installation = ctx.me.brandName;
25439
25591
  const peopleWrap = (0, import_react.useRef)(null);
25440
25592
  const { result } = useLoad(() => api.adminAccess(), []);
25441
25593
  const repo = useSourceRepo();
@@ -25480,9 +25632,9 @@ function PeopleAccess({ ctx }) {
25480
25632
  color: "var(--text-muted)"
25481
25633
  },
25482
25634
  children: [
25483
- (0, import_jsx_runtime.jsx)("b", {
25635
+ (0, import_jsx_runtime.jsxs)("b", {
25484
25636
  style: { color: "var(--text-strong)" },
25485
- children: "This Clearotron signs in one person: you."
25637
+ children: [installation, " signs in one person: you."]
25486
25638
  }),
25487
25639
  " To add people, put it behind a login system such as your company single sign-on.",
25488
25640
  " ",
@@ -25765,6 +25917,7 @@ var NOTHING = {
25765
25917
  };
25766
25918
  var oneAddress = (s) => /^[^\s@,;<>]+@[^\s@,;<>]+$/.test(s);
25767
25919
  function GiveAccess({ ctx }) {
25920
+ const installation = ctx.me.brandName;
25768
25921
  const { result: view } = useLoad(() => api.adminAccess(), []);
25769
25922
  const [email, setEmail] = (0, import_react.useState)("");
25770
25923
  const [permissions, setPermissions] = (0, import_react.useState)({
@@ -25795,9 +25948,9 @@ function GiveAccess({ ctx }) {
25795
25948
  color: "var(--text-muted)"
25796
25949
  },
25797
25950
  children: [
25798
- (0, import_jsx_runtime.jsx)("b", {
25951
+ (0, import_jsx_runtime.jsxs)("b", {
25799
25952
  style: { color: "var(--text-strong)" },
25800
- children: "This Clearotron signs in one person: you."
25953
+ children: [installation, " signs in one person: you."]
25801
25954
  }),
25802
25955
  " To add people, put it behind a login system such as your company single sign-on.",
25803
25956
  " ",
@@ -25846,7 +25999,8 @@ function GiveAccess({ ctx }) {
25846
25999
  companies: soloCompanies.map((k) => ({
25847
26000
  name: ctx.ownerName(k),
25848
26001
  organisation: orgName(ctx.orgOf(k) ?? "")
25849
- }))
26002
+ })),
26003
+ installation
25850
26004
  });
25851
26005
  const save = async () => {
25852
26006
  setBusy(true);
@@ -25861,7 +26015,7 @@ function GiveAccess({ ctx }) {
25861
26015
  setBusy(false);
25862
26016
  }
25863
26017
  };
25864
- const failure = result && !isOk(result) ? result.kind === "gate" && result.detail?.code === "local_sign_in" ? "This Clearotron now signs in one person, so nobody can be added. Nothing was saved." : result.kind === "conflict" ? "This Clearotron now signs in one person, so nobody can be added. Nothing was saved." : result.kind === "notFound" ? "You can only give access to what you have access to yourself. Nothing was saved." : result.kind === "reject" ? result.errors.join(" ") : saveFailureText(result, "That could not be saved. Nothing was changed.") : null;
26018
+ const failure = result && !isOk(result) ? result.kind === "gate" && result.detail?.code === "local_sign_in" ? `${installation} now signs in one person, so nobody can be added. Nothing was saved.` : result.kind === "conflict" ? `${installation} now signs in one person, so nobody can be added. Nothing was saved.` : result.kind === "notFound" ? "You can only give access to what you have access to yourself. Nothing was saved." : result.kind === "reject" ? result.errors.join(" ") : saveFailureText(result, "That could not be saved. Nothing was changed.") : null;
25865
26019
  return (0, import_jsx_runtime.jsx)("div", {
25866
26020
  className: "screen",
25867
26021
  children: (0, import_jsx_runtime.jsxs)("div", {
@@ -25940,7 +26094,7 @@ function GiveAccess({ ctx }) {
25940
26094
  },
25941
26095
  children: [holdsEverything ? (0, import_jsx_runtime.jsx)(AttachRow$1, {
25942
26096
  on: chosen.everything,
25943
- name: "Everything on this Clearotron",
26097
+ name: `Everything on ${installation}`,
25944
26098
  line: REACH_LINE.everything,
25945
26099
  disabled: saved,
25946
26100
  onToggle: () => setChosen((c) => ({
@@ -26165,6 +26319,7 @@ function ModifyAccess({ ctx }) {
26165
26319
  }, person.email);
26166
26320
  }
26167
26321
  function Form({ ctx, person, view }) {
26322
+ const installation = ctx.me.brandName;
26168
26323
  const readOnlyPeople = view.localSignIn;
26169
26324
  const held = heldBy(person);
26170
26325
  const [permissions, setPermissions] = (0, import_react.useState)(person.permissions);
@@ -26210,7 +26365,8 @@ function Form({ ctx, person, view }) {
26210
26365
  companies: soloCompanies.map((k) => ({
26211
26366
  name: ctx.ownerName(k),
26212
26367
  organisation: orgName(ctx.orgOf(k) ?? "")
26213
- }))
26368
+ })),
26369
+ installation
26214
26370
  });
26215
26371
  const save = async () => {
26216
26372
  setBusy(true);
@@ -26234,9 +26390,9 @@ function Form({ ctx, person, view }) {
26234
26390
  setBusy(false);
26235
26391
  }
26236
26392
  };
26237
- const failure = (r) => r === null || isOk(r) ? null : r.kind === "gate" && r.detail?.code === "local_sign_in" ? "This Clearotron now signs in one person, so nobody else can be changed. Nothing was saved." : r.kind === "conflict" ? "This Clearotron now signs in one person, so nobody else can be changed. Nothing was saved." : r.kind === "notFound" ? "That is not access you can change. Nothing was saved." : r.kind === "reject" ? r.errors.join(" ") : saveFailureText(r, "That could not be saved. Nothing was changed.");
26393
+ const failure = (r) => r === null || isOk(r) ? null : r.kind === "gate" && r.detail?.code === "local_sign_in" ? `${installation} now signs in one person, so nobody else can be changed. Nothing was saved.` : r.kind === "conflict" ? `${installation} now signs in one person, so nobody else can be changed. Nothing was saved.` : r.kind === "notFound" ? "That is not access you can change. Nothing was saved." : r.kind === "reject" ? r.errors.join(" ") : saveFailureText(r, "That could not be saved. Nothing was changed.");
26238
26394
  const problem = failure(saved) ?? failure(gone);
26239
- const loses = person.access.length ? person.access.map((a) => a.kind === "everything" ? "everything on this Clearotron" : a.name ?? a.key) : [];
26395
+ const loses = person.access.length ? person.access.map((a) => a.kind === "everything" ? `everything on ${installation}` : a.name ?? a.key) : [];
26240
26396
  const holdsKey = (person.keys ?? 0) > 0;
26241
26397
  const keyStaysLive = holdsKey && view.keysRevocable !== true;
26242
26398
  const domain = person.email.startsWith("*@") ? person.email.slice(2) : null;
@@ -26309,7 +26465,7 @@ function Form({ ctx, person, view }) {
26309
26465
  },
26310
26466
  children: [holdsEverything ? (0, import_jsx_runtime.jsx)(AttachRow, {
26311
26467
  on: true,
26312
- name: "Everything on this Clearotron",
26468
+ name: `Everything on ${installation}`,
26313
26469
  line: REACH_LINE.everything,
26314
26470
  disabled: true,
26315
26471
  onToggle: () => {}
@@ -26407,9 +26563,9 @@ function Form({ ctx, person, view }) {
26407
26563
  fontSize: 13.5,
26408
26564
  color: "var(--text-muted)"
26409
26565
  },
26410
- children: [(0, import_jsx_runtime.jsx)("b", {
26566
+ children: [(0, import_jsx_runtime.jsxs)("b", {
26411
26567
  style: { color: "var(--text-strong)" },
26412
- children: "This Clearotron signs in one person: you."
26568
+ children: [installation, " signs in one person: you."]
26413
26569
  }), " Nobody else can be changed or removed here. To hold more than one person, put it behind a login system such as your company single sign-on."]
26414
26570
  })
26415
26571
  }) : null,
@@ -26472,7 +26628,7 @@ function Form({ ctx, person, view }) {
26472
26628
  " ",
26473
26629
  whole ? (0, import_jsx_runtime.jsxs)("b", { children: [
26474
26630
  "loses access to ",
26475
- loses.length ? loses.join(" and ") : "this Clearotron",
26631
+ loses.length ? loses.join(" and ") : installation,
26476
26632
  " straight away,"
26477
26633
  ] }) : (0, import_jsx_runtime.jsxs)("b", { children: [
26478
26634
  "loses ",
@@ -26481,7 +26637,9 @@ function Form({ ctx, person, view }) {
26481
26637
  ] }),
26482
26638
  " ",
26483
26639
  keyStaysLive ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
26484
- "here. Their AI was issued a key this Clearotron cannot withdraw — it was started without a revocation list — so that key keeps working until it expires.",
26640
+ "here. Their AI was issued a key ",
26641
+ installation,
26642
+ " cannot withdraw — it was started without a revocation list — so that key keeps working until it expires.",
26485
26643
  " ",
26486
26644
  (0, import_jsx_runtime.jsx)("b", {
26487
26645
  className: "mono",
@@ -26546,7 +26704,7 @@ function Form({ ctx, person, view }) {
26546
26704
  },
26547
26705
  disabled: busy || readOnlyPeople,
26548
26706
  onClick: () => setConfirming(true),
26549
- children: whole ? domain ? `Remove everyone at ${domain}` : "Remove from Clearotron" : `Remove from ${[...held.orgs].map(orgName).join(", ") || "here"}`
26707
+ children: whole ? domain ? `Remove everyone at ${domain}` : `Remove from ${installation}` : `Remove from ${[...held.orgs].map(orgName).join(", ") || "here"}`
26550
26708
  }), whole ? null : (0, import_jsx_runtime.jsx)("p", {
26551
26709
  style: {
26552
26710
  margin: 0,
@@ -26694,7 +26852,7 @@ function About() {
26694
26852
  (0, import_jsx_runtime.jsx)("dt", { children: "Trade marks" }),
26695
26853
  (0, import_jsx_runtime.jsxs)("dd", { children: [
26696
26854
  (0, import_jsx_runtime.jsx)("strong", { children: info.name }),
26697
- " and the mountain mark are trade marks of Cordillera Sàrl. The licence above covers the software; it does not grant any right in the name or the mark. See",
26855
+ " and the bracket mark are trade marks of Cordillera Sàrl. The licence above covers the software; it does not grant any right in the name or the mark. See",
26698
26856
  " ",
26699
26857
  (0, import_jsx_runtime.jsx)("a", {
26700
26858
  className: "about-link",