clearotron 0.5.0 → 0.5.1-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 (123) hide show
  1. package/CONTRIBUTING.md +2 -2
  2. package/INSTALL.md +334 -302
  3. package/QUICKSTART.md +12 -4
  4. package/README.md +12 -7
  5. package/THIRD-PARTY-NOTICES.md +4 -4
  6. package/bin/README.md +14 -11
  7. package/bin/clearotron.mjs +1 -1
  8. package/bin/connect.mjs +73 -25
  9. package/bin/example.mjs +4 -2
  10. package/bin/onboard.mjs +562 -336
  11. package/bin/start.mjs +184 -36
  12. package/bin/update.mjs +26 -13
  13. package/build-info.json +2 -2
  14. package/docs/PORTAL.md +2 -2
  15. package/docs/architecture/02-architecture.md +3 -3
  16. package/docs/architecture/04-configuration-reference.md +1 -2
  17. package/docs/architecture/05-config-governance.md +1 -1
  18. package/docs/architecture/06-operations-runbook.md +1 -1
  19. package/driver/CHANGELOG.md +77 -0
  20. package/driver/README.md +2 -2
  21. package/driver/config-inventory.mjs +20 -11
  22. package/driver/contract-e3-backlog.mjs +27 -27
  23. package/driver/contract-e3-baseline.json +2 -2
  24. package/driver/contract-vocabulary.mjs +1 -1
  25. package/driver/degraded-parts.mjs +67 -3
  26. package/driver/dev-portal.mjs +1 -1
  27. package/driver/digest-queue.mjs +5 -5
  28. package/driver/driver.config.mjs +9 -9
  29. package/driver/engine/CONTRACT.md +1 -1
  30. package/driver/engine/anthropic-agent.mjs +4 -2
  31. package/driver/engine/mcp/band-server.mjs +1 -21
  32. package/driver/engine/mcp/clarivate-propose-tool.mjs +26 -0
  33. package/driver/engine/mcp/clarivate-server.mjs +2 -18
  34. package/driver/engine/mcp/fixture-register-server.mjs +33 -0
  35. package/driver/engine/mcp/gather-config.mjs +48 -7
  36. package/driver/engine/mcp/recording-server.mjs +206 -14
  37. package/driver/engine/mcp/supplemental.mjs +4 -2
  38. package/driver/engine/openai-agent.mjs +3 -1
  39. package/driver/engine/probe.mjs +10 -0
  40. package/driver/filing-goods.mjs +95 -0
  41. package/driver/findings-model.mjs +3 -0
  42. package/driver/gateway.mjs +42 -40
  43. package/driver/knockout-assess-record.mjs +54 -4
  44. package/driver/knockout-correction-record.mjs +342 -0
  45. package/driver/knockout-frame-record.mjs +4 -2
  46. package/driver/knockout-register-read.mjs +705 -0
  47. package/driver/knockout-register-record.mjs +222 -0
  48. package/driver/knockout-review-record.mjs +96 -25
  49. package/driver/narrative-refutation-record.mjs +87 -1
  50. package/driver/order-tables.mjs +23 -0
  51. package/driver/owner-use-check.mjs +5 -2
  52. package/driver/package.json +1 -1
  53. package/driver/partial-payload-baseline.json +8 -0
  54. package/driver/pipeline-knockout.mjs +506 -313
  55. package/driver/pipeline.mjs +179 -86
  56. package/driver/portal-local-auth.mjs +7 -1
  57. package/driver/portal-service.mjs +62 -6
  58. package/driver/progress.mjs +2 -2
  59. package/driver/publish/index.mjs +18 -21
  60. package/driver/publish/knockout.mjs +40 -18
  61. package/driver/publish/render-knockout.mjs +40 -27
  62. package/driver/publish/report-dates.mjs +43 -0
  63. package/driver/recall-reconciliation.mjs +2 -2
  64. package/driver/record-goods.mjs +50 -9
  65. package/driver/register-count.mjs +12 -59
  66. package/driver/register-fixture-marker.mjs +22 -0
  67. package/driver/register-plan.mjs +48 -0
  68. package/driver/register-records.mjs +84 -266
  69. package/driver/register-taint.mjs +2 -2
  70. package/driver/repair-composers.mjs +15 -8
  71. package/driver/result-noun-fields.mjs +6 -2
  72. package/driver/run-requirements.mjs +54 -4
  73. package/driver/runner.mjs +4 -13
  74. package/driver/skills/clearance-register/providers/clarivate.md +2 -2
  75. package/driver/skills/knockout-assess/SKILL.md +101 -100
  76. package/driver/skills/knockout-frame/SKILL.md +3 -1
  77. package/driver/skills/knockout-register-read/SKILL.md +77 -0
  78. package/driver/stages-knockout.mjs +159 -98
  79. package/driver/stages.mjs +4 -2
  80. package/driver/suite-census.json +389 -71
  81. package/driver/systemd/README.md +2 -2
  82. package/driver/verify-knockout.mjs +175 -39
  83. package/driver/verify.mjs +10 -9
  84. package/mcp-server/CHANGELOG.md +4 -0
  85. package/mcp-server/CONNECT.md +4 -0
  86. package/mcp-server/demo-mode.mjs +6 -0
  87. package/mcp-server/lib/demo-texts.mjs +38 -0
  88. package/mcp-server/lib/http-handler.mjs +7 -1
  89. package/mcp-server/lib/knockout.mjs +3 -2
  90. package/mcp-server/lib/options.mjs +3 -1
  91. package/mcp-server/lib/plan.mjs +6 -1
  92. package/mcp-server/mint-token.mjs +1 -1
  93. package/mcp-server/package.json +1 -1
  94. package/mcp-server/serve.mjs +11 -0
  95. package/mcp-server/server.mjs +13 -5
  96. package/package.json +1 -1
  97. package/portal-ui/dist/assets/{index-D2wrw9cH.css → index-AtB9ZpDH.css} +29 -0
  98. package/portal-ui/dist/assets/{index-DcLbvFmQ.js → index-C1oE78Wk.js} +161 -195
  99. package/portal-ui/dist/index.html +2 -2
  100. package/portal-ui/package.json +4 -4
  101. package/providers/README.md +4 -4
  102. package/providers/_shared/execute-plan.mjs +45 -1
  103. package/providers/_shared/term-shape.mjs +1 -1
  104. package/providers/clarivate/src/capabilities.js +7 -6
  105. package/providers/clarivate/src/core.js +11 -7
  106. package/providers/clarivate/src/wider-list.js +104 -0
  107. package/providers/oauth-mcp-bridge/CHANGELOG.md +4 -0
  108. package/providers/oauth-mcp-bridge/package.json +1 -1
  109. package/providers/signa/src/capabilities.js +0 -9
  110. package/scripts/e2e-first-time.mjs +8 -7
  111. package/scripts/freeze-example-run.mjs +2 -2
  112. package/scripts/settings-render-check.mjs +5 -3
  113. package/scripts/test-run.mjs +8 -2
  114. package/shared/client-door.mjs +11 -8
  115. package/shared/connect-clients.mjs +10 -4
  116. package/shared/demo-connection.mjs +43 -0
  117. package/shared/demo-start-args.mjs +7 -2
  118. package/shared/invocation.mjs +18 -3
  119. package/shared/permanent-install.mjs +14 -0
  120. package/shared/scope.mjs +8 -1
  121. package/shared/stdio-connect.mjs +43 -21
  122. package/shared/trigger-lane.mjs +7 -0
  123. package/shared/tty-style.mjs +21 -5
@@ -1,7 +1,6 @@
1
- //#region \0rolldown/runtime.js
2
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
3
- //#endregion
4
- //#region \0vite/modulepreload-polyfill.js
1
+ // \0rolldown/runtime.js
2
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
3
+ // \0vite/modulepreload-polyfill.js
5
4
  (function polyfill() {
6
5
  const relList = document.createElement("link").relList;
7
6
  if (relList && relList.supports && relList.supports("modulepreload")) return;
@@ -31,8 +30,7 @@ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).expor
31
30
  fetch(link.href, fetchOpts);
32
31
  }
33
32
  })();
34
- //#endregion
35
- //#region ../node_modules/react/cjs/react.production.js
33
+ // ../node_modules/react/cjs/react.production.js
36
34
  var require_react_production = __commonJSMin(((exports) => {
37
35
  var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
38
36
  var REACT_PORTAL_TYPE = Symbol.for("react.portal");
@@ -407,15 +405,13 @@ var require_react_production = __commonJSMin(((exports) => {
407
405
  exports.useTransition = function() {
408
406
  return ReactSharedInternals.H.useTransition();
409
407
  };
410
- exports.version = "19.3.0";
408
+ exports.version = "19.3.1";
411
409
  }));
412
- //#endregion
413
- //#region ../node_modules/react/index.js
410
+ // ../node_modules/react/index.js
414
411
  var require_react = __commonJSMin(((exports, module) => {
415
412
  module.exports = require_react_production();
416
413
  }));
417
- //#endregion
418
- //#region ../node_modules/scheduler/cjs/scheduler.production.js
414
+ // ../node_modules/scheduler/cjs/scheduler.production.js
419
415
  var require_scheduler_production = __commonJSMin(((exports) => {
420
416
  function push(heap, node) {
421
417
  var index = heap.length;
@@ -660,13 +656,11 @@ var require_scheduler_production = __commonJSMin(((exports) => {
660
656
  };
661
657
  };
662
658
  }));
663
- //#endregion
664
- //#region ../node_modules/scheduler/index.js
659
+ // ../node_modules/scheduler/index.js
665
660
  var require_scheduler = __commonJSMin(((exports, module) => {
666
661
  module.exports = require_scheduler_production();
667
662
  }));
668
- //#endregion
669
- //#region ../node_modules/react-dom/cjs/react-dom.production.js
663
+ // ../node_modules/react-dom/cjs/react-dom.production.js
670
664
  var require_react_dom_production = __commonJSMin(((exports) => {
671
665
  var React = require_react();
672
666
  function formatProdErrorMessage(code) {
@@ -807,10 +801,9 @@ var require_react_dom_production = __commonJSMin(((exports) => {
807
801
  exports.useFormStatus = function() {
808
802
  return ReactSharedInternals.H.useHostTransitionStatus();
809
803
  };
810
- exports.version = "19.3.0";
804
+ exports.version = "19.3.1";
811
805
  }));
812
- //#endregion
813
- //#region ../node_modules/react-dom/index.js
806
+ // ../node_modules/react-dom/index.js
814
807
  var require_react_dom = __commonJSMin(((exports, module) => {
815
808
  function checkDCE() {
816
809
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") return;
@@ -823,8 +816,7 @@ var require_react_dom = __commonJSMin(((exports, module) => {
823
816
  checkDCE();
824
817
  module.exports = require_react_dom_production();
825
818
  }));
826
- //#endregion
827
- //#region ../node_modules/react-dom/cjs/react-dom-client.production.js
819
+ // ../node_modules/react-dom/cjs/react-dom-client.production.js
828
820
  var require_react_dom_client_production = __commonJSMin(((exports) => {
829
821
  var Scheduler = require_scheduler();
830
822
  var React = require_react();
@@ -11353,7 +11345,7 @@ var require_react_dom_client_production = __commonJSMin(((exports) => {
11353
11345
  }
11354
11346
  };
11355
11347
  var isomorphicReactPackageVersion$jscomp$inline_2043 = React.version;
11356
- if ("19.3.0" !== isomorphicReactPackageVersion$jscomp$inline_2043) throw Error(formatProdErrorMessage(527, isomorphicReactPackageVersion$jscomp$inline_2043, "19.3.0"));
11348
+ if ("19.3.1" !== isomorphicReactPackageVersion$jscomp$inline_2043) throw Error(formatProdErrorMessage(527, isomorphicReactPackageVersion$jscomp$inline_2043, "19.3.1"));
11357
11349
  ReactDOMSharedInternals.findDOMNode = function(componentOrElement) {
11358
11350
  var fiber = componentOrElement._reactInternals;
11359
11351
  if (void 0 === fiber) {
@@ -11368,10 +11360,10 @@ var require_react_dom_client_production = __commonJSMin(((exports) => {
11368
11360
  };
11369
11361
  var internals$jscomp$inline_2586 = {
11370
11362
  bundleType: 0,
11371
- version: "19.3.0",
11363
+ version: "19.3.1",
11372
11364
  rendererPackageName: "react-dom",
11373
11365
  currentDispatcherRef: ReactSharedInternals,
11374
- reconcilerVersion: "19.3.0"
11366
+ reconcilerVersion: "19.3.1"
11375
11367
  };
11376
11368
  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
11377
11369
  var hook$jscomp$inline_2587 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -11389,8 +11381,7 @@ var require_react_dom_client_production = __commonJSMin(((exports) => {
11389
11381
  return new ReactDOMRoot(options);
11390
11382
  };
11391
11383
  }));
11392
- //#endregion
11393
- //#region ../node_modules/react-dom/client.js
11384
+ // ../node_modules/react-dom/client.js
11394
11385
  var require_client = __commonJSMin(((exports, module) => {
11395
11386
  function checkDCE() {
11396
11387
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") return;
@@ -11403,8 +11394,7 @@ var require_client = __commonJSMin(((exports, module) => {
11403
11394
  checkDCE();
11404
11395
  module.exports = require_react_dom_client_production();
11405
11396
  }));
11406
- //#endregion
11407
- //#region src/fonts.css
11397
+ // src/fonts.css
11408
11398
  var import_react = require_react();
11409
11399
  var import_client = require_client();
11410
11400
  var TONE_SET = new Set([
@@ -11437,8 +11427,7 @@ function worstBand(bands, labels) {
11437
11427
  }
11438
11428
  return worst;
11439
11429
  }
11440
- //#endregion
11441
- //#region src/contract/genericKey.ts
11430
+ // src/contract/genericKey.ts
11442
11431
  var GENERIC_ACCOUNT = "generic";
11443
11432
  var PREFIX = "generic:";
11444
11433
  var genericFor = (org) => PREFIX + org;
@@ -11454,8 +11443,7 @@ function wireAccount(key) {
11454
11443
  function runKey(run) {
11455
11444
  return isGenericKey(run.account) && run.organisation ? genericFor(run.organisation) : run.account;
11456
11445
  }
11457
- //#endregion
11458
- //#region src/contract/api.ts
11446
+ // src/contract/api.ts
11459
11447
  var isOk = (r) => r.kind === "ok";
11460
11448
  function saveFailureText(r, fallback = "That change could not be saved.") {
11461
11449
  switch (r.kind) {
@@ -11629,6 +11617,11 @@ function decodeStatus(status, body) {
11629
11617
  errors: errorsOf(body),
11630
11618
  detail: refused
11631
11619
  };
11620
+ if (refused?.code === "not_configured") return {
11621
+ kind: "gate",
11622
+ message: errorsOf(body)[0] ?? "That could not be done. Nothing was changed.",
11623
+ detail: refused
11624
+ };
11632
11625
  if (refused) return {
11633
11626
  kind: "gate",
11634
11627
  message: "That could not be done. Nothing was changed.",
@@ -11868,6 +11861,8 @@ var api = {
11868
11861
  houseMarketplaces: asStrings(b["houseMarketplaces"]),
11869
11862
  engineMode: b["engineMode"] === "demo" ? "demo" : b["engineMode"] === "engine-unproven" ? "engine-unproven" : null,
11870
11863
  engineProgramDisputed: b["engineProgramDisputed"] === true ? true : b["engineProgramDisputed"] === false ? false : null,
11864
+ canSearch: b["canSearch"] !== false,
11865
+ searchRefusal: b["canSearch"] === false && typeof b["searchRefusal"] === "string" ? b["searchRefusal"] : null,
11871
11866
  setupRoute: b["setupRoute"] === "packaged" ? "packaged" : b["setupRoute"] === "checkout" ? "checkout" : null,
11872
11867
  brand: typeof b["brand"] === "string" ? b["brand"] : "",
11873
11868
  administratorContact: typeof b["administratorContact"] === "string" && /^(mailto:[^\s]+@|https?:\/\/[^\s])/i.test(b["administratorContact"]) ? b["administratorContact"] : null,
@@ -12226,7 +12221,8 @@ var api = {
12226
12221
  program: asString(e["program"]),
12227
12222
  install: asString(e["install"]),
12228
12223
  programSetting: asString(e["programSetting"]),
12229
- setupRoute: e["setupRoute"] === "packaged" ? "packaged" : e["setupRoute"] === "checkout" ? "checkout" : null
12224
+ setupRoute: e["setupRoute"] === "packaged" ? "packaged" : e["setupRoute"] === "checkout" ? "checkout" : null,
12225
+ selected: e["selected"] !== false
12230
12226
  };
12231
12227
  })() : null,
12232
12228
  providers: Array.isArray(b["providers"]) ? asArray(b["providers"]).map((p) => {
@@ -12359,8 +12355,7 @@ var api = {
12359
12355
  })
12360
12356
  }))
12361
12357
  };
12362
- //#endregion
12363
- //#region src/nav/nav.config.ts
12358
+ // src/nav/nav.config.ts
12364
12359
  var NAV = [
12365
12360
  {
12366
12361
  id: "home",
@@ -12572,8 +12567,7 @@ function decode(segment) {
12572
12567
  var PEOPLE = NAV.find((e) => e.id === "people");
12573
12568
  var ADD_PERSON = NAV.find((e) => e.id === "people.add");
12574
12569
  var MODIFY_PERSON = NAV.find((e) => e.id === "people.modify");
12575
- //#endregion
12576
- //#region ../node_modules/react/cjs/react-jsx-runtime.production.js
12570
+ // ../node_modules/react/cjs/react-jsx-runtime.production.js
12577
12571
  var require_react_jsx_runtime_production = __commonJSMin(((exports) => {
12578
12572
  var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element");
12579
12573
  var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
@@ -12598,8 +12592,7 @@ var require_react_jsx_runtime_production = __commonJSMin(((exports) => {
12598
12592
  exports.jsx = jsxProd;
12599
12593
  exports.jsxs = jsxProd;
12600
12594
  }));
12601
- //#endregion
12602
- //#region src/components/Icon.tsx
12595
+ // src/components/Icon.tsx
12603
12596
  var import_jsx_runtime = __commonJSMin(((exports, module) => {
12604
12597
  module.exports = require_react_jsx_runtime_production();
12605
12598
  }))();
@@ -12653,8 +12646,7 @@ function Icon({ name, size = 17, className }) {
12653
12646
  children: (0, import_jsx_runtime.jsx)("path", { d })
12654
12647
  });
12655
12648
  }
12656
- //#endregion
12657
- //#region src/components/Logo.tsx
12649
+ // src/components/Logo.tsx
12658
12650
  var WORDMARK = "clearotron";
12659
12651
  function BracketMark({ size = 20 }) {
12660
12652
  return (0, import_jsx_runtime.jsxs)("svg", {
@@ -12747,8 +12739,7 @@ function Logo({ markOnly = false }) {
12747
12739
  })]
12748
12740
  });
12749
12741
  }
12750
- //#endregion
12751
- //#region src/state/useApi.ts
12742
+ // src/state/useApi.ts
12752
12743
  var ACTIVE_MS = 5e3;
12753
12744
  var IDLE_MS = 3e4;
12754
12745
  var BACKOFF_MS = 6e4;
@@ -12823,8 +12814,7 @@ function usePoll(reload, { active, rateLimited }) {
12823
12814
  if (visible) reloadRef.current();
12824
12815
  }, [visible]);
12825
12816
  }
12826
- //#endregion
12827
- //#region src/state/guard.ts
12817
+ // src/state/guard.ts
12828
12818
  var sources = new Set();
12829
12819
  function registerGuard(isDirty) {
12830
12820
  sources.add(isDirty);
@@ -12853,8 +12843,7 @@ function attachBeforeUnload() {
12853
12843
  window.addEventListener("beforeunload", on);
12854
12844
  return () => window.removeEventListener("beforeunload", on);
12855
12845
  }
12856
- //#endregion
12857
- //#region src/state/blurChoice.ts
12846
+ // src/state/blurChoice.ts
12858
12847
  var BLUR_KEY = "cordillera-blur-names";
12859
12848
  function readBlurChoice(store) {
12860
12849
  try {
@@ -12868,8 +12857,7 @@ function writeBlurChoice(store, on) {
12868
12857
  store().setItem(BLUR_KEY, on ? "on" : "off");
12869
12858
  } catch {}
12870
12859
  }
12871
- //#endregion
12872
- //#region src/contract/ownerNames.ts
12860
+ // src/contract/ownerNames.ts
12873
12861
  var ALL_OWNERS = "All companies";
12874
12862
  function ownerNameMap(granted, roster) {
12875
12863
  const out = {};
@@ -12882,8 +12870,7 @@ var sortOwners = (names, keys) => keys.map((k) => ({
12882
12870
  key: k,
12883
12871
  name: ownerNameFrom(names, k)
12884
12872
  })).sort((a, b) => a.name.localeCompare(b.name));
12885
- //#endregion
12886
- //#region src/contract/companyFacts.ts
12873
+ // src/contract/companyFacts.ts
12887
12874
  var sentenceCase = (s) => /^[a-z]/.test(s) ? s[0].toUpperCase() + s.slice(1) : s;
12888
12875
  function companyFactsLine(facts) {
12889
12876
  if (!facts) return "";
@@ -12900,8 +12887,7 @@ function companyFactsMap(granted, roster) {
12900
12887
  for (const c of roster) if (c.key && c.facts) out[c.key] = c.facts;
12901
12888
  return out;
12902
12889
  }
12903
- //#endregion
12904
- //#region src/shell/companyRows.ts
12890
+ // src/shell/companyRows.ts
12905
12891
  var GENERIC_KEY = GENERIC_ACCOUNT;
12906
12892
  function switcherKeys(me, roster) {
12907
12893
  return [...(me.allAccounts ? (roster ?? []).map((c) => c.key) : me.accounts).filter((k) => !isGenericKey(k)), ...me.genericOrgs.map(genericFor)];
@@ -12949,8 +12935,7 @@ function pickerRows(keys, orgOf, organisations, companyName, factsFor) {
12949
12935
  function switcherLabel(row) {
12950
12936
  return row.generic ? `${row.name} (Default)` : row.name;
12951
12937
  }
12952
- //#endregion
12953
- //#region src/shell/accessWords.ts
12938
+ // src/shell/accessWords.ts
12954
12939
  function permissionsPhrase(p) {
12955
12940
  const on = [p.run ? "Runs clearances" : null, p.manage ? "Manages" : null].filter((w) => w !== null);
12956
12941
  return on.length ? on.join(" · ") : "View reports";
@@ -13013,8 +12998,7 @@ function accessSentence(input) {
13013
12998
  const first = `${who} will see ${places}, and ${can}.`;
13014
12999
  return limits.length ? `${first} They ${limits.join(", and ")}.` : first;
13015
13000
  }
13016
- //#endregion
13017
- //#region src/shell/permissions.ts
13001
+ // src/shell/permissions.ts
13018
13002
  function canManage(who) {
13019
13003
  return who.permissions.manage;
13020
13004
  }
@@ -13024,8 +13008,7 @@ function canRun(who) {
13024
13008
  function seesEverything(who) {
13025
13009
  return who.allAccounts === true;
13026
13010
  }
13027
- //#endregion
13028
- //#region src/components/PageHeader.tsx
13011
+ // src/components/PageHeader.tsx
13029
13012
  function PageHeader({ title, lede, actions }) {
13030
13013
  return (0, import_jsx_runtime.jsxs)("header", {
13031
13014
  className: "page-header",
@@ -13044,8 +13027,7 @@ function PageHeader({ title, lede, actions }) {
13044
13027
  }) : null]
13045
13028
  });
13046
13029
  }
13047
- //#endregion
13048
- //#region src/shell/CompanyPicker.tsx
13030
+ // src/shell/CompanyPicker.tsx
13049
13031
  function CompanyCard({ row, onPick }) {
13050
13032
  return (0, import_jsx_runtime.jsxs)("button", {
13051
13033
  type: "button",
@@ -13158,8 +13140,7 @@ function CompanyGate({ ctx, heading, line }) {
13158
13140
  });
13159
13141
  }
13160
13142
  var NEW_COMPANY_PATH = "/portal/brand/new";
13161
- //#endregion
13162
- //#region src/shell/AppShell.tsx
13143
+ // src/shell/AppShell.tsx
13163
13144
  var MOBILE = "(max-width: 899px)";
13164
13145
  function useIsMobile() {
13165
13146
  const [m, setM] = (0, import_react.useState)(() => window.matchMedia(MOBILE).matches);
@@ -13678,8 +13659,7 @@ var initials = (email) => {
13678
13659
  const parts = name.split(/[._-]+/).filter(Boolean);
13679
13660
  return (parts.length >= 2 ? `${parts[0]?.[0] ?? ""}${parts[1]?.[0] ?? ""}` : name.slice(0, 2)).toUpperCase();
13680
13661
  };
13681
- //#endregion
13682
- //#region src/shell/CompanyChips.tsx
13662
+ // src/shell/CompanyChips.tsx
13683
13663
  function CompanyChips({ ctx, label }) {
13684
13664
  const rows = pickerRows(ctx.ownerKeys, ctx.orgOf, ctx.organisations, ctx.ownerName, ctx.factsFor);
13685
13665
  if (rows.length < 2) return null;
@@ -13704,8 +13684,7 @@ function CompanyChips({ ctx, label }) {
13704
13684
  }, r.key))]
13705
13685
  });
13706
13686
  }
13707
- //#endregion
13708
- //#region src/contract/reads.ts
13687
+ // src/contract/reads.ts
13709
13688
  function markKey(name) {
13710
13689
  return name.trim().toLowerCase();
13711
13690
  }
@@ -13765,8 +13744,7 @@ function readLabelParts(run) {
13765
13744
  date: run.date || null
13766
13745
  };
13767
13746
  }
13768
- //#endregion
13769
- //#region src/contract/grouping.ts
13747
+ // src/contract/grouping.ts
13770
13748
  function namesIn(row) {
13771
13749
  return row.kind === "family" ? row.marks.length : 1;
13772
13750
  }
@@ -13879,8 +13857,7 @@ function rolledUp(fam) {
13879
13857
  running: fam.marks.reduce((n, m) => n + m.running, 0)
13880
13858
  };
13881
13859
  }
13882
- //#endregion
13883
- //#region src/contract/failure.ts
13860
+ // src/contract/failure.ts
13884
13861
  var STAGE_PHRASE = {
13885
13862
  "matter-frame": "while framing the matter",
13886
13863
  "clearance-variants": "while working out which variants to search",
@@ -14655,8 +14632,7 @@ var offered_territories_default = {
14655
14632
  "untiered": []
14656
14633
  }
14657
14634
  };
14658
- //#endregion
14659
- //#region src/contract/composerProduct.ts
14635
+ // src/contract/composerProduct.ts
14660
14636
  var EMPTY_DRAFT = {
14661
14637
  product: null,
14662
14638
  territories: [],
@@ -15286,8 +15262,7 @@ function inherited({ profile, projectEffective, projectOrigins, ownerLabel, proj
15286
15262
  density: typeof source["marketplaceDensity"] === "string" ? source["marketplaceDensity"] : null
15287
15263
  };
15288
15264
  }
15289
- //#endregion
15290
- //#region src/contract/home.ts
15265
+ // src/contract/home.ts
15291
15266
  var RANK = {
15292
15267
  failed: 0,
15293
15268
  running: 1,
@@ -15470,8 +15445,12 @@ function moveBefore(order, id, over) {
15470
15445
  next.splice(to, 0, id);
15471
15446
  return next;
15472
15447
  }
15473
- //#endregion
15474
- //#region src/screens/Home.tsx
15448
+ // src/components/Ticked.tsx
15449
+ function Ticked({ text }) {
15450
+ const parts = text.split(/(`[^`]+`)/g).filter((p) => p !== "");
15451
+ return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: parts.map((p, n) => p.length > 2 && p.startsWith("`") && p.endsWith("`") ? (0, import_jsx_runtime.jsx)("code", { children: p.slice(1, -1) }, n) : (0, import_jsx_runtime.jsx)("span", { children: p }, n)) });
15452
+ }
15453
+ // src/screens/Home.tsx
15475
15454
  var TERMINAL$1 = new Set([
15476
15455
  "delivered",
15477
15456
  "failed",
@@ -15536,8 +15515,17 @@ function Home({ ctx }) {
15536
15515
  }),
15537
15516
  (0, import_jsx_runtime.jsx)(InFlightBand, {
15538
15517
  breakdown: inFlightBreakdown(rows),
15539
- note: rows.length === 0 ? `Nothing running right now.${canRun(ctx.me) ? " Start one with New clearance." : ""}` : slotNote(null, ctx.me.concurrentRuns)
15518
+ note: rows.length === 0 ? `Nothing running right now.${canRun(ctx.me) && ctx.me.canSearch !== false ? " Start one with New clearance." : ""}` : slotNote(null, ctx.me.concurrentRuns)
15540
15519
  }),
15520
+ canRun(ctx.me) && ctx.me.canSearch === false && ctx.me.searchRefusal ? (0, import_jsx_runtime.jsx)("p", {
15521
+ className: "notice",
15522
+ role: "status",
15523
+ style: {
15524
+ margin: "0 0 18px",
15525
+ fontSize: 13
15526
+ },
15527
+ children: (0, import_jsx_runtime.jsx)(Ticked, { text: ctx.me.searchRefusal })
15528
+ }) : null,
15541
15529
  (0, import_jsx_runtime.jsx)("div", {
15542
15530
  style: { margin: "0 0 18px" },
15543
15531
  children: (0, import_jsx_runtime.jsx)(CompanyChips, {
@@ -15837,11 +15825,7 @@ function Card({ run, ctx, onChanged, stamp, compact = false }) {
15837
15825
  }),
15838
15826
  stopping ? (0, import_jsx_runtime.jsx)("div", {
15839
15827
  className: "home2-stop-note",
15840
- children: took?.note ? took.note : (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
15841
- "Stopping — letting ",
15842
- run.step ? `${run.step}` : "the step in flight",
15843
- " finish. No report will be produced. Completed work stays readable through Ask AI."
15844
- ] })
15828
+ children: took?.note ? took.note : (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: "Stopping when the current step finishes. No report will be produced. Completed work stays readable through Ask AI." })
15845
15829
  }) : null
15846
15830
  ]
15847
15831
  })]
@@ -15875,7 +15859,6 @@ function StopChoice({ name, step, stoppable, onImmediate, onBoundary, onCancel }
15875
15859
  window.addEventListener("keydown", on);
15876
15860
  return () => window.removeEventListener("keydown", on);
15877
15861
  }, [onCancel]);
15878
- const stepName = step ?? "The step in flight";
15879
15862
  return (0, import_jsx_runtime.jsx)("div", {
15880
15863
  className: "modal-scrim",
15881
15864
  onClick: onCancel,
@@ -15908,6 +15891,14 @@ function StopChoice({ name, step, stoppable, onImmediate, onBoundary, onCancel }
15908
15891
  "data-anon": "mark",
15909
15892
  children: name
15910
15893
  }),
15894
+ step ? (0, import_jsx_runtime.jsxs)("p", {
15895
+ style: {
15896
+ margin: "0 0 6px",
15897
+ fontSize: 12.5,
15898
+ color: "var(--text-muted)"
15899
+ },
15900
+ children: ["Current step: ", step]
15901
+ }) : null,
15911
15902
  (0, import_jsx_runtime.jsx)("p", {
15912
15903
  style: {
15913
15904
  margin: 0,
@@ -15932,7 +15923,7 @@ function StopChoice({ name, step, stoppable, onImmediate, onBoundary, onCancel }
15932
15923
  onChange: () => setMode("boundary")
15933
15924
  }),
15934
15925
  (0, import_jsx_runtime.jsx)("b", { children: "Stop after this step" }),
15935
- (0, import_jsx_runtime.jsxs)("span", { children: [stepName, " finishes first, so its work is kept. There is no reliable completion estimate for this step."] })
15926
+ (0, import_jsx_runtime.jsx)("span", { children: "This step finishes first, so its work is kept. There is no reliable completion estimate for this step." })
15936
15927
  ]
15937
15928
  }), (0, import_jsx_runtime.jsxs)("label", {
15938
15929
  className: `stop-choice-opt stop-choice-now${mode === "immediate" ? " selected" : ""}`,
@@ -15944,7 +15935,7 @@ function StopChoice({ name, step, stoppable, onImmediate, onBoundary, onCancel }
15944
15935
  onChange: () => setMode("immediate")
15945
15936
  }),
15946
15937
  (0, import_jsx_runtime.jsx)("b", { children: "Stop now" }),
15947
- (0, import_jsx_runtime.jsxs)("span", { children: [stepName, " is cut off and its work is lost. Everything recorded before it is kept. If it will not take the stop, the run stops at the next step instead."] })
15938
+ (0, import_jsx_runtime.jsx)("span", { children: "This step is cut off and its work is lost. Everything recorded before it is kept. If it will not take the stop, the run stops at the next step instead." })
15948
15939
  ]
15949
15940
  })]
15950
15941
  }),
@@ -16146,8 +16137,7 @@ function FirstRun$1({ onNew }) {
16146
16137
  })]
16147
16138
  });
16148
16139
  }
16149
- //#endregion
16150
- //#region src/contract/listView.ts
16140
+ // src/contract/listView.ts
16151
16141
  function pageWindow(rows, page, size) {
16152
16142
  const pageCount = Math.max(1, Math.ceil(rows.length / size));
16153
16143
  const current = Math.min(Math.max(0, Math.floor(page) || 0), pageCount - 1);
@@ -16233,8 +16223,7 @@ function clearancesColumns(mode, width = { wide: false }) {
16233
16223
  share: rest
16234
16224
  } : c);
16235
16225
  }
16236
- //#endregion
16237
- //#region src/contract/nameRow.ts
16226
+ // src/contract/nameRow.ts
16238
16227
  function hasReport(read) {
16239
16228
  return Boolean(read.report) || read.reports.length > 0;
16240
16229
  }
@@ -16301,8 +16290,7 @@ function nameActions(mark) {
16301
16290
  function shownBand(row) {
16302
16291
  return row.kind === "family" ? row.band : shownReport(row)?.band ?? null;
16303
16292
  }
16304
- //#endregion
16305
- //#region src/components/RiskDot.tsx
16293
+ // src/components/RiskDot.tsx
16306
16294
  function RiskDot({ tone, label }) {
16307
16295
  if (!label) return (0, import_jsx_runtime.jsx)("span", {
16308
16296
  style: { color: "var(--text-faint)" },
@@ -16417,8 +16405,7 @@ function StatusCell({ state, step, reason, failedStage, pausedKind = null, reset
16417
16405
  children: detail
16418
16406
  }) : null] });
16419
16407
  }
16420
- //#endregion
16421
- //#region src/components/PinnedScrollbar.tsx
16408
+ // src/components/PinnedScrollbar.tsx
16422
16409
  function PinnedScrollbar({ target }) {
16423
16410
  const track = (0, import_react.useRef)(null);
16424
16411
  const [g, setG] = (0, import_react.useState)({
@@ -16512,8 +16499,7 @@ function allowanceLine(usage, brand) {
16512
16499
  if (left === 0) return `You have used all ${usage?.dailyRuns ?? 0} of this account's searches for today. The allowance resets at midnight UTC — or ask ${who} to run this one for you.`;
16513
16500
  return `${left} search${left === 1 ? "" : "es"} left today. The allowance resets at midnight UTC, or ask ${who} to run one for you.`;
16514
16501
  }
16515
- //#endregion
16516
- //#region src/contract/askAi.ts
16502
+ // src/contract/askAi.ts
16517
16503
  var MONTHS = [
16518
16504
  "",
16519
16505
  "January",
@@ -16664,8 +16650,7 @@ function askAiOffer(run, access) {
16664
16650
  connected: access?.aiConnected === true
16665
16651
  };
16666
16652
  }
16667
- //#endregion
16668
- //#region src/components/AskAi.tsx
16653
+ // src/components/AskAi.tsx
16669
16654
  function AskAi({ runId, markSlug = null, markName, date, kind, productName, access, go, quiet = false, openOnArrival = false, fromFinding = null, hideButton = false, onClose }) {
16670
16655
  const [open, setOpen] = (0, import_react.useState)(openOnArrival);
16671
16656
  const [about, setAbout] = (0, import_react.useState)(null);
@@ -16884,8 +16869,7 @@ function AskAi({ runId, markSlug = null, markName, date, kind, productName, acce
16884
16869
  ]
16885
16870
  });
16886
16871
  }
16887
- //#endregion
16888
- //#region src/screens/Clearances.tsx
16872
+ // src/screens/Clearances.tsx
16889
16873
  var FIRST_CLICK_DESC = {
16890
16874
  date: true,
16891
16875
  risk: false,
@@ -18018,8 +18002,7 @@ function AllowanceLine({ account, brand }) {
18018
18002
  children: line
18019
18003
  });
18020
18004
  }
18021
- //#endregion
18022
- //#region src/contract/inlineMd.ts
18005
+ // src/contract/inlineMd.ts
18023
18006
  var INLINE = /\*\*([^*]+)\*\*|\*([^*]+)\*|`([^`]+)`/g;
18024
18007
  function inlineSpans(text) {
18025
18008
  const src = String(text ?? "");
@@ -18052,8 +18035,7 @@ function inlineSpans(text) {
18052
18035
  });
18053
18036
  return out;
18054
18037
  }
18055
- //#endregion
18056
- //#region src/contract/summaryBlocks.ts
18038
+ // src/contract/summaryBlocks.ts
18057
18039
  var SUMMARY_BLOCK_LINE = /^[ \t]*(?:#{1,6}[ \t]|[-*][ \t])/m;
18058
18040
  function parseSummaryBlocks(chunk) {
18059
18041
  const out = [];
@@ -18107,8 +18089,7 @@ function parseSummaryBlocks(chunk) {
18107
18089
  flushBullets();
18108
18090
  return out;
18109
18091
  }
18110
- //#endregion
18111
- //#region src/contract/reportFrame.ts
18092
+ // src/contract/reportFrame.ts
18112
18093
  var FRAME_TAG = "cordillera-report";
18113
18094
  var FIRST_PAINT = 1400;
18114
18095
  var MAX_FRAME = 2e5;
@@ -18261,8 +18242,7 @@ function frameCommand(command, value) {
18261
18242
  value
18262
18243
  };
18263
18244
  }
18264
- //#endregion
18265
- //#region src/screens/Result.tsx
18245
+ // src/screens/Result.tsx
18266
18246
  function usePortalTheme() {
18267
18247
  const read = () => document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light";
18268
18248
  const [theme, setTheme] = (0, import_react.useState)(read);
@@ -18897,9 +18877,9 @@ function Missing({ go, reason }) {
18897
18877
  })
18898
18878
  });
18899
18879
  }
18900
- //#endregion
18901
- //#region src/contract/engineState.ts
18880
+ // src/contract/engineState.ts
18902
18881
  var SETUP_COMMAND = "`npx clearotron install`";
18882
+ var NO_ENGINE = "No search engine is attached to this install.";
18903
18883
  var listed = (xs, and = "and") => xs.length <= 1 ? xs[0] ?? "" : `${xs.slice(0, -1).join(", ")} ${and} ${xs[xs.length - 1]}`;
18904
18884
  var PAID_BY = {
18905
18885
  subscription: "subscription",
@@ -18941,6 +18921,7 @@ function billingRefusalSentence(r) {
18941
18921
  }
18942
18922
  function engineRowFaults(engine, { programDisputed = false } = {}) {
18943
18923
  const reason = engine.billing.reason ?? null;
18924
+ if (engine.selected === false) return [NO_ENGINE];
18944
18925
  return [
18945
18926
  ...engine.known ? [] : [`This build does not ship an engine called ${engine.id}.`],
18946
18927
  ...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."] : [],
@@ -18959,7 +18940,7 @@ function engineNotice({ programDisputed }) {
18959
18940
  };
18960
18941
  return {
18961
18942
  state: "absent",
18962
- headline: "No search engine is attached to this install.",
18943
+ headline: NO_ENGINE,
18963
18944
  before: "Everything else works — the example report, its audit trail and the assistant connection are live right now. The setup wizard offers to install a reasoning CLI if this machine has none, and asks how it is paid for. To start new searches, run the setup wizard",
18964
18945
  namesSetupCommand: true,
18965
18946
  after: "Then restart the service: this reading was taken when it started, and it will not notice a new install until it starts again."
@@ -18967,6 +18948,13 @@ function engineNotice({ programDisputed }) {
18967
18948
  }
18968
18949
  function engineRow(engine, { programDisputed = false } = {}) {
18969
18950
  const faults = engineRowFaults(engine, { programDisputed });
18951
+ if (engine.selected === false) return {
18952
+ ok: false,
18953
+ name: "Not set",
18954
+ mono: "",
18955
+ state: "Missing",
18956
+ faults
18957
+ };
18970
18958
  return {
18971
18959
  ok: faults.length === 0,
18972
18960
  name: engine.vendor ?? engine.id,
@@ -18975,8 +18963,7 @@ function engineRow(engine, { programDisputed = false } = {}) {
18975
18963
  faults
18976
18964
  };
18977
18965
  }
18978
- //#endregion
18979
- //#region src/contract/compose.ts
18966
+ // src/contract/compose.ts
18980
18967
  function parseNames(raw) {
18981
18968
  return raw.split(/[\n,]/).map((s) => s.trim()).filter(Boolean);
18982
18969
  }
@@ -18993,8 +18980,7 @@ function parseList(raw) {
18993
18980
  }
18994
18981
  return out;
18995
18982
  }
18996
- //#endregion
18997
- //#region src/contract/productMatrix.ts
18983
+ // src/contract/productMatrix.ts
18998
18984
  var MARKERS = {
18999
18985
  full: {
19000
18986
  glyph: "●",
@@ -19074,8 +19060,7 @@ function productMatrix(unordered, currentKey = null) {
19074
19060
  }))
19075
19061
  };
19076
19062
  }
19077
- //#endregion
19078
- //#region src/contract/niceClasses.ts
19063
+ // src/contract/niceClasses.ts
19079
19064
  var NICE_CLASSES = {
19080
19065
  1: "Chemicals",
19081
19066
  2: "Paints",
@@ -19242,8 +19227,7 @@ function classMatches(query, chosen, limit = 8) {
19242
19227
  };
19243
19228
  return ALL_CLASSES.filter((n) => free(n) && hit(n)).slice(0, limit);
19244
19229
  }
19245
- //#endregion
19246
- //#region src/contract/savedSearches.ts
19230
+ // src/contract/savedSearches.ts
19247
19231
  function statusFor(recipe, levels) {
19248
19232
  const level = levels.find((l) => l.key === recipe.base);
19249
19233
  if (!level) return { kind: "unknownBase" };
@@ -19295,8 +19279,7 @@ function sortSavedSearches(recipes) {
19295
19279
  return byLabel !== 0 ? byLabel : a.slug.localeCompare(b.slug);
19296
19280
  });
19297
19281
  }
19298
- //#endregion
19299
- //#region src/contract/composeRead.ts
19282
+ // src/contract/composeRead.ts
19300
19283
  var ALL_TERRITORIES = [...REGIONS, ...COUNTRIES];
19301
19284
  function resolveTerritory(raw) {
19302
19285
  const norm = (s) => s.toLowerCase().replace(/[^a-z0-9]+/g, "");
@@ -19379,8 +19362,7 @@ function defaultNotes(read, after, inheritedClasses = []) {
19379
19362
  function unsureNotes(doubts, dropped) {
19380
19363
  return [...doubts, ...dropped.map((d) => `Where: ${d}, not a territory this search offers`)];
19381
19364
  }
19382
- //#endregion
19383
- //#region src/state/useUnsaved.ts
19365
+ // src/state/useUnsaved.ts
19384
19366
  function useUnsaved(dirty) {
19385
19367
  const ref = (0, import_react.useRef)(dirty);
19386
19368
  ref.current = dirty;
@@ -19391,8 +19373,7 @@ function unsavedChanges({ current, empty, saved, submitted }) {
19391
19373
  if (current === empty) return false;
19392
19374
  return current !== saved;
19393
19375
  }
19394
- //#endregion
19395
- //#region src/contract/companyCreated.ts
19376
+ // src/contract/companyCreated.ts
19396
19377
  var pending = null;
19397
19378
  function handOff(created) {
19398
19379
  pending = created;
@@ -19410,8 +19391,7 @@ function createdStrip(created) {
19410
19391
  warning: created.commitError ? "The company is live and you can search under it now. Recording it in the configuration history failed, so it is not in that history yet — tell an administrator." : null
19411
19392
  };
19412
19393
  }
19413
- //#endregion
19414
- //#region src/screens/NewClearance.tsx
19394
+ // src/screens/NewClearance.tsx
19415
19395
  function readProblem(r) {
19416
19396
  switch (r.kind) {
19417
19397
  case "reject":
@@ -19653,10 +19633,15 @@ function NewClearance({ ctx }) {
19653
19633
  title: "That cannot be searched as written",
19654
19634
  lines: r.errors
19655
19635
  };
19656
- case "gate": return {
19657
- title: "The request changed",
19658
- lines: [r.message]
19659
- };
19636
+ case "gate":
19637
+ if (r.detail?.code === "not_configured") return {
19638
+ title: "The search was not started",
19639
+ lines: [r.message]
19640
+ };
19641
+ return {
19642
+ title: "The request changed",
19643
+ lines: [r.message]
19644
+ };
19660
19645
  case "rateLimited": return {
19661
19646
  title: "Too many requests just now",
19662
19647
  lines: ["Wait a moment and try again."]
@@ -20493,7 +20478,7 @@ function NewClearance({ ctx }) {
20493
20478
  },
20494
20479
  children: problem.lines.map((l, i) => (0, import_jsx_runtime.jsx)("li", {
20495
20480
  style: { marginBottom: 3 },
20496
- children: l
20481
+ children: (0, import_jsx_runtime.jsx)(Ticked, { text: l })
20497
20482
  }, i))
20498
20483
  })]
20499
20484
  }) : null
@@ -20516,6 +20501,7 @@ function NewClearance({ ctx }) {
20516
20501
  setupRoute: ctx.me.setupRoute,
20517
20502
  programDisputed: ctx.me.engineProgramDisputed,
20518
20503
  onSettings: seesEverything(ctx.me) ? () => ctx.go("/portal/admin/config") : null,
20504
+ searchRefusal: ctx.me.canSearch === false ? ctx.me.searchRefusal ?? null : null,
20519
20505
  saveOpen,
20520
20506
  saveName,
20521
20507
  saveText,
@@ -20694,7 +20680,7 @@ function NameWall({ count, allowed, first, canScreen, screenName, onScreenAll })
20694
20680
  }) : null]
20695
20681
  });
20696
20682
  }
20697
- function Footer({ startedFrom, tier, detail, uses, duration, runs, ready, busy, demoMode, setupRoute, programDisputed, onSettings, saveOpen, saveName, saveText, saveNote, saveDone, editing, canSave, blockedBy, onSaveOpen, onSaveName, onSaveText, onSaveCancel, onSave, onReview, onSeeSaved }) {
20683
+ function Footer({ startedFrom, tier, detail, uses, duration, runs, ready, busy, demoMode, setupRoute, programDisputed, onSettings, searchRefusal, saveOpen, saveName, saveText, saveNote, saveDone, editing, canSave, blockedBy, onSaveOpen, onSaveName, onSaveText, onSaveCancel, onSave, onReview, onSeeSaved }) {
20698
20684
  return (0, import_jsx_runtime.jsxs)("div", {
20699
20685
  className: "composer-footer",
20700
20686
  children: [
@@ -20784,13 +20770,7 @@ function Footer({ startedFrom, tier, detail, uses, duration, runs, ready, busy,
20784
20770
  })] })]
20785
20771
  }),
20786
20772
  (0, import_jsx_runtime.jsxs)("div", {
20787
- style: {
20788
- display: "flex",
20789
- alignItems: "center",
20790
- gap: 9,
20791
- flex: "none",
20792
- flexWrap: "wrap"
20793
- },
20773
+ className: "composer-actions",
20794
20774
  children: [
20795
20775
  canSave && !saveOpen ? (0, import_jsx_runtime.jsx)("button", {
20796
20776
  type: "button",
@@ -20894,7 +20874,20 @@ function Footer({ startedFrom, tier, detail, uses, duration, runs, ready, busy,
20894
20874
  })] }) : null
20895
20875
  ]
20896
20876
  });
20897
- })() : (0, import_jsx_runtime.jsxs)("span", {
20877
+ })() : searchRefusal ? (0, import_jsx_runtime.jsxs)("div", {
20878
+ className: "footer-demo-note",
20879
+ role: "status",
20880
+ style: {
20881
+ fontSize: 12.5,
20882
+ lineHeight: 1.45
20883
+ },
20884
+ children: [(0, import_jsx_runtime.jsx)(Ticked, { text: searchRefusal }), onSettings ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [" ", (0, import_jsx_runtime.jsx)("button", {
20885
+ type: "button",
20886
+ className: "link-btn",
20887
+ onClick: onSettings,
20888
+ children: "See what this install has"
20889
+ })] }) : null]
20890
+ }) : (0, import_jsx_runtime.jsxs)("span", {
20898
20891
  style: {
20899
20892
  display: "inline-flex",
20900
20893
  alignItems: "center",
@@ -21267,7 +21260,7 @@ function ReviewDialog({ plan, busy, owner, project, names, goods, nativeOn, onSt
21267
21260
  },
21268
21261
  children: failure.lines.map((l, i) => (0, import_jsx_runtime.jsx)("li", {
21269
21262
  style: { marginBottom: 3 },
21270
- children: l
21263
+ children: (0, import_jsx_runtime.jsx)(Ticked, { text: l })
21271
21264
  }, i))
21272
21265
  }),
21273
21266
  (0, import_jsx_runtime.jsx)("p", {
@@ -21552,12 +21545,10 @@ function CreatedStrip() {
21552
21545
  }) : null]
21553
21546
  });
21554
21547
  }
21555
- //#endregion
21556
- //#region src/contract/frameworkGuide.ts
21548
+ // src/contract/frameworkGuide.ts
21557
21549
  var GUIDE_PATH = "docs/configuration.md";
21558
21550
  var GUIDE_ANCHOR = "writing-your-own-step-by-step";
21559
- //#endregion
21560
- //#region src/components/FrameworkGuideLink.tsx
21551
+ // src/components/FrameworkGuideLink.tsx
21561
21552
  function FrameworkGuideLink({ label = "Use your own risk framework", pill = false }) {
21562
21553
  const [repo, setRepo] = (0, import_react.useState)(null);
21563
21554
  (0, import_react.useEffect)(() => {
@@ -21590,8 +21581,7 @@ function FrameworkGuideLink({ label = "Use your own risk framework", pill = fals
21590
21581
  children: label
21591
21582
  });
21592
21583
  }
21593
- //#endregion
21594
- //#region src/contract/profileFields.ts
21584
+ // src/contract/profileFields.ts
21595
21585
  var CODE_OWNED = [
21596
21586
  "frameworkPath",
21597
21587
  "workedExamplesPath",
@@ -21914,8 +21904,7 @@ function stripCodeOwned(draft) {
21914
21904
  for (const f of CODE_OWNED) delete out[f];
21915
21905
  return out;
21916
21906
  }
21917
- //#endregion
21918
- //#region src/components/FieldNotices.tsx
21907
+ // src/components/FieldNotices.tsx
21919
21908
  var TONE$1 = {
21920
21909
  dropped: {
21921
21910
  color: "var(--tone-high)",
@@ -21946,8 +21935,7 @@ function FieldNotices({ notices }) {
21946
21935
  }, `${n.tone}-${i}`))
21947
21936
  });
21948
21937
  }
21949
- //#endregion
21950
- //#region src/components/FieldPicker.tsx
21938
+ // src/components/FieldPicker.tsx
21951
21939
  var TERRITORIES = [...REGIONS, ...COUNTRIES];
21952
21940
  var suggestionStyle = {
21953
21941
  cursor: "pointer",
@@ -22130,8 +22118,7 @@ function FieldPicker({ spec, value, onChange, suggestions = [] }) {
22130
22118
  ]
22131
22119
  });
22132
22120
  }
22133
- //#endregion
22134
- //#region src/components/ProfileField.tsx
22121
+ // src/components/ProfileField.tsx
22135
22122
  function FieldTag({ tag }) {
22136
22123
  if (!tag) return null;
22137
22124
  return (0, import_jsx_runtime.jsx)("span", {
@@ -22202,13 +22189,11 @@ var inputStyle$1 = {
22202
22189
  fontSize: 14,
22203
22190
  resize: "vertical"
22204
22191
  };
22205
- //#endregion
22206
- //#region src/contract/companyKey.ts
22192
+ // src/contract/companyKey.ts
22207
22193
  function companyKeyFrom(name) {
22208
22194
  return String(name ?? "").toLowerCase().normalize("NFKD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 39).replace(/-+$/, "");
22209
22195
  }
22210
- //#endregion
22211
- //#region src/screens/NewCompany.tsx
22196
+ // src/screens/NewCompany.tsx
22212
22197
  var CREATE_FIELDS = [
22213
22198
  "name",
22214
22199
  "matchDomains",
@@ -22445,8 +22430,7 @@ function failureTitle(kind) {
22445
22430
  default: return "Nothing was created. Try again shortly.";
22446
22431
  }
22447
22432
  }
22448
- //#endregion
22449
- //#region src/shell/NewCompanyButton.tsx
22433
+ // src/shell/NewCompanyButton.tsx
22450
22434
  function NewCompanyButton({ ctx }) {
22451
22435
  if (!canManage(ctx.me)) return null;
22452
22436
  return (0, import_jsx_runtime.jsx)("button", {
@@ -22456,8 +22440,7 @@ function NewCompanyButton({ ctx }) {
22456
22440
  children: "+ New company"
22457
22441
  });
22458
22442
  }
22459
- //#endregion
22460
- //#region src/components/RowMenu.tsx
22443
+ // src/components/RowMenu.tsx
22461
22444
  function RowMenu({ actions, disabled = false }) {
22462
22445
  const [open, setOpen] = (0, import_react.useState)(false);
22463
22446
  const box = (0, import_react.useRef)(null);
@@ -22508,8 +22491,7 @@ function RowMenu({ actions, disabled = false }) {
22508
22491
  }) : null]
22509
22492
  });
22510
22493
  }
22511
- //#endregion
22512
- //#region src/screens/SavedSearches.tsx
22494
+ // src/screens/SavedSearches.tsx
22513
22495
  function SavedSearches({ ctx }) {
22514
22496
  const account = ctx.owner;
22515
22497
  const needsOwner = ctx.me.allAccounts && account === null;
@@ -22808,8 +22790,7 @@ function Heading({ ctx, onNew }) {
22808
22790
  }) : null] })
22809
22791
  });
22810
22792
  }
22811
- //#endregion
22812
- //#region src/screens/Preferences.tsx
22793
+ // src/screens/Preferences.tsx
22813
22794
  var readTheme = () => document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light";
22814
22795
  function Preferences({ ctx }) {
22815
22796
  const [theme, setThemeState] = (0, import_react.useState)(readTheme);
@@ -22961,8 +22942,7 @@ function Section({ title, children }) {
22961
22942
  }), children]
22962
22943
  });
22963
22944
  }
22964
- //#endregion
22965
- //#region src/contract/connectYourAi.ts
22945
+ // src/contract/connectYourAi.ts
22966
22946
  function connectionPill(aiConnected) {
22967
22947
  if (aiConnected === true) return {
22968
22948
  label: "Connected",
@@ -22985,8 +22965,7 @@ function continueOffer(input) {
22985
22965
  report: input.remembered
22986
22966
  };
22987
22967
  }
22988
- //#endregion
22989
- //#region src/screens/UseYourAI.tsx
22968
+ // src/screens/UseYourAI.tsx
22990
22969
  var WHAT_YOU_CAN_DO = [
22991
22970
  "Start a clearance and triage what comes back",
22992
22971
  "Watch it run, and add context while it is still early",
@@ -23484,8 +23463,7 @@ function UseYourAI({ ctx }) {
23484
23463
  ]
23485
23464
  });
23486
23465
  }
23487
- //#endregion
23488
- //#region src/contract/checkThenSave.ts
23466
+ // src/contract/checkThenSave.ts
23489
23467
  async function checkThenSave(post) {
23490
23468
  const check = await post("validate");
23491
23469
  if (!isOk(check)) return {
@@ -23506,8 +23484,7 @@ async function checkThenSave(post) {
23506
23484
  result: written
23507
23485
  };
23508
23486
  }
23509
- //#endregion
23510
- //#region src/components/ContextPackEditor.tsx
23487
+ // src/components/ContextPackEditor.tsx
23511
23488
  var CHAR_MAX = 8e3;
23512
23489
  function ContextPackEditor({ value, onChange, title, hint, rows = 8, tag = null, card = false }) {
23513
23490
  const over = value.length > CHAR_MAX;
@@ -23561,8 +23538,7 @@ function ContextPackEditor({ value, onChange, title, hint, rows = 8, tag = null,
23561
23538
  ]
23562
23539
  });
23563
23540
  }
23564
- //#endregion
23565
- //#region src/screens/Profile.tsx
23541
+ // src/screens/Profile.tsx
23566
23542
  function Profile({ ctx }) {
23567
23543
  const account = ctx.owner;
23568
23544
  const needsOwner = ctx.me.allAccounts && account === null;
@@ -24100,8 +24076,7 @@ function explain(r) {
24100
24076
  };
24101
24077
  }
24102
24078
  }
24103
- //#endregion
24104
- //#region src/screens/Projects.tsx
24079
+ // src/screens/Projects.tsx
24105
24080
  function Projects({ ctx }) {
24106
24081
  const mayChange = canManage(ctx.me);
24107
24082
  const account = ctx.owner;
@@ -24981,8 +24956,7 @@ var inputStyle = {
24981
24956
  fontSize: 14,
24982
24957
  resize: "vertical"
24983
24958
  };
24984
- //#endregion
24985
- //#region src/contract/installationSettings.ts
24959
+ // src/contract/installationSettings.ts
24986
24960
  var SETUP_GUIDES = {
24987
24961
  register: {
24988
24962
  path: "providers/README.md",
@@ -25128,8 +25102,7 @@ function providerCategories(providers) {
25128
25102
  };
25129
25103
  });
25130
25104
  }
25131
- //#endregion
25132
- //#region src/screens/GlobalConfig.tsx
25105
+ // src/screens/GlobalConfig.tsx
25133
25106
  var TITLE = "Installation settings";
25134
25107
  function GlobalConfig({ ctx }) {
25135
25108
  const { result } = useLoad(() => api.adminConfig(), []);
@@ -25294,7 +25267,7 @@ function GlobalConfig({ ctx }) {
25294
25267
  fontSize: 13
25295
25268
  },
25296
25269
  children: [
25297
- "Last run recorded its configuration at ",
25270
+ "This configuration was recorded at ",
25298
25271
  (0, import_jsx_runtime.jsx)("span", {
25299
25272
  className: "mono",
25300
25273
  children: v.lastRun.capturedAt
@@ -25404,8 +25377,7 @@ function Group({ title, children }) {
25404
25377
  }), children]
25405
25378
  });
25406
25379
  }
25407
- //#endregion
25408
- //#region src/screens/PeopleAccess.tsx
25380
+ // src/screens/PeopleAccess.tsx
25409
25381
  var loginInFrontDoc = (sourceRepo) => `${sourceRepo}/blob/main/docs/PORTAL.md#putting-your-own-login-provider-in-front`;
25410
25382
  function useSourceRepo() {
25411
25383
  const { result } = useLoad(() => api.about(), []);
@@ -25733,8 +25705,7 @@ function Row({ person, you, canModify, onModify }) {
25733
25705
  })
25734
25706
  ] });
25735
25707
  }
25736
- //#endregion
25737
- //#region src/screens/GiveAccess.tsx
25708
+ // src/screens/GiveAccess.tsx
25738
25709
  var NOTHING = {
25739
25710
  everything: false,
25740
25711
  orgs: new Set(),
@@ -26086,8 +26057,7 @@ function AttachRow$1({ on, implied = false, sub = false, name, line, disabled, o
26086
26057
  ]
26087
26058
  });
26088
26059
  }
26089
- //#endregion
26090
- //#region src/screens/ModifyAccess.tsx
26060
+ // src/screens/ModifyAccess.tsx
26091
26061
  var emailInQuery = () => (new URLSearchParams(window.location.search).get("email") ?? "").trim().toLowerCase();
26092
26062
  var heldBy = (person) => ({
26093
26063
  orgs: new Set(person.access.filter((a) => a.kind === "organisation").map((a) => a.key)),
@@ -26589,8 +26559,7 @@ function AttachRow({ on, implied = false, sub = false, name, line, disabled, onT
26589
26559
  ]
26590
26560
  });
26591
26561
  }
26592
- //#endregion
26593
- //#region src/contract/repositoryName.ts
26562
+ // src/contract/repositoryName.ts
26594
26563
  function repositoryName(url) {
26595
26564
  try {
26596
26565
  return new URL(url).pathname.replace(/^\/+|\/+$/g, "") || url;
@@ -26598,8 +26567,7 @@ function repositoryName(url) {
26598
26567
  return url;
26599
26568
  }
26600
26569
  }
26601
- //#endregion
26602
- //#region src/screens/About.tsx
26570
+ // src/screens/About.tsx
26603
26571
  var LICENCE_URL = "https://www.gnu.org/licenses/agpl-3.0.html";
26604
26572
  function About() {
26605
26573
  const [info, setInfo] = (0, import_react.useState)(null);
@@ -26736,8 +26704,7 @@ function About() {
26736
26704
  })
26737
26705
  });
26738
26706
  }
26739
- //#endregion
26740
- //#region src/main.tsx
26707
+ // src/main.tsx
26741
26708
  function NotYet({ title, phase, what }) {
26742
26709
  return (0, import_jsx_runtime.jsxs)("div", {
26743
26710
  className: "screen",
@@ -26814,4 +26781,3 @@ if (EARLY_RUNS_PATHS.includes(here)) startEarly("runs:mine", () => api.runsMine(
26814
26781
  var root = document.getElementById("root");
26815
26782
  if (!root) throw new Error("#root is missing from index.html");
26816
26783
  (0, import_client.createRoot)(root).render((0, import_jsx_runtime.jsx)(import_react.StrictMode, { children: (0, import_jsx_runtime.jsx)(AppShell, { render: screen }) }));
26817
- //#endregion