clearotron 0.6.0 → 0.7.0-beta.0

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 (110) 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/branding.md +4 -4
  12. package/docs/report-data/clearance-1.schema.json +320 -0
  13. package/docs/report-data/knockout-1.schema.json +268 -0
  14. package/driver/CHANGELOG.md +39 -0
  15. package/driver/connotation-search.mjs +1 -1
  16. package/driver/contract-e3-backlog.mjs +1 -1
  17. package/driver/coverage-ledger.mjs +18 -2
  18. package/driver/deferral-row.mjs +1 -1
  19. package/driver/degraded-parts.mjs +1 -0
  20. package/driver/driver.config.mjs +4 -3
  21. package/driver/effective-scope.mjs +3 -1
  22. package/driver/engagement-receipt.mjs +3 -3
  23. package/driver/engine/anthropic-agent.mjs +15 -1
  24. package/driver/engine/common.mjs +7 -0
  25. package/driver/engine/mcp/band-server.mjs +7 -16
  26. package/driver/engine/mcp/codex-config.mjs +3 -0
  27. package/driver/engine/mcp/recording-server.mjs +45 -34
  28. package/driver/engine/openai-agent.mjs +74 -7
  29. package/driver/gateway.mjs +67 -10
  30. package/driver/jx.mjs +13 -5
  31. package/driver/manuals-seen.mjs +146 -0
  32. package/driver/mark-logos.mjs +144 -0
  33. package/driver/methodology-witness.mjs +2 -1
  34. package/driver/owner-use-check.mjs +3 -3
  35. package/driver/package.json +1 -1
  36. package/driver/pipeline-knockout.mjs +4 -0
  37. package/driver/pipeline.mjs +92 -7
  38. package/driver/portal-local-auth.mjs +6 -2
  39. package/driver/portal-report.mjs +43 -12
  40. package/driver/portal-routes/me.mjs +4 -1
  41. package/driver/portal-runs.mjs +6 -9
  42. package/driver/profiles.mjs +4 -4
  43. package/driver/publish/README.md +9 -7
  44. package/driver/publish/email-conditions.mjs +2 -2
  45. package/driver/publish/evidence-words.mjs +21 -0
  46. package/driver/publish/index.mjs +104 -90
  47. package/driver/publish/knockout.mjs +75 -49
  48. package/driver/publish/office-record-links.mjs +11 -9
  49. package/driver/publish/page-shell.mjs +98 -0
  50. package/driver/publish/publish-inputs.mjs +4 -0
  51. package/driver/publish/regions.mjs +24 -3
  52. package/driver/publish/register-record.mjs +150 -0
  53. package/driver/publish/render-knockout.mjs +195 -642
  54. package/driver/publish/render.mjs +270 -363
  55. package/driver/publish/report-data.mjs +225 -12
  56. package/driver/publish/strings.mjs +662 -0
  57. package/driver/publish/templates/knockout.css +200 -0
  58. package/driver/publish/templates/report.css +72 -52
  59. package/driver/publish/xlsx.mjs +148 -125
  60. package/driver/record-goods.mjs +42 -0
  61. package/driver/reference-score.mjs +4 -1
  62. package/driver/register-reach.mjs +39 -0
  63. package/driver/registry-fidelity.mjs +3 -8
  64. package/driver/repair-composers.mjs +6 -2
  65. package/driver/repair-targets.mjs +4 -1
  66. package/driver/run-delivered.mjs +6 -1
  67. package/driver/runner.mjs +73 -29
  68. package/driver/scope-facts.mjs +27 -6
  69. package/driver/search-policy.mjs +9 -4
  70. package/driver/stages.mjs +3 -3
  71. package/driver/steps/overview-and-cards.mjs +50 -14
  72. package/driver/steps/verdict-gate.mjs +33 -13
  73. package/driver/suite-census.json +368 -68
  74. package/driver/terminal-clamp.mjs +6 -1
  75. package/mcp-server/CHANGELOG.md +4 -0
  76. package/mcp-server/lib/audit-view.mjs +5 -2
  77. package/mcp-server/lib/brief.mjs +2 -1
  78. package/mcp-server/lib/evidence.mjs +31 -4
  79. package/mcp-server/lib/knockout.mjs +1 -1
  80. package/mcp-server/lib/scrub.mjs +1 -1
  81. package/mcp-server/package.json +1 -1
  82. package/mcp-server/server.mjs +5 -3
  83. package/package.json +4 -1
  84. package/portal-ui/dist/assets/{index-CYaO2ygd.js → index-CtkllKJ2.js} +225 -77
  85. package/portal-ui/dist/assets/{index-izLa9apq.css → index-CxAkJXIT.css} +25 -5
  86. package/portal-ui/dist/index.html +2 -2
  87. package/portal-ui/package.json +3 -3
  88. package/providers/_shared/ledger.mjs +30 -2
  89. package/providers/_shared/record-uri.mjs +15 -0
  90. package/providers/clarivate/src/adapter.js +11 -0
  91. package/providers/clarivate/src/core.js +17 -1
  92. package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
  93. package/providers/oauth-mcp-bridge/package.json +1 -1
  94. package/scripts/README.md +147 -3
  95. package/scripts/e2e-first-time.mjs +3 -3
  96. package/scripts/freeze-example-run.mjs +3 -3
  97. package/scripts/mint-search-level-tags.mjs +61 -0
  98. package/scripts/mint-source-pin-census.mjs +89 -0
  99. package/scripts/release-note-required.mjs +65 -6
  100. package/scripts/test-durations-reporter.mjs +25 -0
  101. package/scripts/test-full.mjs +72 -18
  102. package/scripts/test-run.mjs +18 -1
  103. package/shared/brand.mjs +85 -5
  104. package/shared/inline-markdown.mjs +53 -0
  105. package/shared/portal-tokens.mjs +2 -1
  106. package/shared/register-selection.mjs +8 -3
  107. package/shared/search-level-tags.json +25 -0
  108. package/shared/tools/derive-band-pairs.mjs +10 -0
  109. package/driver/own-rights.mjs +0 -83
  110. 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", {
@@ -14781,7 +14796,7 @@ function chooseProduct(d, product) {
14781
14796
  }
14782
14797
  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
14798
  var tierOfPlace = (place) => tierOf(place) ?? TIER_OF_CODE[territoryKeyOf(place)] ?? null;
14784
- function recommendSearch(products, names, territories, { own = false } = {}) {
14799
+ function recommendSearch(products, names, territories, { own = false, fromProject = false } = {}) {
14785
14800
  if (territories.length === 0 && names <= 1) return null;
14786
14801
  const live = products.filter((p) => p.available);
14787
14802
  if (names > 1) {
@@ -14798,10 +14813,10 @@ function recommendSearch(products, names, territories, { own = false } = {}) {
14798
14813
  const product = live.find((p) => p.pipeline !== "knockout" && p.geography === geography);
14799
14814
  if (!product) return null;
14800
14815
  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);
14816
+ const places = [regions ? some(regions, "region", "regions") : "", countries ? some(countries, "country", "countries") : ""].filter(Boolean).join(" and ");
14802
14817
  return {
14803
14818
  product,
14804
- reason: own ? `because the company searches ${named.join(" and ")}` : `because you named ${named.join(" and ")}`
14819
+ reason: !own ? `because you named ${places}` : fromProject ? `because the project searches ${places}` : `because the company searches ${places}`
14805
14820
  };
14806
14821
  }
14807
14822
  function templateLine(label, product) {
@@ -15267,6 +15282,7 @@ function inherited({ profile, projectEffective, projectOrigins, ownerLabel, proj
15267
15282
  classesFrom: fromProject && projectLabel ? `from ${projectLabel}` : `from ${ownerLabel}`,
15268
15283
  territories: strings(source["defaultJurisdictions"]),
15269
15284
  territoriesFrom: projectOrigins?.["defaultJurisdictions"] === "project" && projectLabel ? `from ${projectLabel}` : `from ${ownerLabel}`,
15285
+ territoriesFromProject: projectOrigins?.["defaultJurisdictions"] === "project" && Boolean(projectLabel),
15270
15286
  platforms: strings(source["platforms"]),
15271
15287
  density: typeof source["marketplaceDensity"] === "string" ? source["marketplaceDensity"] : null
15272
15288
  };
@@ -16878,6 +16894,40 @@ function AskAi({ runId, markSlug = null, markName, date, kind, productName, acce
16878
16894
  ]
16879
16895
  });
16880
16896
  }
16897
+ // src/contract/levelTags.ts
16898
+ var SEARCH_LEVELS = {
16899
+ _generated: "by scripts/mint-search-level-tags.mjs from driver/search-policy.mjs PRODUCT_POLICIES — do not edit; re-mint",
16900
+ levels: [
16901
+ {
16902
+ "product": "knockout-search",
16903
+ "tag": "KO",
16904
+ "name": "Knockout search"
16905
+ },
16906
+ {
16907
+ "product": "global-preliminary-search",
16908
+ "tag": "Prelim",
16909
+ "name": "Global preliminary search"
16910
+ },
16911
+ {
16912
+ "product": "multi-country-focus-search",
16913
+ "tag": "Multi",
16914
+ "name": "Multi-country focus search"
16915
+ },
16916
+ {
16917
+ "product": "full-country-search",
16918
+ "tag": "Full",
16919
+ "name": "Full country search"
16920
+ }
16921
+ ]
16922
+ }.levels;
16923
+ new Map(SEARCH_LEVELS.map((l) => [l.product, l]));
16924
+ function atLevel(run, filter) {
16925
+ return filter === "all" || run.product === filter;
16926
+ }
16927
+ function levelsOf(runs) {
16928
+ const held = new Set(runs.map((r) => r.product));
16929
+ return SEARCH_LEVELS.filter((l) => held.has(l.product));
16930
+ }
16881
16931
  // src/screens/Clearances.tsx
16882
16932
  var FIRST_CLICK_DESC = {
16883
16933
  date: true,
@@ -16918,6 +16968,7 @@ function Clearances({ ctx }) {
16918
16968
  setTableWidth(el.clientWidth);
16919
16969
  }, []);
16920
16970
  const [filter, setFilter] = (0, import_react.useState)("all");
16971
+ const [level, setLevel] = (0, import_react.useState)("all");
16921
16972
  const [sort, setSort] = (0, import_react.useState)({
16922
16973
  key: "date",
16923
16974
  desc: true
@@ -16969,6 +17020,7 @@ function Clearances({ ctx }) {
16969
17020
  const marks = marksOf(runs.filter((r) => {
16970
17021
  if (filter === "finished" && !TERMINAL.has(r.state)) return false;
16971
17022
  if (filter === "progress" && TERMINAL.has(r.state)) return false;
17023
+ if (!atLevel(r, level)) return false;
16972
17024
  if (q && !displayName(r).toLowerCase().includes(q) && !r.marks.some((m) => m.name.toLowerCase().includes(q))) return false;
16973
17025
  return true;
16974
17026
  }), families).filter((m) => filter === "failed" === (m.current.state === "failed"));
@@ -16985,6 +17037,7 @@ function Clearances({ ctx }) {
16985
17037
  }, [
16986
17038
  runs,
16987
17039
  filter,
17040
+ level,
16988
17041
  query,
16989
17042
  sort,
16990
17043
  grouped,
@@ -17182,6 +17235,29 @@ function Clearances({ ctx }) {
17182
17235
  children: label
17183
17236
  }, k))
17184
17237
  }),
17238
+ (0, import_jsx_runtime.jsxs)("div", {
17239
+ className: "segmented",
17240
+ role: "group",
17241
+ "aria-label": "Filter by search",
17242
+ children: [(0, import_jsx_runtime.jsx)("button", {
17243
+ type: "button",
17244
+ "aria-pressed": level === "all",
17245
+ onClick: () => {
17246
+ setLevel("all");
17247
+ resetPage();
17248
+ },
17249
+ children: "All"
17250
+ }), SEARCH_LEVELS.map((l) => (0, import_jsx_runtime.jsx)("button", {
17251
+ type: "button",
17252
+ "aria-pressed": level === l.product,
17253
+ title: l.name,
17254
+ onClick: () => {
17255
+ setLevel(l.product);
17256
+ resetPage();
17257
+ },
17258
+ children: l.tag
17259
+ }, l.product))]
17260
+ }),
17185
17261
  groupable ? (0, import_jsx_runtime.jsxs)("label", {
17186
17262
  className: "group-toggle",
17187
17263
  children: [(0, import_jsx_runtime.jsx)("input", {
@@ -17318,7 +17394,10 @@ function Clearances({ ctx }) {
17318
17394
  padding: "22px 12px",
17319
17395
  color: "var(--text-muted)"
17320
17396
  },
17321
- children: "No clearances match this view. Pick another company above, or widen the status filter."
17397
+ children: (0, import_jsx_runtime.jsx)("span", {
17398
+ className: "list-empty",
17399
+ children: "No clearances match this view. Pick another company above, or widen the filters."
17400
+ })
17322
17401
  }) }) : null, visible.map((r, i) => {
17323
17402
  const before = visible[i - 1];
17324
17403
  const newGroup = grouped && (!before || runKey(r) !== runKey(before));
@@ -17370,10 +17449,6 @@ function Clearances({ ctx }) {
17370
17449
  })
17371
17450
  }),
17372
17451
  (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
17452
  canGroup && retired.length ? (0, import_jsx_runtime.jsxs)("div", {
17378
17453
  style: { marginTop: 18 },
17379
17454
  children: [(0, import_jsx_runtime.jsx)("button", {
@@ -17714,6 +17789,17 @@ function FamilyRows({ family, isOpen, onToggle, go, picking, showOwner = false,
17714
17789
  askMenu
17715
17790
  }, m.id)) : null] });
17716
17791
  }
17792
+ function LevelTags({ levels }) {
17793
+ if (!levels.length) return null;
17794
+ return (0, import_jsx_runtime.jsx)("div", {
17795
+ className: "level-tags",
17796
+ children: levels.map((l) => (0, import_jsx_runtime.jsx)("span", {
17797
+ className: "pill",
17798
+ title: l.name,
17799
+ children: l.tag
17800
+ }, l.product))
17801
+ });
17802
+ }
17717
17803
  function MarkRow({ mark, open, onToggle, go, indent = false, picking = false, showOwner = false, ownerLabel = "", picked = false, onPick, onRetire, onRetireRun, askAi, askMenu }) {
17718
17804
  const run = mark.current;
17719
17805
  const threaded = mark.reads.length > 1;
@@ -17762,7 +17848,8 @@ function MarkRow({ mark, open, onToggle, go, indent = false, picking = false, sh
17762
17848
  style: { marginLeft: 8 },
17763
17849
  title: `An earlier search of this name came back ${mark.improvedFrom}. The row shows where it stands now.`,
17764
17850
  children: ["was ", mark.improvedFrom]
17765
- }) : null
17851
+ }) : null,
17852
+ (0, import_jsx_runtime.jsx)(LevelTags, { levels: levelsOf(mark.reads) })
17766
17853
  ] }),
17767
17854
  showOwner ? (0, import_jsx_runtime.jsx)("td", {
17768
17855
  "data-anon": "mark",
@@ -18012,7 +18099,17 @@ function AllowanceLine({ account, brand }) {
18012
18099
  });
18013
18100
  }
18014
18101
  // src/contract/inlineMd.ts
18015
- var INLINE = /\*\*([^*]+)\*\*|\*([^*]+)\*|`([^`]+)`/g;
18102
+ var INLINE = /\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|\*([^*]+)\*|`([^`]+)`/g;
18103
+ var isLinkTarget = (href) => /^https?:\/\//i.test(href) || /^mailto:/i.test(href);
18104
+ function linkLabel(label, href) {
18105
+ const vend = /^(Corsearch)\s*·\s*(.+)$/i.exec(label);
18106
+ if (!vend || !/^https?:\/\//i.test(href) || /corsearch\./i.test(href)) return label;
18107
+ try {
18108
+ return `${new URL(href).host.replace(/^www\./, "")} · ${vend[2]}`;
18109
+ } catch {
18110
+ return label;
18111
+ }
18112
+ }
18016
18113
  function inlineSpans(text) {
18017
18114
  const src = String(text ?? "");
18018
18115
  const out = [];
@@ -18023,8 +18120,18 @@ function inlineSpans(text) {
18023
18120
  text: src.slice(at, m.index),
18024
18121
  style: null
18025
18122
  });
18026
- const [, bold, italic, code] = m;
18027
- if (bold !== void 0) out.push({
18123
+ const [, label, href, bold, italic, code] = m;
18124
+ if (label !== void 0 && href !== void 0) {
18125
+ const text = linkLabel(label, href);
18126
+ out.push(isLinkTarget(href) ? {
18127
+ text,
18128
+ style: "link",
18129
+ href
18130
+ } : {
18131
+ text,
18132
+ style: null
18133
+ });
18134
+ } else if (bold !== void 0) out.push({
18028
18135
  text: bold,
18029
18136
  style: "strong"
18030
18137
  });
@@ -18485,7 +18592,15 @@ function SummaryBlocks({ chunk, first }) {
18485
18592
  }, i)) });
18486
18593
  }
18487
18594
  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", {
18595
+ 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", {
18596
+ href: s.href,
18597
+ target: "_blank",
18598
+ rel: "noopener noreferrer",
18599
+ children: s.text
18600
+ }, i) : (0, import_jsx_runtime.jsx)("a", {
18601
+ href: s.href,
18602
+ children: s.text
18603
+ }, 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
18604
  className: "mono",
18490
18605
  children: s.text
18491
18606
  }, i) : (0, import_jsx_runtime.jsx)("span", { children: s.text }, i)) });
@@ -18908,7 +19023,7 @@ var NAMES_CLOUDS = new Set([
18908
19023
  "two-clouds",
18909
19024
  "no-cloud"
18910
19025
  ]);
18911
- function billingRefusalSentence(r) {
19026
+ function billingRefusalSentence(r, name = PRODUCT_NAME) {
18912
19027
  const setting = r.setting || "the billing setting";
18913
19028
  const generic = `Searches will be refused over how this machine is set to pay. Check ${setting} and the settings beside it.`;
18914
19029
  if (NAMES_CLOUDS.has(r.kind) && r.clouds.length === 0) return generic;
@@ -18923,19 +19038,19 @@ function billingRefusalSentence(r) {
18923
19038
  }
18924
19039
  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
19040
  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")}.`;
19041
+ 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
19042
  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
19043
  default: return generic;
18929
19044
  }
18930
19045
  }
18931
- function engineRowFaults(engine, { programDisputed = false, channel = null } = {}) {
19046
+ function engineRowFaults(engine, { programDisputed = false, channel = null, name = PRODUCT_NAME } = {}) {
18932
19047
  const reason = engine.billing.reason ?? null;
18933
19048
  if (engine.selected === false) return [NO_ENGINE];
18934
19049
  return [
18935
19050
  ...engine.known ? [] : [`This build does not ship an engine called ${engine.id}.`],
18936
19051
  ...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."],
19052
+ ...reason && !engine.billing.missing.length ? [billingRefusalSentence(reason, name)] : [],
19053
+ ...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
19054
  ...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
19055
  ];
18941
19056
  }
@@ -18955,10 +19070,11 @@ function engineNotice({ programDisputed }) {
18955
19070
  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
19071
  };
18957
19072
  }
18958
- function engineRow(engine, { programDisputed = false, channel = null } = {}) {
19073
+ function engineRow(engine, { programDisputed = false, channel = null, name = PRODUCT_NAME } = {}) {
18959
19074
  const faults = engineRowFaults(engine, {
18960
19075
  programDisputed,
18961
- channel
19076
+ channel,
19077
+ name
18962
19078
  });
18963
19079
  if (engine.selected === false) return {
18964
19080
  ok: false,
@@ -19562,11 +19678,15 @@ function NewClearance({ ctx }) {
19562
19678
  setSaveNote(null);
19563
19679
  };
19564
19680
  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 }), [
19681
+ const recommendation = (0, import_react.useMemo)(() => draft.pick.territories.length ? recommendSearch(levels, names.length, draft.pick.territories) : recommendSearch(levels, names.length, own.territories, {
19682
+ own: true,
19683
+ fromProject: own.territoriesFromProject
19684
+ }), [
19566
19685
  levels,
19567
19686
  names.length,
19568
19687
  draft.pick.territories,
19569
- own.territories
19688
+ own.territories,
19689
+ own.territoriesFromProject
19570
19690
  ]);
19571
19691
  (0, import_react.useEffect)(() => {
19572
19692
  if (pickedByHand || draft.savedSearch || editingSlug || !recommendation) return;
@@ -19609,7 +19729,10 @@ function NewClearance({ ctx }) {
19609
19729
  deadline: d.deadline
19610
19730
  };
19611
19731
  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 });
19732
+ const fits = after.draft.territories.length ? recommendSearch(levels, parseNames(after.names).length, after.draft.territories) : recommendSearch(levels, parseNames(after.names).length, own.territories, {
19733
+ own: true,
19734
+ fromProject: own.territoriesFromProject
19735
+ });
19613
19736
  if (read.product == null && !pickedByHand && !d.savedSearch && fits) after = {
19614
19737
  ...after,
19615
19738
  draft: chooseProduct(after.draft, fits.product)
@@ -19977,7 +20100,7 @@ function NewClearance({ ctx }) {
19977
20100
  gap: 6,
19978
20101
  margin: "9px 0 12px"
19979
20102
  },
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", {
20103
+ 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
20104
  "data-anon": "mark",
19982
20105
  className: reachesTerritory(t, registerTerritories) ? "chip" : "chip chip-deferred",
19983
20106
  title: reachesTerritory(t, registerTerritories) ? void 0 : notAvailableLine([t], registerLabel),
@@ -21948,10 +22071,8 @@ function clearPath(draft, path) {
21948
22071
  else next[head] = pruned;
21949
22072
  return next;
21950
22073
  }
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()));
22074
+ function revokedPlatforms(_customer, _project) {
22075
+ return [];
21955
22076
  }
21956
22077
  function stripCodeOwned(draft) {
21957
22078
  const out = { ...draft };
@@ -22856,15 +22977,15 @@ function Preferences({ ctx }) {
22856
22977
  setThemeState(next);
22857
22978
  };
22858
22979
  const contact = ctx.me.administratorContact;
22859
- const administrator = contact ? (0, import_jsx_runtime.jsx)("a", {
22980
+ const administrator = contact ? (0, import_jsx_runtime.jsxs)("a", {
22860
22981
  className: "pref-link",
22861
22982
  href: contact,
22862
22983
  .../^https?:/i.test(contact) ? {
22863
22984
  target: "_blank",
22864
22985
  rel: "noreferrer"
22865
22986
  } : {},
22866
- children: "Clearotron administrator"
22867
- }) : "Clearotron administrator";
22987
+ children: [ctx.me.brandName, " administrator"]
22988
+ }) : `${ctx.me.brandName} administrator`;
22868
22989
  return (0, import_jsx_runtime.jsxs)("div", {
22869
22990
  className: "screen",
22870
22991
  children: [(0, import_jsx_runtime.jsx)(PageHeader, { title: "Your preferences" }), (0, import_jsx_runtime.jsxs)("div", {
@@ -23008,8 +23129,8 @@ function connectionPill(aiConnected) {
23008
23129
  };
23009
23130
  return null;
23010
23131
  }
23011
- function watchForConnected(aiConnected) {
23012
- return aiConnected === false ? "This page says **Connected** once your assistant calls Clearotron." : null;
23132
+ function watchForConnected(aiConnected, name) {
23133
+ return aiConnected === false ? `This page says **Connected** once your assistant calls ${name}.` : null;
23013
23134
  }
23014
23135
  var foldsSteps = (aiConnected) => aiConnected === true;
23015
23136
  function continueOffer(input) {
@@ -23028,16 +23149,16 @@ var WHAT_YOU_CAN_DO = [
23028
23149
  ];
23029
23150
  var COPIED_MS = 2600;
23030
23151
  var PLACES = ["disk", "public-http"];
23031
- var WHERE = {
23152
+ var whereFor = (name) => ({
23032
23153
  disk: {
23033
- label: "Clearotron is installed on this machine (laptop/desktop)",
23154
+ label: `${name} is installed on this machine (laptop/desktop)`,
23034
23155
  icon: "laptop"
23035
23156
  },
23036
23157
  "public-http": {
23037
- label: "Clearotron is running elsewhere (e.g. Cloud/Server)",
23158
+ label: `${name} is running elsewhere (e.g. Cloud/Server)`,
23038
23159
  icon: "server"
23039
23160
  }
23040
- };
23161
+ });
23041
23162
  var HELP_URL = "https://github.com/CordilleraSarl/clearotron/blob/main/mcp-server/CONNECT.md";
23042
23163
  async function copy(text) {
23043
23164
  try {
@@ -23063,7 +23184,7 @@ var AT_REST = {
23063
23184
  revealedAt: null,
23064
23185
  revealed: null
23065
23186
  };
23066
- function StepsPanel({ offer, measuring = false, folded = false, watch = null, state = AT_REST, onBlock, onSecret }) {
23187
+ function StepsPanel({ offer, name, measuring = false, folded = false, watch = null, state = AT_REST, onBlock, onSecret }) {
23067
23188
  return (0, import_jsx_runtime.jsxs)("div", {
23068
23189
  className: folded ? "steps-panel-body" : "steps-panel",
23069
23190
  "data-for": measuring ? void 0 : offer.id,
@@ -23076,9 +23197,13 @@ function StepsPanel({ offer, measuring = false, folded = false, watch = null, st
23076
23197
  className: "steps-name",
23077
23198
  children: offer.name
23078
23199
  }),
23079
- offer.door === null && offer.altSteps?.length ? (0, import_jsx_runtime.jsx)("p", {
23200
+ offer.door === null && offer.altSteps?.length ? (0, import_jsx_runtime.jsxs)("p", {
23080
23201
  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."
23202
+ children: [
23203
+ "We could not check how ",
23204
+ name,
23205
+ " lets an assistant in, so both ways are below. Try the first — your assistant will tell you if it needs the other."
23206
+ ]
23082
23207
  }) : null,
23083
23208
  (0, import_jsx_runtime.jsx)(StepList, {
23084
23209
  steps: offer.steps,
@@ -23212,13 +23337,19 @@ function StepList({ steps, offset, quiet = false, watch = null, measuring = fals
23212
23337
  })
23213
23338
  });
23214
23339
  }
23215
- function NotOnline() {
23340
+ function NotOnline({ name }) {
23216
23341
  return (0, import_jsx_runtime.jsxs)("div", {
23217
23342
  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." })]
23343
+ children: [(0, import_jsx_runtime.jsx)("strong", { children: "Not available on this installation yet" }), (0, import_jsx_runtime.jsxs)("p", { children: [
23344
+ "Your AI app reaches ",
23345
+ name,
23346
+ " 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."
23347
+ ] })]
23219
23348
  });
23220
23349
  }
23221
23350
  function UseYourAI({ ctx }) {
23351
+ const name = ctx.me.brandName;
23352
+ const where = whereFor(name);
23222
23353
  const [access, setAccess] = (0, import_react.useState)(null);
23223
23354
  const [place, setPlace] = (0, import_react.useState)(null);
23224
23355
  const [picked, setPicked] = (0, import_react.useState)(null);
@@ -23249,7 +23380,7 @@ function UseYourAI({ ctx }) {
23249
23380
  const chosen = here.find((o) => o.id === picked) ?? null;
23250
23381
  const connected = access?.aiConnected ?? null;
23251
23382
  const pill = connectionPill(connected);
23252
- const watch = watchForConnected(connected);
23383
+ const watch = watchForConnected(connected, name);
23253
23384
  const folds = foldsSteps(connected);
23254
23385
  const back = continueOffer({
23255
23386
  aiConnected: connected,
@@ -23306,6 +23437,7 @@ function UseYourAI({ ctx }) {
23306
23437
  };
23307
23438
  const panel = chosen ? (0, import_jsx_runtime.jsx)(StepsPanel, {
23308
23439
  offer: chosen,
23440
+ name,
23309
23441
  folded: folds,
23310
23442
  watch,
23311
23443
  state: {
@@ -23363,10 +23495,10 @@ function UseYourAI({ ctx }) {
23363
23495
  "aria-hidden": "true"
23364
23496
  }), pill.label]
23365
23497
  }) : 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", {
23498
+ }), !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
23499
  className: "where-grid",
23368
23500
  role: "group",
23369
- "aria-label": "Where Clearotron is running",
23501
+ "aria-label": `Where ${name} is running`,
23370
23502
  children: PLACES.map((p) => (0, import_jsx_runtime.jsxs)("button", {
23371
23503
  type: "button",
23372
23504
  className: "where-card",
@@ -23385,13 +23517,13 @@ function UseYourAI({ ctx }) {
23385
23517
  "aria-hidden": "true"
23386
23518
  }),
23387
23519
  (0, import_jsx_runtime.jsx)(Icon, {
23388
- name: WHERE[p].icon,
23520
+ name: where[p].icon,
23389
23521
  size: 19
23390
23522
  }),
23391
- WHERE[p].label
23523
+ where[p].label
23392
23524
  ]
23393
23525
  }, p))
23394
- }) : null, active === null ? null : !here.length ? (0, import_jsx_runtime.jsx)(NotOnline, {}) : (0, import_jsx_runtime.jsxs)("div", {
23526
+ }) : null, active === null ? null : !here.length ? (0, import_jsx_runtime.jsx)(NotOnline, { name }) : (0, import_jsx_runtime.jsxs)("div", {
23395
23527
  className: "ai-connect-grid",
23396
23528
  children: [(0, import_jsx_runtime.jsxs)("div", { children: [(0, import_jsx_runtime.jsx)("h3", {
23397
23529
  className: "section-title",
@@ -23492,6 +23624,7 @@ function UseYourAI({ ctx }) {
23492
23624
  "aria-hidden": "true",
23493
23625
  children: here.map((o) => (0, import_jsx_runtime.jsx)(StepsPanel, {
23494
23626
  offer: o,
23627
+ name,
23495
23628
  watch,
23496
23629
  measuring: true
23497
23630
  }, o.id))
@@ -24046,7 +24179,7 @@ function FrameworkBlock({ readOnly, framework, everything, permitted }) {
24046
24179
  value: "Used when rating this company"
24047
24180
  }) : null, entries.map((k) => (0, import_jsx_runtime.jsx)(Row$2, {
24048
24181
  label: LABELS[k] ?? k,
24049
- value: k === "allowedRecipes" ? permitted : k === "jxPolicy" ? jxPolicyValue(readOnly[k]) : readOnlyValue(readOnly[k])
24182
+ value: k === "allowedRecipes" ? permitted : k === "jxPolicy" ? jxPolicyValue(readOnly[k]) : k === "runCaps" ? runCapsValue(readOnly[k]) : readOnlyValue(readOnly[k])
24050
24183
  }, k))]
24051
24184
  }) : null,
24052
24185
  (0, import_jsx_runtime.jsx)("div", {
@@ -24063,6 +24196,12 @@ var LABELS = {
24063
24196
  jxPolicy: "Jurisdiction policy",
24064
24197
  runCaps: "Run limits"
24065
24198
  };
24199
+ function runCapsValue(v) {
24200
+ const caps = v && typeof v === "object" ? v : {};
24201
+ const n = (x) => typeof x === "number" && Number.isFinite(x) ? x : null;
24202
+ 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);
24203
+ return parts.length ? parts.join(" · ") : readOnlyValue(v);
24204
+ }
24066
24205
  function Row$2({ label, value }) {
24067
24206
  return (0, import_jsx_runtime.jsxs)("div", {
24068
24207
  className: "fw-row",
@@ -25212,7 +25351,8 @@ function GlobalConfig({ ctx }) {
25212
25351
  children: [v.engine ? (0, import_jsx_runtime.jsx)(Engine, {
25213
25352
  engine: v.engine,
25214
25353
  programDisputed: (v.lastRun?.disagrees ?? []).some((d) => d.what === "engine program"),
25215
- channel: ctx.me.channel ?? null
25354
+ channel: ctx.me.channel ?? null,
25355
+ name: ctx.me.brandName
25216
25356
  }) : (0, import_jsx_runtime.jsx)(NotRecorded, {
25217
25357
  what: "which engine is running",
25218
25358
  source: v.source
@@ -25353,10 +25493,11 @@ var NotServed = () => (0, import_jsx_runtime.jsx)("div", {
25353
25493
  },
25354
25494
  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
25495
  });
25356
- function Engine({ engine, programDisputed = false, channel = null }) {
25496
+ function Engine({ engine, programDisputed = false, channel = null, name }) {
25357
25497
  return (0, import_jsx_runtime.jsx)(Row$1, { ...engineRow(engine, {
25358
25498
  programDisputed,
25359
- channel
25499
+ channel,
25500
+ name
25360
25501
  }) });
25361
25502
  }
25362
25503
  function Row$1({ ok, off = false, name, mono, state, faults, note = null, detail = null, guide = null, repo = null }) {
@@ -25436,6 +25577,7 @@ function useSourceRepo() {
25436
25577
  return result && isOk(result) && result.value.sourceRepo ? result.value.sourceRepo : null;
25437
25578
  }
25438
25579
  function PeopleAccess({ ctx }) {
25580
+ const installation = ctx.me.brandName;
25439
25581
  const peopleWrap = (0, import_react.useRef)(null);
25440
25582
  const { result } = useLoad(() => api.adminAccess(), []);
25441
25583
  const repo = useSourceRepo();
@@ -25480,9 +25622,9 @@ function PeopleAccess({ ctx }) {
25480
25622
  color: "var(--text-muted)"
25481
25623
  },
25482
25624
  children: [
25483
- (0, import_jsx_runtime.jsx)("b", {
25625
+ (0, import_jsx_runtime.jsxs)("b", {
25484
25626
  style: { color: "var(--text-strong)" },
25485
- children: "This Clearotron signs in one person: you."
25627
+ children: [installation, " signs in one person: you."]
25486
25628
  }),
25487
25629
  " To add people, put it behind a login system such as your company single sign-on.",
25488
25630
  " ",
@@ -25765,6 +25907,7 @@ var NOTHING = {
25765
25907
  };
25766
25908
  var oneAddress = (s) => /^[^\s@,;<>]+@[^\s@,;<>]+$/.test(s);
25767
25909
  function GiveAccess({ ctx }) {
25910
+ const installation = ctx.me.brandName;
25768
25911
  const { result: view } = useLoad(() => api.adminAccess(), []);
25769
25912
  const [email, setEmail] = (0, import_react.useState)("");
25770
25913
  const [permissions, setPermissions] = (0, import_react.useState)({
@@ -25795,9 +25938,9 @@ function GiveAccess({ ctx }) {
25795
25938
  color: "var(--text-muted)"
25796
25939
  },
25797
25940
  children: [
25798
- (0, import_jsx_runtime.jsx)("b", {
25941
+ (0, import_jsx_runtime.jsxs)("b", {
25799
25942
  style: { color: "var(--text-strong)" },
25800
- children: "This Clearotron signs in one person: you."
25943
+ children: [installation, " signs in one person: you."]
25801
25944
  }),
25802
25945
  " To add people, put it behind a login system such as your company single sign-on.",
25803
25946
  " ",
@@ -25846,7 +25989,8 @@ function GiveAccess({ ctx }) {
25846
25989
  companies: soloCompanies.map((k) => ({
25847
25990
  name: ctx.ownerName(k),
25848
25991
  organisation: orgName(ctx.orgOf(k) ?? "")
25849
- }))
25992
+ })),
25993
+ installation
25850
25994
  });
25851
25995
  const save = async () => {
25852
25996
  setBusy(true);
@@ -25861,7 +26005,7 @@ function GiveAccess({ ctx }) {
25861
26005
  setBusy(false);
25862
26006
  }
25863
26007
  };
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;
26008
+ 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
26009
  return (0, import_jsx_runtime.jsx)("div", {
25866
26010
  className: "screen",
25867
26011
  children: (0, import_jsx_runtime.jsxs)("div", {
@@ -25940,7 +26084,7 @@ function GiveAccess({ ctx }) {
25940
26084
  },
25941
26085
  children: [holdsEverything ? (0, import_jsx_runtime.jsx)(AttachRow$1, {
25942
26086
  on: chosen.everything,
25943
- name: "Everything on this Clearotron",
26087
+ name: `Everything on ${installation}`,
25944
26088
  line: REACH_LINE.everything,
25945
26089
  disabled: saved,
25946
26090
  onToggle: () => setChosen((c) => ({
@@ -26165,6 +26309,7 @@ function ModifyAccess({ ctx }) {
26165
26309
  }, person.email);
26166
26310
  }
26167
26311
  function Form({ ctx, person, view }) {
26312
+ const installation = ctx.me.brandName;
26168
26313
  const readOnlyPeople = view.localSignIn;
26169
26314
  const held = heldBy(person);
26170
26315
  const [permissions, setPermissions] = (0, import_react.useState)(person.permissions);
@@ -26210,7 +26355,8 @@ function Form({ ctx, person, view }) {
26210
26355
  companies: soloCompanies.map((k) => ({
26211
26356
  name: ctx.ownerName(k),
26212
26357
  organisation: orgName(ctx.orgOf(k) ?? "")
26213
- }))
26358
+ })),
26359
+ installation
26214
26360
  });
26215
26361
  const save = async () => {
26216
26362
  setBusy(true);
@@ -26234,9 +26380,9 @@ function Form({ ctx, person, view }) {
26234
26380
  setBusy(false);
26235
26381
  }
26236
26382
  };
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.");
26383
+ 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
26384
  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) : [];
26385
+ const loses = person.access.length ? person.access.map((a) => a.kind === "everything" ? `everything on ${installation}` : a.name ?? a.key) : [];
26240
26386
  const holdsKey = (person.keys ?? 0) > 0;
26241
26387
  const keyStaysLive = holdsKey && view.keysRevocable !== true;
26242
26388
  const domain = person.email.startsWith("*@") ? person.email.slice(2) : null;
@@ -26309,7 +26455,7 @@ function Form({ ctx, person, view }) {
26309
26455
  },
26310
26456
  children: [holdsEverything ? (0, import_jsx_runtime.jsx)(AttachRow, {
26311
26457
  on: true,
26312
- name: "Everything on this Clearotron",
26458
+ name: `Everything on ${installation}`,
26313
26459
  line: REACH_LINE.everything,
26314
26460
  disabled: true,
26315
26461
  onToggle: () => {}
@@ -26407,9 +26553,9 @@ function Form({ ctx, person, view }) {
26407
26553
  fontSize: 13.5,
26408
26554
  color: "var(--text-muted)"
26409
26555
  },
26410
- children: [(0, import_jsx_runtime.jsx)("b", {
26556
+ children: [(0, import_jsx_runtime.jsxs)("b", {
26411
26557
  style: { color: "var(--text-strong)" },
26412
- children: "This Clearotron signs in one person: you."
26558
+ children: [installation, " signs in one person: you."]
26413
26559
  }), " 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
26560
  })
26415
26561
  }) : null,
@@ -26472,7 +26618,7 @@ function Form({ ctx, person, view }) {
26472
26618
  " ",
26473
26619
  whole ? (0, import_jsx_runtime.jsxs)("b", { children: [
26474
26620
  "loses access to ",
26475
- loses.length ? loses.join(" and ") : "this Clearotron",
26621
+ loses.length ? loses.join(" and ") : installation,
26476
26622
  " straight away,"
26477
26623
  ] }) : (0, import_jsx_runtime.jsxs)("b", { children: [
26478
26624
  "loses ",
@@ -26481,7 +26627,9 @@ function Form({ ctx, person, view }) {
26481
26627
  ] }),
26482
26628
  " ",
26483
26629
  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.",
26630
+ "here. Their AI was issued a key ",
26631
+ installation,
26632
+ " cannot withdraw — it was started without a revocation list — so that key keeps working until it expires.",
26485
26633
  " ",
26486
26634
  (0, import_jsx_runtime.jsx)("b", {
26487
26635
  className: "mono",
@@ -26546,7 +26694,7 @@ function Form({ ctx, person, view }) {
26546
26694
  },
26547
26695
  disabled: busy || readOnlyPeople,
26548
26696
  onClick: () => setConfirming(true),
26549
- children: whole ? domain ? `Remove everyone at ${domain}` : "Remove from Clearotron" : `Remove from ${[...held.orgs].map(orgName).join(", ") || "here"}`
26697
+ children: whole ? domain ? `Remove everyone at ${domain}` : `Remove from ${installation}` : `Remove from ${[...held.orgs].map(orgName).join(", ") || "here"}`
26550
26698
  }), whole ? null : (0, import_jsx_runtime.jsx)("p", {
26551
26699
  style: {
26552
26700
  margin: 0,