@repo-os/repoos 0.5.89 → 0.5.90

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 (129) hide show
  1. package/dist/.build-info.json +2 -2
  2. package/dist/.build-stamp.json +1 -1
  3. package/dist/cli/api-route-parity.js +1 -0
  4. package/dist/cli/help.js +2 -2
  5. package/dist/commands/restart.js +21 -4
  6. package/dist/commands/serve-banner.test.js +12 -1
  7. package/dist/commands/serve.d.ts +4 -0
  8. package/dist/commands/serve.js +12 -3
  9. package/dist/commands/ui-smoke.js +71 -0
  10. package/dist/core/config.d.ts +2 -0
  11. package/dist/core/config.js +42 -2
  12. package/dist/core/cursor-auth.d.ts +4 -0
  13. package/dist/core/cursor-auth.js +9 -0
  14. package/dist/core/detect.js +2 -1
  15. package/dist/core/models.js +3 -1
  16. package/dist/core/runner-engineer-clis.js +2 -1
  17. package/dist/core/server-registry.d.ts +4 -1
  18. package/dist/core/server-registry.js +10 -2
  19. package/dist/core/tailnet-servers.d.ts +11 -2
  20. package/dist/core/tailnet-servers.js +93 -6
  21. package/dist/core/tailscale.d.ts +4 -0
  22. package/dist/core/tailscale.js +17 -2
  23. package/dist/core/types.d.ts +11 -6
  24. package/dist/server/agents.js +2 -1
  25. package/dist/server/remote-validation.d.ts +18 -4
  26. package/dist/server/remote-validation.js +142 -55
  27. package/dist/server/routes/config.js +9 -9
  28. package/dist/server/routes/info.d.ts +27 -1
  29. package/dist/server/routes/info.js +108 -20
  30. package/dist/server/routes/servers.d.ts +15 -1
  31. package/dist/server/routes/servers.js +53 -2
  32. package/dist/server/routes/types.d.ts +6 -1
  33. package/dist/server/server.d.ts +2 -0
  34. package/dist/server/server.js +23 -5
  35. package/dist/server/tailnet-discovery-listener.d.ts +6 -0
  36. package/dist/server/tailnet-discovery-listener.js +62 -0
  37. package/dist/ui/assets/{ChecksView-DftvND4G.css → ChecksView-BU7sn_8v.css} +1 -1
  38. package/dist/ui/assets/ChecksView-CjBYmr0G.js +0 -0
  39. package/dist/ui/assets/{ContextView-CSUEv8W2.js → ContextView-f1qnwOfz.js} +2 -2
  40. package/dist/ui/assets/{DashboardView-6twQIuGs.css → DashboardView-BI6MsPGb.css} +1 -1
  41. package/dist/ui/assets/DashboardView-Bu-GfmCF.js +1 -0
  42. package/dist/ui/assets/{DeploymentsView-CZHcw_RB.js → DeploymentsView-D7snexob.js} +1 -1
  43. package/dist/ui/assets/{DiffView-C1x0YcRf.js → DiffView-DP84rySJ.js} +1 -1
  44. package/dist/ui/assets/InputsView-B-a_6_Rh.css +1 -0
  45. package/dist/ui/assets/InputsView-DIXXyLvz.js +1 -0
  46. package/dist/ui/assets/{LoginView-C5tfoTdU.js → LoginView-4-EXDlhL.js} +1 -1
  47. package/dist/ui/assets/{SecretsView-CWJrzLhZ.js → SecretsView-DEwKwfBX.js} +1 -1
  48. package/dist/ui/assets/{SettingsView-D2harUCZ.js → SettingsView-MqvullIA.js} +2 -2
  49. package/dist/ui/assets/StoriesView-B_gzGkub.css +1 -0
  50. package/dist/ui/assets/{StoriesView-CeMml429.js → StoriesView-SQfHR60h.js} +1 -1
  51. package/dist/ui/assets/{WorkView-CqOjmAMH.js → WorkView-B2H9HOzx.js} +2 -2
  52. package/dist/ui/assets/{WorkView-T4sLeN-G.css → WorkView-DA0KG2Wo.css} +1 -1
  53. package/dist/ui/assets/{abnfDiagram-VCTEODGH-CJQbh9Y8.js → abnfDiagram-VCTEODGH-_eosyKqu.js} +1 -1
  54. package/dist/ui/assets/{architectureDiagram-5GKGNRK7-sZsdeKGF.js → architectureDiagram-5GKGNRK7-PIOOBZj0.js} +1 -1
  55. package/dist/ui/assets/{blockDiagram-I7D4REHJ-B2ZrksFF.js → blockDiagram-I7D4REHJ-C4pyoQIK.js} +1 -1
  56. package/dist/ui/assets/{c4Diagram-7LVT6UL2-BmaZ6zn9.js → c4Diagram-7LVT6UL2-DehOc6EC.js} +1 -1
  57. package/dist/ui/assets/channel-Cyj3B_Pz.js +1 -0
  58. package/dist/ui/assets/{chunk-2E4U76K2-CBdsovAD.js → chunk-2E4U76K2-CdLsViyA.js} +1 -1
  59. package/dist/ui/assets/{chunk-4HAMMTFA-C8S0dbJX.js → chunk-4HAMMTFA-CwHfn5dc.js} +1 -1
  60. package/dist/ui/assets/{chunk-75Z2AOVW-DZhJMnav.js → chunk-75Z2AOVW-DdjEDEwd.js} +1 -1
  61. package/dist/ui/assets/{chunk-CLGD4ZFX-CbV5aAbV.js → chunk-CLGD4ZFX-tIw2jEqw.js} +1 -1
  62. package/dist/ui/assets/{chunk-DU6HZSFF-BvZvehaf.js → chunk-DU6HZSFF-DU2m-Rq_.js} +1 -1
  63. package/dist/ui/assets/{chunk-F27PBJKO-xu6ZrehS.js → chunk-F27PBJKO-XI6ntUgy.js} +1 -1
  64. package/dist/ui/assets/{chunk-GMAD6QVW-CzsEFWQ4.js → chunk-GMAD6QVW-DS9hCmMU.js} +1 -1
  65. package/dist/ui/assets/{chunk-GVQU2GXP-BL-cKxCh.js → chunk-GVQU2GXP-CkV_qixK.js} +1 -1
  66. package/dist/ui/assets/{chunk-IMKFNOWR-CT-dkpxG.js → chunk-IMKFNOWR-SSIw4nk0.js} +1 -1
  67. package/dist/ui/assets/{chunk-L3NEJ4N5-fGoKWh-p.js → chunk-L3NEJ4N5-Mjq_7kRG.js} +1 -1
  68. package/dist/ui/assets/{chunk-OSK3NFVY-CKymLuc9.js → chunk-OSK3NFVY-C_-AKGNt.js} +1 -1
  69. package/dist/ui/assets/{chunk-P2QGCYS3-8wVktsZB.js → chunk-P2QGCYS3-Cml7U2x-.js} +1 -1
  70. package/dist/ui/assets/{chunk-POPQ4Y6H-DBSXL1-m.js → chunk-POPQ4Y6H-BmC77hAA.js} +1 -1
  71. package/dist/ui/assets/{chunk-PWAF6VOD-BQMqcIDA.js → chunk-PWAF6VOD-ZvDRCIUz.js} +1 -1
  72. package/dist/ui/assets/{chunk-SHT3W25Y-BvhuqVhV.js → chunk-SHT3W25Y-BC_3w9An.js} +1 -1
  73. package/dist/ui/assets/{chunk-SVP7TREG-sGDG6HEd.js → chunk-SVP7TREG-ButzIF6A.js} +1 -1
  74. package/dist/ui/assets/{chunk-TICWLB2K-DVS0G_1O.js → chunk-TICWLB2K-CggUYtfW.js} +1 -1
  75. package/dist/ui/assets/{chunk-TLUHSLCS-BEiR6_Cd.js → chunk-TLUHSLCS-B4okP0Z9.js} +2 -2
  76. package/dist/ui/assets/classDiagram-ZZMXUADV-CPSjxk4F.js +1 -0
  77. package/dist/ui/assets/classDiagram-v2-VYDZK3BY-CPSjxk4F.js +1 -0
  78. package/dist/ui/assets/{cynefinDiagram-5FMLGOSQ-DugpXVI1.js → cynefinDiagram-5FMLGOSQ-DQx5-LjP.js} +1 -1
  79. package/dist/ui/assets/{dagre-GXQ25YYZ-Dadsjkxy.js → dagre-GXQ25YYZ-CJEoldTu.js} +1 -1
  80. package/dist/ui/assets/{diagram-S7CK7UJ4-B2rv42rU.js → diagram-S7CK7UJ4-C8wpb0w-.js} +1 -1
  81. package/dist/ui/assets/{diagram-UQ7AKVKN-Deh5LDq7.js → diagram-UQ7AKVKN-Cwv7ZlPj.js} +1 -1
  82. package/dist/ui/assets/{diagram-VSXAHHWV-B5ief5K-.js → diagram-VSXAHHWV-Bod-GUJ0.js} +1 -1
  83. package/dist/ui/assets/{diagram-VX7I27RA-DMOOrVmC.js → diagram-VX7I27RA-B-IviZte.js} +1 -1
  84. package/dist/ui/assets/{diagram-Z3DM3KII-D-u4Zzjo.js → diagram-Z3DM3KII-D7UJTgo0.js} +1 -1
  85. package/dist/ui/assets/{ebnfDiagram-PWID7BFC-qrEkGeJN.js → ebnfDiagram-PWID7BFC-36iN6vhQ.js} +1 -1
  86. package/dist/ui/assets/{erDiagram-RLTQ6QDP-D3YAPFLv.js → erDiagram-RLTQ6QDP-D1VxGNkw.js} +1 -1
  87. package/dist/ui/assets/flowDiagram-HODETNUW-DMCQ3QQc.js +1 -0
  88. package/dist/ui/assets/{ganttDiagram-EL5Y4UJY-D87AcrkY.js → ganttDiagram-EL5Y4UJY-CaQRdRWo.js} +1 -1
  89. package/dist/ui/assets/{gitGraphDiagram-WWUBYQGX-BHCwj7xO.js → gitGraphDiagram-WWUBYQGX-CPuqjqk3.js} +1 -1
  90. package/dist/ui/assets/index-DPbsvkr-.css +1 -0
  91. package/dist/ui/assets/{index-DlcT4WYV.js → index-ebHBIEpP.js} +7 -7
  92. package/dist/ui/assets/{infoDiagram-27XIBGKW-CZtHbCPm.js → infoDiagram-27XIBGKW-C5y8qjnc.js} +1 -1
  93. package/dist/ui/assets/{ishikawaDiagram-5VMMS53U-C4Ko2mjP.js → ishikawaDiagram-5VMMS53U-KKx_BBPX.js} +1 -1
  94. package/dist/ui/assets/{journeyDiagram-3NMN7TZE-Coc0Ellm.js → journeyDiagram-3NMN7TZE-Rba7zvBB.js} +1 -1
  95. package/dist/ui/assets/{kanban-definition-UXKFOSKX-Dlgy_hEA.js → kanban-definition-UXKFOSKX-CWUiM7nC.js} +1 -1
  96. package/dist/ui/assets/{line-CdlVA-Q3.js → line-DaBQnM0e.js} +1 -1
  97. package/dist/ui/assets/{mermaid-parser.core-kZNhTLCA.js → mermaid-parser.core-B8Myoyel.js} +1 -1
  98. package/dist/ui/assets/{mermaid.core-9vSuqd5C.js → mermaid.core-VWbE_LVb.js} +3 -3
  99. package/dist/ui/assets/{mindmap-definition-YA3MSWOX-DUohcg5e.js → mindmap-definition-YA3MSWOX-BdYDIAqu.js} +1 -1
  100. package/dist/ui/assets/{pegDiagram-XKGWAZYB-BKXrOVd0.js → pegDiagram-XKGWAZYB-1U6yQMPJ.js} +1 -1
  101. package/dist/ui/assets/{pieDiagram-E7YTZNPT-BVEAQvJF.js → pieDiagram-E7YTZNPT-C4XWr3KA.js} +1 -1
  102. package/dist/ui/assets/{quadrantDiagram-AXDQQJYC-7uByTHux.js → quadrantDiagram-AXDQQJYC-DokRSlpE.js} +1 -1
  103. package/dist/ui/assets/{railroadDiagram-O6MQD6OU-DWOl1GRi.js → railroadDiagram-O6MQD6OU-CNVlf25-.js} +1 -1
  104. package/dist/ui/assets/{requirementDiagram-BXWQKSXE-C6pt-TXk.js → requirementDiagram-BXWQKSXE-BJbgitn9.js} +1 -1
  105. package/dist/ui/assets/{sankeyDiagram-P5KCCOFB-C74T196H.js → sankeyDiagram-P5KCCOFB-Dmm-_ESB.js} +1 -1
  106. package/dist/ui/assets/{sequenceDiagram-WJ2MYXX4-CEYBFs6A.js → sequenceDiagram-WJ2MYXX4-MgUn4Xsr.js} +1 -1
  107. package/dist/ui/assets/{stateDiagram-D77RDMKH-CUh9rg93.js → stateDiagram-D77RDMKH-BqBSa94y.js} +1 -1
  108. package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-BpW2G0pv.js +1 -0
  109. package/dist/ui/assets/{swimlanes-42K2YHIH-CsB1lCCx.js → swimlanes-42K2YHIH-DfEw2nEt.js} +1 -1
  110. package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-CMQkP5RW.js +8 -0
  111. package/dist/ui/assets/{timeline-definition-24CTP7MA-BlqdShIR.js → timeline-definition-24CTP7MA-9O0QMknF.js} +1 -1
  112. package/dist/ui/assets/{vennDiagram-4TSXK5OY-BGVhy2hm.js → vennDiagram-4TSXK5OY-DlPz1EvZ.js} +1 -1
  113. package/dist/ui/assets/{wardleyDiagram-VM6X3IG4-CNAD8zdQ.js → wardleyDiagram-VM6X3IG4-CqAXPPey.js} +1 -1
  114. package/dist/ui/assets/{xychartDiagram-S5SC5T6Z-D_qAaCpN.js → xychartDiagram-S5SC5T6Z-CGPlYDyB.js} +1 -1
  115. package/dist/ui/index.html +2 -2
  116. package/dist/ui/sw.js +2 -2
  117. package/package.json +1 -1
  118. package/dist/ui/assets/ChecksView-BikrNX6o.js +0 -0
  119. package/dist/ui/assets/DashboardView-BYuxnCWd.js +0 -1
  120. package/dist/ui/assets/InputsView-D0M0_D-W.js +0 -1
  121. package/dist/ui/assets/InputsView-DmLO8B9g.css +0 -1
  122. package/dist/ui/assets/StoriesView-CgQxAeKp.css +0 -1
  123. package/dist/ui/assets/channel-DTyhDnV5.js +0 -1
  124. package/dist/ui/assets/classDiagram-ZZMXUADV-BiFSDfNF.js +0 -1
  125. package/dist/ui/assets/classDiagram-v2-VYDZK3BY-BiFSDfNF.js +0 -1
  126. package/dist/ui/assets/flowDiagram-HODETNUW-BAFQ0lbU.js +0 -1
  127. package/dist/ui/assets/index-CqMm4or2.css +0 -1
  128. package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-D0CaT-C2.js +0 -1
  129. package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-DXIUYdjM.js +0 -8
@@ -1,5 +1,5 @@
1
1
  {
2
- "hash": "393e7e29b7a6baa7dd8a6da327025df563d8170a3187d7d129c6cb25c1207a46",
3
- "version": "0.5.89",
2
+ "hash": "e1a65dbc1745d17a0cd1bf18c39b1021c1080f31d792e05b2a1d3641c2733841",
3
+ "version": "0.5.90",
4
4
  "devUi": false
5
5
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "generatedAt": "2026-11-17T12:04:41.717Z"
2
+ "generatedAt": "2026-11-18T04:54:42.962Z"
3
3
  }
@@ -101,6 +101,7 @@ const UI_ONLY_MATCHERS = [
101
101
  // cannot run the CLI, and the CLI's own `repoos servers --tailscale` reads
102
102
  // the same core directly rather than this authenticated endpoint.
103
103
  exact("GET", "/api/servers/tailnet"),
104
+ exact("GET", "/api/servers/discovery"),
104
105
  under("/api/telegram/"),
105
106
  exact("GET", "/api/index"),
106
107
  exact("GET", "/api/board"),
package/dist/cli/help.js CHANGED
@@ -386,9 +386,9 @@ const GROUPS = [
386
386
  },
387
387
  {
388
388
  name: "restart",
389
- usage: "restart [--when-idle] [--port N]",
389
+ usage: "restart [--when-idle] [--force] [--root <path>] [--port N]",
390
390
  desc: "Restart this repo's server (managed service, supervised, or hand-run)",
391
- flags: "--port N",
391
+ flags: "--when-idle · --force · --root <path> · --port N",
392
392
  },
393
393
  {
394
394
  name: "servers",
@@ -3,10 +3,11 @@
3
3
  * whether it runs as a managed service, a hand-run `repoos serve`, or an
4
4
  * externally supervised process (launchd KeepAlive, systemd, …).
5
5
  */
6
- import { boardRoot } from "../core/config.js";
6
+ import { boardRoot, loadConfig } from "../core/config.js";
7
7
  import { restartRepoServer } from "../core/server-restart.js";
8
8
  import { c } from "../cli/colors.js";
9
9
  import { locateRepoServer } from "../core/server-locate.js";
10
+ import { readLocalCliToken } from "../server/local-token.js";
10
11
  const PATH_LABEL = {
11
12
  "managed-service": "managed service (`repoos service`)",
12
13
  "external-supervisor": "externally supervised process (supervisor respawn)",
@@ -14,6 +15,7 @@ const PATH_LABEL = {
14
15
  };
15
16
  export async function cmdRestart(argv) {
16
17
  let portFilter;
18
+ let rootOverride;
17
19
  const whenIdle = argv.includes("--when-idle");
18
20
  const force = argv.includes("--force");
19
21
  for (let i = 0; i < argv.length; i++) {
@@ -27,8 +29,20 @@ export async function cmdRestart(argv) {
27
29
  }
28
30
  portFilter = n;
29
31
  }
32
+ if (argv[i] === "--root") {
33
+ const value = argv[++i];
34
+ if (!value) {
35
+ console.error(c.red(" ✗ Invalid --root value: missing path"));
36
+ process.exitCode = 1;
37
+ return;
38
+ }
39
+ rootOverride = value;
40
+ }
30
41
  }
31
- const { root } = boardRoot();
42
+ const { root: boardRootPath } = boardRoot();
43
+ const root = rootOverride ?? boardRootPath;
44
+ const config = loadConfig(root);
45
+ const localToken = readLocalCliToken(root, config.cacheDir);
32
46
  if (whenIdle || !force) {
33
47
  const server = await locateRepoServer(root, { portFilter });
34
48
  if (!server) {
@@ -38,10 +52,13 @@ export async function cmdRestart(argv) {
38
52
  }
39
53
  if (whenIdle)
40
54
  console.log(c.dim(" Waiting for agents, reviews and checks to finish…"));
41
- const host = server.host === "0.0.0.0" ? "127.0.0.1" : server.host;
55
+ // The local CLI token is deliberately accepted only over loopback.
56
+ const host = "127.0.0.1";
42
57
  for (;;) {
43
58
  try {
44
- const response = await fetch(`http://${host}:${server.port}/api/update-status`);
59
+ const response = await fetch(`http://${host}:${server.port}/api/update-status`, {
60
+ headers: localToken ? { "x-repoos-local-token": localToken } : {},
61
+ });
45
62
  if (!response.ok)
46
63
  throw new Error(`server returned HTTP ${response.status}`);
47
64
  const status = (await response.json());
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import { formatServeBindBannerValue, renderServeBanner } from "./serve.js";
2
+ import { effectiveServeBannerNetwork, formatServeBindBannerValue, renderServeBanner, } from "./serve.js";
3
3
  describe("renderServeBanner", () => {
4
4
  const rows = [
5
5
  { label: "Local", value: "http://127.0.0.1:7515" },
@@ -33,6 +33,17 @@ describe("renderServeBanner", () => {
33
33
  expect(formatServeBindBannerValue("0.0.0.0", true)).toContain("Tailscale detected");
34
34
  expect(formatServeBindBannerValue("192.168.1.5", false)).toContain("192.168.1.5");
35
35
  });
36
+ it("reports the effective loopback bind for auth-less previews", () => {
37
+ const network = effectiveServeBannerNetwork("127.0.0.1", true);
38
+ expect(network).toEqual({ bindHost: "127.0.0.1", tailscaleDetected: false });
39
+ expect(formatServeBindBannerValue(network.bindHost, network.tailscaleDetected)).toContain("localhost only");
40
+ });
41
+ it("keeps the Tailnet banner for an effective all-interface listener", () => {
42
+ expect(effectiveServeBannerNetwork("0.0.0.0", true)).toEqual({
43
+ bindHost: "0.0.0.0",
44
+ tailscaleDetected: true,
45
+ });
46
+ });
36
47
  it("splits an HTTPS warning into problem, fix and link", () => {
37
48
  const out = renderServeBanner("1.2.3", rows, "HTTPS certificates aren't enabled for your tailnet — turn on MagicDNS and HTTPS Certificates at https://login.tailscale.com/admin/dns");
38
49
  expect(out).toContain("Tailscale HTTPS unavailable");
@@ -45,6 +45,10 @@ export declare function resolveServeHost(explicitHost?: string): {
45
45
  * not `host === "0.0.0.0"`, so an explicit `--host 0.0.0.0` is not mislabeled.
46
46
  */
47
47
  export declare function formatServeBindBannerValue(host: string, tailscaleDetected: boolean): string;
48
+ export declare function effectiveServeBannerNetwork(bindHost: string, tailscaleDetected: boolean): {
49
+ bindHost: string;
50
+ tailscaleDetected: boolean;
51
+ };
48
52
  /**
49
53
  * Whether this `repoos serve` should apply the repo's preview-only
50
54
  * `[preview.*]` config overlay (#0464).
@@ -98,6 +98,12 @@ export function formatServeBindBannerValue(host, tailscaleDetected) {
98
98
  }
99
99
  return c.cyan(host) + c.dim(" (explicit --host)");
100
100
  }
101
+ export function effectiveServeBannerNetwork(bindHost, tailscaleDetected) {
102
+ return {
103
+ bindHost,
104
+ tailscaleDetected: tailscaleDetected && bindHost === "0.0.0.0",
105
+ };
106
+ }
101
107
  /**
102
108
  * Whether this `repoos serve` should apply the repo's preview-only
103
109
  * `[preview.*]` config overlay (#0464).
@@ -243,13 +249,14 @@ export async function cmdServe(args, opts = {}) {
243
249
  return;
244
250
  }
245
251
  const snap = handle.index.snapshot();
252
+ const bannerNetwork = effectiveServeBannerNetwork(handle.bindHost, tailscaleDetected);
246
253
  const rt = isBun()
247
254
  ? `Bun ${process.versions.bun ?? ""}`.trim()
248
255
  : `Node ${process.versions.node}`;
249
256
  const rows = [
250
257
  {
251
258
  label: "Bind",
252
- value: formatServeBindBannerValue(host, tailscaleDetected),
259
+ value: formatServeBindBannerValue(bannerNetwork.bindHost, bannerNetwork.tailscaleDetected),
253
260
  },
254
261
  { label: "Local", value: c.cyan(c.bold(handle.url)) },
255
262
  { label: "Events", value: c.cyan(handle.url + "/api/events") + c.dim(" (SSE)") },
@@ -261,7 +268,7 @@ export async function cmdServe(args, opts = {}) {
261
268
  if (handle.previewOverrides?.length) {
262
269
  rows.push({ label: "Preview", value: c.yellow(handle.previewOverrides.join(", ")) });
263
270
  }
264
- if (tailscaleDetected) {
271
+ if (bannerNetwork.tailscaleDetected) {
265
272
  rows.push({
266
273
  label: "Tailnet",
267
274
  value: c.cyan(`http://${tailscaleIP}:${handle.port}`) +
@@ -274,7 +281,9 @@ export async function cmdServe(args, opts = {}) {
274
281
  // crypto.randomUUID etc. are missing). Skipped for managed previews, which
275
282
  // must not touch the machine's `tailscale serve` config.
276
283
  let httpsWarning;
277
- if (tailscaleDetected && tailscaleHttps && process.env.REPOOS_PREVIEW_CHILD !== "1") {
284
+ if (bannerNetwork.tailscaleDetected &&
285
+ tailscaleHttps &&
286
+ process.env.REPOOS_PREVIEW_CHILD !== "1") {
278
287
  const https = await ensureTailscaleHttps(handle.port);
279
288
  if (https.url) {
280
289
  rows.push({
@@ -543,6 +543,77 @@ async function runUISmokeTest() {
543
543
  await recovPage.close();
544
544
  }
545
545
  }
546
+ // Exercise the actual Checks route across the responsive matrix that
547
+ // prompted #1163. Keep screenshots out of this loop: the goal is to
548
+ // isolate page navigation/layout from repeated capture work.
549
+ {
550
+ const checksPage = await context.newPage();
551
+ const checksPageErrors = [];
552
+ checksPage.on("pageerror", (err) => {
553
+ if (!err.message.includes("/api/") || !err.message.includes("access control checks")) {
554
+ checksPageErrors.push(err.message);
555
+ }
556
+ });
557
+ const tabs = [
558
+ { label: "Now", query: "now" },
559
+ { label: "Runs", query: "runs" },
560
+ { label: "Test suite", query: "test-suite" },
561
+ { label: "Check plan", query: "plan" },
562
+ ];
563
+ const widths = [1440, 390, 320];
564
+ try {
565
+ for (const appearance of ["light", "dark"]) {
566
+ // The app reads its appearance preference during startup.
567
+ await checksPage.goto(server.url, { waitUntil: "load", timeout: 20_000 });
568
+ await checksPage.evaluate((theme) => {
569
+ localStorage.setItem("repoos.theme", theme);
570
+ }, appearance);
571
+ for (const width of widths) {
572
+ await checksPage.setViewportSize({ width, height: width < 600 ? 812 : 900 });
573
+ await checksPage.goto(new URL("/checks?tab=now", server.url).toString(), {
574
+ waitUntil: "load",
575
+ timeout: 20_000,
576
+ });
577
+ await checksPage.waitForFunction(() => document.querySelector(".ck-title") !== null &&
578
+ document.querySelector('[role="tab"][aria-selected="true"]') !== null, { timeout: 10_000 });
579
+ const renderedAppearance = await checksPage.evaluate(() => document.documentElement.dataset.theme);
580
+ if (renderedAppearance !== appearance) {
581
+ throw new Error(`Checks theme mismatch at ${width}px: expected ${appearance}, got ${renderedAppearance}`);
582
+ }
583
+ for (const tab of tabs) {
584
+ await checksPage.click(`button[role="tab"]:has-text("${tab.label}")`, {
585
+ timeout: 5_000,
586
+ });
587
+ await checksPage.waitForTimeout(50);
588
+ const state = await checksPage.evaluate(() => {
589
+ const selected = document.querySelector('[role="tab"][aria-selected="true"]');
590
+ return {
591
+ query: new URL(window.location.href).searchParams.get("tab"),
592
+ selected: selected?.textContent?.trim(),
593
+ scrollWidth: document.body.scrollWidth,
594
+ viewportWidth: window.innerWidth,
595
+ };
596
+ });
597
+ if (state.query !== tab.query || state.selected !== tab.label) {
598
+ throw new Error(`Checks ${tab.label} navigation failed at ${width}px (${appearance}): ` +
599
+ `query=${state.query}, selected=${state.selected}`);
600
+ }
601
+ if (state.scrollWidth > state.viewportWidth) {
602
+ throw new Error(`Checks ${tab.label} overflows at ${width}px (${appearance}): ` +
603
+ `body scrollWidth ${state.scrollWidth} > viewport ${state.viewportWidth}`);
604
+ }
605
+ }
606
+ }
607
+ }
608
+ if (checksPageErrors.length > 0) {
609
+ throw new Error(`Checks page errors: ${checksPageErrors.join("; ")}`);
610
+ }
611
+ }
612
+ finally {
613
+ await checksPage.close();
614
+ }
615
+ console.log(c.dim(" · Checks tabs passed at 1440, 390 and 320px in light and dark mode"));
616
+ }
546
617
  // Check for zero console errors
547
618
  {
548
619
  // Tolerate failed-resource errors only for the known-benign stats 404
@@ -319,6 +319,8 @@ export interface ConfigFieldMeta {
319
319
  /** Step size for number fields; if > 1, decimals are not allowed */
320
320
  step?: number;
321
321
  }
322
+ /** Select fields whose dropdown/API representations persist as numeric config values. */
323
+ export declare const NUMERIC_SELECT_CONFIG_KEYS: readonly ["maxActiveTasks", "maxConcurrentAgents", "remoteValidation.maxConcurrent", "worktreeWarnThreshold", "heavySlots", "vitest.maxWorkers", "localChecks.maxConcurrent", "playwright.workers", "playwright.maxConcurrent"];
322
324
  export declare function getConfigSchema(): ConfigFieldMeta[];
323
325
  /**
324
326
  * Every `repoos.toml` key the parser supports, as dotted paths — the contract
@@ -2077,6 +2077,14 @@ export function loadConfig(rootArg, options = {}) {
2077
2077
  if (typeof rvEnabled === "boolean") {
2078
2078
  cfg.remoteValidation = { ...cfg.remoteValidation, enabled: rvEnabled };
2079
2079
  }
2080
+ const rvCommand = parsed["remoteValidation.command"];
2081
+ if (typeof rvCommand === "string" && rvCommand.trim()) {
2082
+ cfg.remoteValidation = { ...cfg.remoteValidation, command: rvCommand.trim() };
2083
+ }
2084
+ const rvRequiredTools = normalizeStringList(parsed["remoteValidation.requiredTools"]);
2085
+ if (rvRequiredTools.length) {
2086
+ cfg.remoteValidation = { ...cfg.remoteValidation, requiredTools: rvRequiredTools };
2087
+ }
2080
2088
  const rvProvider = parsed["remoteValidation.provider"];
2081
2089
  if (rvProvider === "hetzner" || rvProvider === "tailscale") {
2082
2090
  cfg.remoteValidation = { ...cfg.remoteValidation, provider: rvProvider };
@@ -2618,6 +2626,18 @@ export function applyReloadedConfig(holder, fresh) {
2618
2626
  holder.config.areas = fresh.areas;
2619
2627
  holder.config.preview = fresh.preview;
2620
2628
  }
2629
+ /** Select fields whose dropdown/API representations persist as numeric config values. */
2630
+ export const NUMERIC_SELECT_CONFIG_KEYS = [
2631
+ "maxActiveTasks",
2632
+ "maxConcurrentAgents",
2633
+ "remoteValidation.maxConcurrent",
2634
+ "worktreeWarnThreshold",
2635
+ "heavySlots",
2636
+ "vitest.maxWorkers",
2637
+ "localChecks.maxConcurrent",
2638
+ "playwright.workers",
2639
+ "playwright.maxConcurrent",
2640
+ ];
2621
2641
  export function getConfigSchema() {
2622
2642
  return [
2623
2643
  {
@@ -3763,8 +3783,8 @@ export function getConfigSchema() {
3763
3783
  restartRequired: false,
3764
3784
  default: true,
3765
3785
  description: "Let a signed-in RepoOS Hub on your phone ask this server which RepoOS servers it can " +
3766
- "see on your Tailscale tailnet. Discovery runs here (Tailscale CLI + SSH); the phone " +
3767
- "makes no scans. Turn off to refuse the request; adding servers manually still works.",
3786
+ "see on your Tailscale tailnet. Discovery uses HTTP over Tailscale with SSH fallback; the phone " +
3787
+ "makes no scans. Turn off to hide this project's registry row from peers; manual adds still work.",
3768
3788
  },
3769
3789
  {
3770
3790
  key: "remoteValidation.enabled",
@@ -3790,6 +3810,24 @@ export function getConfigSchema() {
3790
3810
  description: "tailscale: SSH into a persistent machine on your Tailscale network and run the gate in a fresh Docker container. " +
3791
3811
  "hetzner: provision a disposable Hetzner Cloud VM from a prebuilt snapshot.",
3792
3812
  },
3813
+ {
3814
+ key: "remoteValidation.command",
3815
+ label: "Remote validation: command",
3816
+ type: "string",
3817
+ tier: "restart",
3818
+ restartRequired: true,
3819
+ default: "",
3820
+ description: "Optional project-relative command run from the verified checkout on a Tailscale or Hetzner runner. Native hosts run it directly; Docker hosts need an image with its toolchain. Leave empty for the stock RepoOS build and test gate.",
3821
+ },
3822
+ {
3823
+ key: "remoteValidation.requiredTools",
3824
+ label: "Remote validation: required runner tools",
3825
+ type: "array",
3826
+ tier: "restart",
3827
+ restartRequired: true,
3828
+ default: [],
3829
+ description: "Comma-separated executables the runner must provide (for example java, gradle, node). Native hosts check their login shell; Docker hosts check the configured image. Missing tools are named in the host probe result.",
3830
+ },
3793
3831
  {
3794
3832
  key: "remoteValidation.tailscaleHost",
3795
3833
  label: "Remote validation: tailscale host",
@@ -4705,6 +4743,8 @@ export const SUPPORTED_TOML_KEYS = [
4705
4743
  // Remote validation
4706
4744
  "remoteValidation.enabled",
4707
4745
  "remoteValidation.provider",
4746
+ "remoteValidation.command",
4747
+ "remoteValidation.requiredTools",
4708
4748
  "remoteValidation.tailscaleHost",
4709
4749
  "remoteValidation.tailscaleHosts",
4710
4750
  "remoteValidation.tailscaleHosts.engineers",
@@ -0,0 +1,4 @@
1
+ /** Canonical local Cursor CLI login command used by probes and recovery hints. */
2
+ export declare const CURSOR_LOGIN_COMMAND = "cursor-agent login";
3
+ /** Replace recognizable auth failures with safe guidance instead of raw stderr. */
4
+ export declare function cursorAuthErrorHint(text: string): string | null;
@@ -0,0 +1,9 @@
1
+ /** Canonical local Cursor CLI login command used by probes and recovery hints. */
2
+ export const CURSOR_LOGIN_COMMAND = "cursor-agent login";
3
+ /** Replace recognizable auth failures with safe guidance instead of raw stderr. */
4
+ export function cursorAuthErrorHint(text) {
5
+ if (!/\bnot (?:logged in|authenticated|signed in)\b|authentication required|unauthorized|\b401\b|\b403\b|invalid api key|run\s+['"`]agent login['"`]/i.test(text)) {
6
+ return null;
7
+ }
8
+ return `Cursor Agent authentication required — run \`${CURSOR_LOGIN_COMMAND}\` and retry.`;
9
+ }
@@ -11,6 +11,7 @@ import { spawn } from "node:child_process";
11
11
  import { accessSync, constants, readdirSync } from "node:fs";
12
12
  import { delimiter, join } from "node:path";
13
13
  import { compatibilityForAgent } from "./agent-compatibility.js";
14
+ import { CURSOR_LOGIN_COMMAND } from "./cursor-auth.js";
14
15
  /** Default ceiling on the `--version` probe, ms. A hung binary is SIGKILLed. */
15
16
  export const VERSION_TIMEOUT_MS = 1500;
16
17
  /** Cap on the version string kept for display. */
@@ -95,7 +96,7 @@ export const KNOWN_AGENTS = [
95
96
  binary: "cursor-agent",
96
97
  drivable: true,
97
98
  installHint: "curl https://cursor.com/install -fsS | bash",
98
- authHint: "cursor-agent login (or export CURSOR_API_KEY=<key>)",
99
+ authHint: `${CURSOR_LOGIN_COMMAND} (or export CURSOR_API_KEY=<key>)`,
99
100
  authCheckArgs: ["status", "--format", "json"],
100
101
  capability: "Print mode with stream-JSON, session resume, and model selection",
101
102
  },
@@ -20,6 +20,7 @@ import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
20
20
  import { join } from "node:path";
21
21
  import { writeChildStdin } from "./child-stdin.js";
22
22
  import { resolveBinary, KNOWN_AGENTS } from "./detect.js";
23
+ import { cursorAuthErrorHint } from "./cursor-auth.js";
23
24
  import { sanitizeSpawnArgs } from "./spawn-args.js";
24
25
  import { COPILOT_MODEL_IDS } from "./copilot-models.js";
25
26
  /** Default ceiling on the `opencode models` probe, ms. A hung CLI is SIGKILLed. */
@@ -452,7 +453,8 @@ const cursorAdapter = {
452
453
  timeoutMs: opts.timeoutMs ?? MODELS_TIMEOUT_MS,
453
454
  cwd: opts.cwd,
454
455
  });
455
- const error = probeError(bin, out, opts.timeoutMs ?? MODELS_TIMEOUT_MS);
456
+ const rawError = probeError(bin, out, opts.timeoutMs ?? MODELS_TIMEOUT_MS);
457
+ const error = rawError ? (cursorAuthErrorHint(rawError) ?? rawError) : undefined;
456
458
  return {
457
459
  supported: true,
458
460
  models: ["default", ...parseCursorModels(out.text)],
@@ -13,6 +13,7 @@
13
13
  * (see docs/remote-validation.md).
14
14
  */
15
15
  import { KNOWN_AGENTS, parseAuthState } from "./detect.js";
16
+ import { CURSOR_LOGIN_COMMAND } from "./cursor-auth.js";
16
17
  import { redactText } from "./redact.js";
17
18
  import { remoteHostUser } from "./remote-hosts.js";
18
19
  /** Stable ids used in config and CLI flags. */
@@ -34,7 +35,7 @@ const SPECS = {
34
35
  id: "cursor",
35
36
  binary: "cursor-agent",
36
37
  installCommand: "curl https://cursor.com/install -fsS | bash",
37
- loginCommand: "cursor-agent login",
38
+ loginCommand: CURSOR_LOGIN_COMMAND,
38
39
  },
39
40
  };
40
41
  export function runnerEngineerCliSpec(id) {
@@ -24,6 +24,8 @@ export interface ServerRegistryEntry {
24
24
  * repoos.toml, and so the tailnet is never treated as one shared group.
25
25
  */
26
26
  allowlistGroup?: string;
27
+ /** This project's opt-out for the machine-level tailnet discovery listener. */
28
+ tailnetDiscovery?: boolean;
27
29
  }
28
30
  /** Override for tests (`REPOOS_SERVERS_REGISTRY_DIR`). */
29
31
  export declare function serversRegistryDir(env?: NodeJS.ProcessEnv): string;
@@ -122,10 +124,11 @@ export interface RegisterRunningServerInput {
122
124
  registryDir?: string;
123
125
  /** Allowlist group this project joined (#1132). */
124
126
  allowlistGroup?: string;
127
+ tailnetDiscovery?: boolean;
125
128
  }
126
129
  /** Register (or refresh) after the HTTP listener is bound. Best-effort. */
127
130
  export declare function registerRunningServer(input: RegisterRunningServerInput): void;
128
131
  /** Refresh name/group after a config reload or a group join (#1132). */
129
- export declare function refreshRunningServerIdentity(port: number, root: string, allowlistGroup: string | undefined, registryDir?: string): void;
132
+ export declare function refreshRunningServerIdentity(port: number, root: string, allowlistGroup: string | undefined, tailnetDiscovery: boolean | undefined, registryDir?: string): void;
130
133
  /** Log a registry failure at most once per process. */
131
134
  export declare function logServerRegistryError(logger: Logger, action: string, err: unknown): void;
@@ -344,22 +344,30 @@ export function registerRunningServer(input) {
344
344
  activeEngineers: 0,
345
345
  engineersUpdatedAt: new Date().toISOString(),
346
346
  ...(input.allowlistGroup ? { allowlistGroup: input.allowlistGroup } : {}),
347
+ ...(input.tailnetDiscovery === false ? { tailnetDiscovery: false } : {}),
347
348
  };
348
349
  writeServerRegistryEntry(entry, input.registryDir);
349
350
  }
350
351
  /** Refresh name/group after a config reload or a group join (#1132). */
351
- export function refreshRunningServerIdentity(port, root, allowlistGroup, registryDir) {
352
+ export function refreshRunningServerIdentity(port, root, allowlistGroup, tailnetDiscovery, registryDir) {
352
353
  const existing = readServerRegistryEntry(port, registryDir);
353
354
  if (!existing || existing.pid !== process.pid)
354
355
  return;
355
356
  const projectName = projectDisplayName(root);
356
- if (existing.projectName === projectName && existing.allowlistGroup === allowlistGroup)
357
+ const discoveryDisabled = tailnetDiscovery === false;
358
+ if (existing.projectName === projectName &&
359
+ existing.allowlistGroup === allowlistGroup &&
360
+ (existing.tailnetDiscovery === false) === discoveryDisabled)
357
361
  return;
358
362
  const next = { ...existing, projectName };
359
363
  if (allowlistGroup)
360
364
  next.allowlistGroup = allowlistGroup;
361
365
  else
362
366
  delete next.allowlistGroup;
367
+ if (discoveryDisabled)
368
+ next.tailnetDiscovery = false;
369
+ else
370
+ delete next.tailnetDiscovery;
363
371
  writeServerRegistryEntry(next, registryDir);
364
372
  }
365
373
  let registryErrorLogged = false;
@@ -1,8 +1,10 @@
1
1
  import type { RemoteValidationConfig, RemoteValidationHost } from "./types.js";
2
2
  /** Per-command budget for one remote host. */
3
- export declare const HOST_TIMEOUT_MS = 4000;
3
+ export declare const HOST_TIMEOUT_MS = 8000;
4
4
  /** Whole-request budget for one discovery pass; slow hosts become `unreachable`. */
5
- export declare const DISCOVERY_DEADLINE_MS = 8000;
5
+ export declare const DISCOVERY_DEADLINE_MS = 25000;
6
+ /** Machine-level HTTP endpoint bound directly to the Tailscale interface. */
7
+ export declare const TAILNET_DISCOVERY_PORT = 41641;
6
8
  export interface ListedServer {
7
9
  host: string;
8
10
  /** Readable Tailscale HostName when it differs from the SSH/MagicDNS host. */
@@ -120,7 +122,11 @@ export interface RemoteFailure {
120
122
  export declare function classifyRemoteFailure(error: unknown): RemoteFailure;
121
123
  /** User-facing reason shown by `repoos servers --tailscale`. */
122
124
  export declare function remoteFailureReason(error: unknown): string;
125
+ /** Plain fixes for the Hub's collapsed machine-failure group. */
126
+ export declare function tailnetPeerFailureReason(error: unknown, host: string): string;
123
127
  export declare const defaultRemoteExec: RemoteExec;
128
+ /** Local HTTPS mappings used by this machine-level discovery listener. */
129
+ export declare function localTailnetServeUrls(): Promise<Record<number, string>>;
124
130
  export interface CollectTailnetOptions {
125
131
  /** Test seam: replace the local `tailscale status --json` call. */
126
132
  tailscaleStatus?: () => Promise<string>;
@@ -130,6 +136,8 @@ export interface CollectTailnetOptions {
130
136
  remoteHosts?: RemoteValidationHost[];
131
137
  remoteValidation?: RemoteValidationConfig;
132
138
  remoteExec?: RemoteExec;
139
+ /** Test seam for peer HTTP discovery; default uses fetch with an abort timeout. */
140
+ httpDiscovery?: (peer: TailnetPeer, timeoutMs: number) => Promise<string | null>;
133
141
  /** Per-remote-command budget. Defaults to {@link HOST_TIMEOUT_MS}. */
134
142
  timeoutMs?: number;
135
143
  /** Whole-pass budget. Defaults to {@link DISCOVERY_DEADLINE_MS}. */
@@ -139,6 +147,7 @@ export interface CollectTailnetOptions {
139
147
  /** Test seam for the deadline clock. */
140
148
  now?: () => number;
141
149
  }
150
+ export declare function defaultHttpDiscovery(peer: TailnetPeer, timeoutMs: number): Promise<string | null>;
142
151
  export interface TailnetCollection {
143
152
  servers: ListedServer[];
144
153
  tailscaleUnavailable: boolean;