@repo-os/repoos 0.5.89 → 0.5.91
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.
- package/dist/.build-info.json +2 -2
- package/dist/.build-stamp.json +1 -1
- package/dist/cli/api-route-parity.js +1 -0
- package/dist/cli/help.js +4 -4
- package/dist/commands/init.js +3 -24
- package/dist/commands/restart.js +22 -5
- package/dist/commands/serve-banner.test.js +12 -1
- package/dist/commands/serve.d.ts +4 -0
- package/dist/commands/serve.js +12 -3
- package/dist/commands/tasks.js +9 -0
- package/dist/commands/ui-smoke.js +71 -0
- package/dist/commands/upgrade.d.ts +2 -0
- package/dist/commands/upgrade.js +25 -4
- package/dist/core/config.d.ts +3 -1
- package/dist/core/config.js +53 -3
- package/dist/core/cursor-auth.d.ts +4 -0
- package/dist/core/cursor-auth.js +9 -0
- package/dist/core/detect.js +2 -1
- package/dist/core/git.js +14 -2
- package/dist/core/models.js +3 -1
- package/dist/core/runner-engineer-clis.js +2 -1
- package/dist/core/server-registry.d.ts +4 -1
- package/dist/core/server-registry.js +10 -2
- package/dist/core/server-restart-classify.test.js +31 -1
- package/dist/core/server-restart.d.ts +13 -2
- package/dist/core/server-restart.js +61 -25
- package/dist/core/server-restart.test.js +64 -15
- package/dist/core/shot-fixtures.d.ts +1 -1
- package/dist/core/shot-fixtures.js +16 -1
- package/dist/core/supervisor-detect.d.ts +2 -0
- package/dist/core/supervisor-detect.js +59 -17
- package/dist/core/supervisor-detect.test.js +107 -1
- package/dist/core/tailnet-servers.d.ts +11 -2
- package/dist/core/tailnet-servers.js +93 -6
- package/dist/core/tailscale.d.ts +4 -0
- package/dist/core/tailscale.js +17 -2
- package/dist/core/types.d.ts +11 -6
- package/dist/server/agents.js +2 -1
- package/dist/server/remote-validation.d.ts +18 -4
- package/dist/server/remote-validation.js +142 -55
- package/dist/server/routes/config.js +40 -13
- package/dist/server/routes/info.d.ts +27 -1
- package/dist/server/routes/info.js +108 -20
- package/dist/server/routes/servers.d.ts +15 -1
- package/dist/server/routes/servers.js +53 -2
- package/dist/server/routes/types.d.ts +6 -1
- package/dist/server/server.d.ts +2 -0
- package/dist/server/server.js +23 -5
- package/dist/server/tailnet-discovery-listener.d.ts +6 -0
- package/dist/server/tailnet-discovery-listener.js +62 -0
- package/dist/ui/assets/{ActivityIndicator-D3kaLo54.js → ActivityIndicator-DwoyYKVa.js} +1 -1
- package/dist/ui/assets/{AgentModelControl-BXndbOjd.js → AgentModelControl-sj-78Q_B.js} +1 -1
- package/dist/ui/assets/{AgentModelModal-BZon9Xw-.js → AgentModelModal-C1XQIgm2.js} +1 -1
- package/dist/ui/assets/AgentsView-C0WrNcYy.js +2 -0
- package/dist/ui/assets/{ChatAgentModelChip-CFf6DH-x.js → ChatAgentModelChip-Dz79EXOW.js} +1 -1
- package/dist/ui/assets/ChecksView-Dd8LO8m6.js +0 -0
- package/dist/ui/assets/ChecksView-WmIVoIXD.css +1 -0
- package/dist/ui/assets/{ClientBoardView-DJuKrnmC.js → ClientBoardView-BwWiNdXQ.js} +1 -1
- package/dist/ui/assets/ConfirmDialog-DJczbtU0.js +1 -0
- package/dist/ui/assets/{ContextView-CSUEv8W2.js → ContextView-DguOJyZg.js} +3 -3
- package/dist/ui/assets/{DashboardView-6twQIuGs.css → DashboardView-CKnIpPNR.css} +1 -1
- package/dist/ui/assets/DashboardView-CnMju9ig.js +1 -0
- package/dist/ui/assets/DeleteConfirmDialog-CNeMKyyz.js +1 -0
- package/dist/ui/assets/DeploymentsView-0BPop4uE.js +1 -0
- package/dist/ui/assets/{DevView-C_o_mWmQ.js → DevView-mvyrjNa6.js} +1 -1
- package/dist/ui/assets/{DiffView-C1x0YcRf.js → DiffView-CWFtumqM.js} +1 -1
- package/dist/ui/assets/{FailedTestsList-DIkE11W-.js → FailedTestsList-D91YLFHD.js} +1 -1
- package/dist/ui/assets/InputsView-B-a_6_Rh.css +1 -0
- package/dist/ui/assets/InputsView-imnbetme.js +1 -0
- package/dist/ui/assets/{LoginView-C5tfoTdU.js → LoginView-C1U9OfRd.js} +1 -1
- package/dist/ui/assets/{PageSkeleton-BkUizmiD.js → PageSkeleton-D_RFaQwe.js} +1 -1
- package/dist/ui/assets/{ReleasesView-nDp30TpJ.js → ReleasesView-WCCYxoVF.js} +2 -2
- package/dist/ui/assets/SecretsView-DaZYjEvs.js +1 -0
- package/dist/ui/assets/{SettingsView-BhZdEaQH.css → SettingsView-B83mU1Ai.css} +1 -1
- package/dist/ui/assets/SettingsView-zg4S1PEN.js +4 -0
- package/dist/ui/assets/StoriesView-B_gzGkub.css +1 -0
- package/dist/ui/assets/StoriesView-rS16_IN0.js +1 -0
- package/dist/ui/assets/{VoiceDictate-eEL8mOQ6.js → VoiceDictate-Co5CatqL.js} +1 -1
- package/dist/ui/assets/{WorkView-CqOjmAMH.js → WorkView-CkRaRaCF.js} +2 -2
- package/dist/ui/assets/{WorkView-T4sLeN-G.css → WorkView-CxI45mka.css} +1 -1
- package/dist/ui/assets/{abnfDiagram-VCTEODGH-CJQbh9Y8.js → abnfDiagram-VCTEODGH-Dlg7FtI9.js} +1 -1
- package/dist/ui/assets/{activity-motion-ZdL9OJaH.js → activity-motion-kvEPH_et.js} +1 -1
- package/dist/ui/assets/agent-failure-D1nIatMj.js +1 -0
- package/dist/ui/assets/{architectureDiagram-5GKGNRK7-sZsdeKGF.js → architectureDiagram-5GKGNRK7-NF5jHbOB.js} +1 -1
- package/dist/ui/assets/{blockDiagram-I7D4REHJ-B2ZrksFF.js → blockDiagram-I7D4REHJ-C-SV0UUl.js} +1 -1
- package/dist/ui/assets/{c4Diagram-7LVT6UL2-BmaZ6zn9.js → c4Diagram-7LVT6UL2-C-7-RInk.js} +1 -1
- package/dist/ui/assets/channel-B8HmveJ0.js +1 -0
- package/dist/ui/assets/{check-setup-CC3TsiUM.js → check-setup-B7eqbnaj.js} +1 -1
- package/dist/ui/assets/{checkbox-E2VmX5cG.js → checkbox-BC4PYsB5.js} +1 -1
- package/dist/ui/assets/{chunk-2E4U76K2-CBdsovAD.js → chunk-2E4U76K2-DJsZmctN.js} +1 -1
- package/dist/ui/assets/{chunk-4HAMMTFA-C8S0dbJX.js → chunk-4HAMMTFA-BVXiAQ-f.js} +1 -1
- package/dist/ui/assets/{chunk-75Z2AOVW-DZhJMnav.js → chunk-75Z2AOVW-5bJ7d9Q0.js} +1 -1
- package/dist/ui/assets/{chunk-CLGD4ZFX-CbV5aAbV.js → chunk-CLGD4ZFX-TyTatfl6.js} +1 -1
- package/dist/ui/assets/{chunk-DU6HZSFF-BvZvehaf.js → chunk-DU6HZSFF-63f2WDFo.js} +1 -1
- package/dist/ui/assets/{chunk-F27PBJKO-xu6ZrehS.js → chunk-F27PBJKO-i83MKOg7.js} +1 -1
- package/dist/ui/assets/{chunk-GMAD6QVW-CzsEFWQ4.js → chunk-GMAD6QVW-DxGUWdy9.js} +1 -1
- package/dist/ui/assets/{chunk-GVQU2GXP-BL-cKxCh.js → chunk-GVQU2GXP-D2prPE68.js} +1 -1
- package/dist/ui/assets/{chunk-IMKFNOWR-CT-dkpxG.js → chunk-IMKFNOWR-4e5pye7F.js} +1 -1
- package/dist/ui/assets/{chunk-L3NEJ4N5-fGoKWh-p.js → chunk-L3NEJ4N5-C3CQnitz.js} +1 -1
- package/dist/ui/assets/{chunk-OSK3NFVY-CKymLuc9.js → chunk-OSK3NFVY-gvVJAz9z.js} +1 -1
- package/dist/ui/assets/{chunk-P2QGCYS3-8wVktsZB.js → chunk-P2QGCYS3-CUwGXGBr.js} +1 -1
- package/dist/ui/assets/{chunk-POPQ4Y6H-DBSXL1-m.js → chunk-POPQ4Y6H-BDcwgs6v.js} +1 -1
- package/dist/ui/assets/{chunk-PWAF6VOD-BQMqcIDA.js → chunk-PWAF6VOD-CMeVZfww.js} +1 -1
- package/dist/ui/assets/{chunk-SHT3W25Y-BvhuqVhV.js → chunk-SHT3W25Y-ggVxuqJX.js} +1 -1
- package/dist/ui/assets/{chunk-SVP7TREG-sGDG6HEd.js → chunk-SVP7TREG-Be8zyoAB.js} +1 -1
- package/dist/ui/assets/{chunk-TICWLB2K-DVS0G_1O.js → chunk-TICWLB2K-2r1gBZEc.js} +1 -1
- package/dist/ui/assets/chunk-TLUHSLCS-C4YfmYEw.js +2 -0
- package/dist/ui/assets/classDiagram-ZZMXUADV-B4D9FX0u.js +1 -0
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-B4D9FX0u.js +1 -0
- package/dist/ui/assets/close-BDbRl7Nq.js +1 -0
- package/dist/ui/assets/{cynefinDiagram-5FMLGOSQ-DugpXVI1.js → cynefinDiagram-5FMLGOSQ-BKKL7__h.js} +1 -1
- package/dist/ui/assets/{dagre-GXQ25YYZ-Dadsjkxy.js → dagre-GXQ25YYZ-C4wnJpCk.js} +1 -1
- package/dist/ui/assets/{diagram-S7CK7UJ4-B2rv42rU.js → diagram-S7CK7UJ4-DjeciKZW.js} +1 -1
- package/dist/ui/assets/{diagram-UQ7AKVKN-Deh5LDq7.js → diagram-UQ7AKVKN-C-r3LQny.js} +1 -1
- package/dist/ui/assets/{diagram-VSXAHHWV-B5ief5K-.js → diagram-VSXAHHWV-DkwP_c0a.js} +1 -1
- package/dist/ui/assets/{diagram-VX7I27RA-DMOOrVmC.js → diagram-VX7I27RA-4oQ2QBmP.js} +1 -1
- package/dist/ui/assets/{diagram-Z3DM3KII-D-u4Zzjo.js → diagram-Z3DM3KII-DAayG03d.js} +1 -1
- package/dist/ui/assets/{docs-Bru9enkv.js → docs-D3sAWu_L.js} +1 -1
- package/dist/ui/assets/{ebnfDiagram-PWID7BFC-qrEkGeJN.js → ebnfDiagram-PWID7BFC-nfLytJeL.js} +1 -1
- package/dist/ui/assets/{erDiagram-RLTQ6QDP-D3YAPFLv.js → erDiagram-RLTQ6QDP-N3OQ9XZ7.js} +1 -1
- package/dist/ui/assets/flowDiagram-HODETNUW-DUZmqKHp.js +1 -0
- package/dist/ui/assets/{ganttDiagram-EL5Y4UJY-D87AcrkY.js → ganttDiagram-EL5Y4UJY-CW24p715.js} +1 -1
- package/dist/ui/assets/{gitGraphDiagram-WWUBYQGX-BHCwj7xO.js → gitGraphDiagram-WWUBYQGX-baG-rogD.js} +1 -1
- package/dist/ui/assets/index-DEyAKllM.css +1 -0
- package/dist/ui/assets/index-syo8our2.js +109 -0
- package/dist/ui/assets/{infoDiagram-27XIBGKW-CZtHbCPm.js → infoDiagram-27XIBGKW-B20l-Dj7.js} +1 -1
- package/dist/ui/assets/{input-usKnLzob.js → input-DWzP9viW.js} +1 -1
- package/dist/ui/assets/{ishikawaDiagram-5VMMS53U-C4Ko2mjP.js → ishikawaDiagram-5VMMS53U-Dw-7L00u.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-3NMN7TZE-Coc0Ellm.js → journeyDiagram-3NMN7TZE-B1RwpIaW.js} +1 -1
- package/dist/ui/assets/{kanban-definition-UXKFOSKX-Dlgy_hEA.js → kanban-definition-UXKFOSKX-BY2WGcKX.js} +1 -1
- package/dist/ui/assets/{line-CdlVA-Q3.js → line-KVY0Anrq.js} +1 -1
- package/dist/ui/assets/{mermaid-parser.core-kZNhTLCA.js → mermaid-parser.core-ClbENqyX.js} +1 -1
- package/dist/ui/assets/mermaid.core-p1BDpOrr.js +11 -0
- package/dist/ui/assets/{mindmap-definition-YA3MSWOX-DUohcg5e.js → mindmap-definition-YA3MSWOX-B9yhlR8y.js} +1 -1
- package/dist/ui/assets/{pegDiagram-XKGWAZYB-BKXrOVd0.js → pegDiagram-XKGWAZYB-PwJsptvn.js} +1 -1
- package/dist/ui/assets/{pieDiagram-E7YTZNPT-BVEAQvJF.js → pieDiagram-E7YTZNPT-DqTZShF-.js} +1 -1
- package/dist/ui/assets/{quadrantDiagram-AXDQQJYC-7uByTHux.js → quadrantDiagram-AXDQQJYC-Co9qtSqC.js} +1 -1
- package/dist/ui/assets/{railroadDiagram-O6MQD6OU-DWOl1GRi.js → railroadDiagram-O6MQD6OU-DUJA_Hys.js} +1 -1
- package/dist/ui/assets/repo-CwNYzbdc.js +79 -0
- package/dist/ui/assets/{requirementDiagram-BXWQKSXE-C6pt-TXk.js → requirementDiagram-BXWQKSXE-DMsIRj5s.js} +1 -1
- package/dist/ui/assets/{sankeyDiagram-P5KCCOFB-C74T196H.js → sankeyDiagram-P5KCCOFB-BCZOaADr.js} +1 -1
- package/dist/ui/assets/{sequenceDiagram-WJ2MYXX4-CEYBFs6A.js → sequenceDiagram-WJ2MYXX4-Bss-g9PB.js} +1 -1
- package/dist/ui/assets/{stateDiagram-D77RDMKH-CUh9rg93.js → stateDiagram-D77RDMKH-DCvB4mL0.js} +1 -1
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-CjW5nw4h.js +1 -0
- package/dist/ui/assets/{swimlanes-42K2YHIH-CsB1lCCx.js → swimlanes-42K2YHIH-BmHi9eSK.js} +1 -1
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-DrAX_t__.js +8 -0
- package/dist/ui/assets/{switch-CHw_LJLk.js → switch-C9h1H2Kp.js} +1 -1
- package/dist/ui/assets/{timeline-definition-24CTP7MA-BlqdShIR.js → timeline-definition-24CTP7MA-WKZ5iOK3.js} +1 -1
- package/dist/ui/assets/title-Dchwkc3-.js +1 -0
- package/dist/ui/assets/{value-Cnv_lviy.js → value-BqMWzKIQ.js} +1 -1
- package/dist/ui/assets/{vennDiagram-4TSXK5OY-BGVhy2hm.js → vennDiagram-4TSXK5OY-CAfMTZJ7.js} +1 -1
- package/dist/ui/assets/{viewport-T9GJSA28.js → viewport-D7hXjRfS.js} +1 -1
- package/dist/ui/assets/{wardleyDiagram-VM6X3IG4-CNAD8zdQ.js → wardleyDiagram-VM6X3IG4-MS0iUHWc.js} +1 -1
- package/dist/ui/assets/{xychartDiagram-S5SC5T6Z-D_qAaCpN.js → xychartDiagram-S5SC5T6Z-DjF-NKel.js} +1 -1
- package/dist/ui/index.html +19 -20
- package/dist/ui/sw.js +2 -2
- package/package.json +1 -1
- package/dist/ui/assets/AgentsView-B9f2VxAB.js +0 -2
- package/dist/ui/assets/ChecksView-BikrNX6o.js +0 -0
- package/dist/ui/assets/ChecksView-DftvND4G.css +0 -1
- package/dist/ui/assets/ConfirmDialog-DtTUkVd2.js +0 -1
- package/dist/ui/assets/DashboardView-BYuxnCWd.js +0 -1
- package/dist/ui/assets/DeleteConfirmDialog-QLp5rh6F.js +0 -1
- package/dist/ui/assets/DeploymentsView-CZHcw_RB.js +0 -1
- package/dist/ui/assets/InputsView-D0M0_D-W.js +0 -1
- package/dist/ui/assets/InputsView-DmLO8B9g.css +0 -1
- package/dist/ui/assets/SecretsView-CWJrzLhZ.js +0 -1
- package/dist/ui/assets/SettingsView-D2harUCZ.js +0 -4
- package/dist/ui/assets/StoriesView-CeMml429.js +0 -1
- package/dist/ui/assets/StoriesView-CgQxAeKp.css +0 -1
- package/dist/ui/assets/agent-failure-Bmoh7dgZ.js +0 -1
- package/dist/ui/assets/channel-DTyhDnV5.js +0 -1
- package/dist/ui/assets/chunk-TLUHSLCS-BEiR6_Cd.js +0 -2
- package/dist/ui/assets/classDiagram-ZZMXUADV-BiFSDfNF.js +0 -1
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-BiFSDfNF.js +0 -1
- package/dist/ui/assets/close-DEOXwz7c.js +0 -1
- package/dist/ui/assets/flowDiagram-HODETNUW-BAFQ0lbU.js +0 -1
- package/dist/ui/assets/index-CqMm4or2.css +0 -1
- package/dist/ui/assets/index-DlcT4WYV.js +0 -109
- package/dist/ui/assets/layer-DJtr131Z.js +0 -1
- package/dist/ui/assets/mermaid.core-9vSuqd5C.js +0 -11
- package/dist/ui/assets/repo-BX_-2THs.js +0 -79
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-D0CaT-C2.js +0 -1
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-DXIUYdjM.js +0 -8
- package/dist/ui/assets/title-BtztnD4i.js +0 -1
package/dist/.build-info.json
CHANGED
package/dist/.build-stamp.json
CHANGED
|
@@ -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
|
@@ -55,8 +55,8 @@ const GROUPS = [
|
|
|
55
55
|
commands: [
|
|
56
56
|
{
|
|
57
57
|
name: "list",
|
|
58
|
-
usage: "list [
|
|
59
|
-
desc: "Show the board,
|
|
58
|
+
usage: "list [inbox|ready|active|review|done|archived]",
|
|
59
|
+
desc: "Show the board, one status column, or archived tasks",
|
|
60
60
|
},
|
|
61
61
|
{ name: "show", usage: "show <id>", desc: "Show a task's full spec" },
|
|
62
62
|
{
|
|
@@ -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",
|
package/dist/commands/init.js
CHANGED
|
@@ -1353,25 +1353,6 @@ async function askLayout() {
|
|
|
1353
1353
|
console.log(c.yellow(" Too many invalid attempts — using the default (repoos/)."));
|
|
1354
1354
|
return "repoos";
|
|
1355
1355
|
}
|
|
1356
|
-
/** Open a URL in the default browser. Fail-soft (best effort, never blocks). */
|
|
1357
|
-
function openBrowser(url) {
|
|
1358
|
-
const cmd = process.platform === "darwin"
|
|
1359
|
-
? ["open", url]
|
|
1360
|
-
: process.platform === "win32"
|
|
1361
|
-
? ["cmd", "/c", "start", "", url]
|
|
1362
|
-
: ["xdg-open", url];
|
|
1363
|
-
try {
|
|
1364
|
-
const child = spawn(cmd[0], cmd.slice(1), {
|
|
1365
|
-
detached: true,
|
|
1366
|
-
stdio: "ignore",
|
|
1367
|
-
});
|
|
1368
|
-
child.on("error", () => { });
|
|
1369
|
-
child.unref();
|
|
1370
|
-
}
|
|
1371
|
-
catch {
|
|
1372
|
-
/* fail-soft */
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
1356
|
function probePort(port) {
|
|
1376
1357
|
return new Promise((resolve) => {
|
|
1377
1358
|
const srv = createServer();
|
|
@@ -1798,12 +1779,10 @@ async function guidedNewRepo(opts) {
|
|
|
1798
1779
|
"\n");
|
|
1799
1780
|
}
|
|
1800
1781
|
console.log(c.dim(" Starting the RepoOS web console…"));
|
|
1801
|
-
//
|
|
1802
|
-
//
|
|
1803
|
-
// any earlier races that startup, showing connection errors until a
|
|
1804
|
-
// manual reload.
|
|
1782
|
+
// Don't launch a browser automatically: init may run from a headless
|
|
1783
|
+
// engineer session, and opening the user's default browser steals focus.
|
|
1805
1784
|
await cmdServe(["--port", String(port)], {
|
|
1806
|
-
onReady: (url) =>
|
|
1785
|
+
onReady: (url) => console.log(c.dim(` Open the web console at ${url}`)),
|
|
1807
1786
|
onShutdown: dirHint
|
|
1808
1787
|
? () => console.log(c.dim(" Start it again with:\n\n ") +
|
|
1809
1788
|
c.cyan(dirHint) +
|
package/dist/commands/restart.js
CHANGED
|
@@ -3,17 +3,19 @@
|
|
|
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
|
+
supervisor: "supervised process (restarted by its supervisor)",
|
|
13
14
|
"hand-run": "hand-run `repoos serve` (stop + start)",
|
|
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
|
-
|
|
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");
|
package/dist/commands/serve.d.ts
CHANGED
|
@@ -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).
|
package/dist/commands/serve.js
CHANGED
|
@@ -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(
|
|
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 &&
|
|
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({
|
package/dist/commands/tasks.js
CHANGED
|
@@ -155,6 +155,15 @@ function printTaskList(rootName, tasks, statusArg) {
|
|
|
155
155
|
}
|
|
156
156
|
/** `repoos list [status]` — board overview or a single column. */
|
|
157
157
|
export async function cmdList(statusArg) {
|
|
158
|
+
const listStatuses = [...STATUSES.filter((status) => status !== "draft"), "archived"];
|
|
159
|
+
if (statusArg !== undefined &&
|
|
160
|
+
!listStatuses.includes(statusArg)) {
|
|
161
|
+
console.error(c.red(` Unknown list status: ${statusArg}. `) +
|
|
162
|
+
c.dim(`Choose one of: ${listStatuses.join(" | ")}.`));
|
|
163
|
+
console.error(c.dim(" Usage: repoos list [status]"));
|
|
164
|
+
process.exitCode = 1;
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
158
167
|
const remote = await listTasksViaApi(statusArg);
|
|
159
168
|
if (remote) {
|
|
160
169
|
printTaskList(remote.rootName, remote.tasks, statusArg);
|
|
@@ -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
|
|
@@ -96,6 +96,8 @@ export interface Release {
|
|
|
96
96
|
* stay silent then, not print an empty line or "no notes available" filler.
|
|
97
97
|
*/
|
|
98
98
|
export declare function releaseNotesToPrint(body: string | null | undefined): string | null;
|
|
99
|
+
/** `--channel beta|canary|rc` from argv, or null for the default stable channel. */
|
|
100
|
+
export declare function parseChannel(args: string[]): string | null;
|
|
99
101
|
/**
|
|
100
102
|
* `GET /releases/latest` always excludes prereleases (GitHub's own rule, not
|
|
101
103
|
* configurable) — release.yml marks any tag with a "-" (v0.6.0-beta.1,
|
package/dist/commands/upgrade.js
CHANGED
|
@@ -157,10 +157,13 @@ export function releaseNotesToPrint(body) {
|
|
|
157
157
|
return trimmed ? trimmed : null;
|
|
158
158
|
}
|
|
159
159
|
/** `--channel beta|canary|rc` from argv, or null for the default stable channel. */
|
|
160
|
-
function parseChannel(args) {
|
|
161
|
-
const flag = args.
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
export function parseChannel(args) {
|
|
161
|
+
const flag = args.find((arg) => arg === "--channel" || arg.startsWith("--channel="));
|
|
162
|
+
if (!flag)
|
|
163
|
+
return null;
|
|
164
|
+
return flag === "--channel"
|
|
165
|
+
? (args[args.indexOf(flag) + 1] ?? null)
|
|
166
|
+
: flag.slice("--channel=".length);
|
|
164
167
|
}
|
|
165
168
|
/**
|
|
166
169
|
* A GitHub API failure carrying the status and any `Retry-After` (seconds or an
|
|
@@ -210,6 +213,24 @@ export async function fetchLatestRelease(channel, signal) {
|
|
|
210
213
|
return match;
|
|
211
214
|
}
|
|
212
215
|
export async function cmdUpgrade(args) {
|
|
216
|
+
const channelFlags = args.flatMap((arg, index) => arg === "--channel" || arg.startsWith("--channel=") ? [index] : []);
|
|
217
|
+
if (channelFlags.length > 1) {
|
|
218
|
+
console.error(c.red(" Use --channel only once."));
|
|
219
|
+
console.error(c.dim(" Choose one channel: beta, canary, or rc. Usage: repoos upgrade [--channel beta|canary|rc]"));
|
|
220
|
+
process.exitCode = 1;
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const channelFlag = channelFlags[0] ?? -1;
|
|
224
|
+
if (channelFlag !== -1) {
|
|
225
|
+
const arg = args[channelFlag];
|
|
226
|
+
const value = arg === "--channel" ? args[channelFlag + 1] : arg.slice("--channel=".length);
|
|
227
|
+
if (!value || value.startsWith("--") || !["beta", "canary", "rc"].includes(value)) {
|
|
228
|
+
console.error(c.red(` Invalid --channel value: ${value && !value.startsWith("--") ? value : "(missing)"}.`));
|
|
229
|
+
console.error(c.dim(" Choose beta, canary, or rc. Usage: repoos upgrade [--channel beta|canary|rc]"));
|
|
230
|
+
process.exitCode = 1;
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
213
234
|
const root = installRoot();
|
|
214
235
|
const channel = parseChannel(args);
|
|
215
236
|
const instruction = upgradeInstruction({
|
package/dist/core/config.d.ts
CHANGED
|
@@ -316,9 +316,11 @@ export interface ConfigFieldMeta {
|
|
|
316
316
|
min?: number;
|
|
317
317
|
/** Maximum value for number fields */
|
|
318
318
|
max?: number;
|
|
319
|
-
/** Step size for number fields;
|
|
319
|
+
/** Step size for number fields; a non-integer step allows decimals. */
|
|
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
|
package/dist/core/config.js
CHANGED
|
@@ -94,7 +94,8 @@ export const DEFAULT_AGENTS = [
|
|
|
94
94
|
"Never invent evidence: do not fabricate device sessions, live API measurements, external account IDs, " +
|
|
95
95
|
"registration confirmations, or other proof you cannot observe in this run — leave those fields blank and say a human must supply them. " +
|
|
96
96
|
"Never kill processes by name or pattern (`pkill`, `killall`); RepoOS reaps your turn's process group when it ends. " +
|
|
97
|
-
"Stop only a helper's PID if you must stop it early."
|
|
97
|
+
"Stop only a helper's PID if you must stop it early. " +
|
|
98
|
+
"Browser verification must stay headless: never run `open` or `xdg-open` on URLs, launch a headed browser, or use the user's Chrome profile; use headless Playwright with its bundled browser.",
|
|
98
99
|
},
|
|
99
100
|
{
|
|
100
101
|
name: "reviewer",
|
|
@@ -2077,6 +2078,14 @@ export function loadConfig(rootArg, options = {}) {
|
|
|
2077
2078
|
if (typeof rvEnabled === "boolean") {
|
|
2078
2079
|
cfg.remoteValidation = { ...cfg.remoteValidation, enabled: rvEnabled };
|
|
2079
2080
|
}
|
|
2081
|
+
const rvCommand = parsed["remoteValidation.command"];
|
|
2082
|
+
if (typeof rvCommand === "string" && rvCommand.trim()) {
|
|
2083
|
+
cfg.remoteValidation = { ...cfg.remoteValidation, command: rvCommand.trim() };
|
|
2084
|
+
}
|
|
2085
|
+
const rvRequiredTools = normalizeStringList(parsed["remoteValidation.requiredTools"]);
|
|
2086
|
+
if (rvRequiredTools.length) {
|
|
2087
|
+
cfg.remoteValidation = { ...cfg.remoteValidation, requiredTools: rvRequiredTools };
|
|
2088
|
+
}
|
|
2080
2089
|
const rvProvider = parsed["remoteValidation.provider"];
|
|
2081
2090
|
if (rvProvider === "hetzner" || rvProvider === "tailscale") {
|
|
2082
2091
|
cfg.remoteValidation = { ...cfg.remoteValidation, provider: rvProvider };
|
|
@@ -2618,6 +2627,18 @@ export function applyReloadedConfig(holder, fresh) {
|
|
|
2618
2627
|
holder.config.areas = fresh.areas;
|
|
2619
2628
|
holder.config.preview = fresh.preview;
|
|
2620
2629
|
}
|
|
2630
|
+
/** Select fields whose dropdown/API representations persist as numeric config values. */
|
|
2631
|
+
export const NUMERIC_SELECT_CONFIG_KEYS = [
|
|
2632
|
+
"maxActiveTasks",
|
|
2633
|
+
"maxConcurrentAgents",
|
|
2634
|
+
"remoteValidation.maxConcurrent",
|
|
2635
|
+
"worktreeWarnThreshold",
|
|
2636
|
+
"heavySlots",
|
|
2637
|
+
"vitest.maxWorkers",
|
|
2638
|
+
"localChecks.maxConcurrent",
|
|
2639
|
+
"playwright.workers",
|
|
2640
|
+
"playwright.maxConcurrent",
|
|
2641
|
+
];
|
|
2621
2642
|
export function getConfigSchema() {
|
|
2622
2643
|
return [
|
|
2623
2644
|
{
|
|
@@ -3556,6 +3577,9 @@ export function getConfigSchema() {
|
|
|
3556
3577
|
tier: "live",
|
|
3557
3578
|
restartRequired: false,
|
|
3558
3579
|
default: 0.08,
|
|
3580
|
+
min: 0,
|
|
3581
|
+
max: 1,
|
|
3582
|
+
step: 0.01,
|
|
3559
3583
|
description: "Block new checks, browser steps and engineer starts when reclaimable memory falls below this fraction of total RAM. Default 0.08 (8%).",
|
|
3560
3584
|
},
|
|
3561
3585
|
{
|
|
@@ -3565,6 +3589,9 @@ export function getConfigSchema() {
|
|
|
3565
3589
|
tier: "live",
|
|
3566
3590
|
restartRequired: false,
|
|
3567
3591
|
default: 0.5,
|
|
3592
|
+
min: 0.01,
|
|
3593
|
+
max: 1,
|
|
3594
|
+
step: 0.01,
|
|
3568
3595
|
description: "Warn when swap in use exceeds this fraction of total swap (occupancy alone does not block). Default 0.5 (50%).",
|
|
3569
3596
|
},
|
|
3570
3597
|
{
|
|
@@ -3574,6 +3601,9 @@ export function getConfigSchema() {
|
|
|
3574
3601
|
tier: "live",
|
|
3575
3602
|
restartRequired: false,
|
|
3576
3603
|
default: 0.35,
|
|
3604
|
+
min: 0.01,
|
|
3605
|
+
max: 1,
|
|
3606
|
+
step: 0.01,
|
|
3577
3607
|
description: "Warn when the macOS memory compressor holds more than this fraction of total RAM. The fraction alone does not block; the byte cap does. Default 0.35 (35%).",
|
|
3578
3608
|
},
|
|
3579
3609
|
{
|
|
@@ -3763,8 +3793,8 @@ export function getConfigSchema() {
|
|
|
3763
3793
|
restartRequired: false,
|
|
3764
3794
|
default: true,
|
|
3765
3795
|
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
|
|
3767
|
-
"makes no scans. Turn off to
|
|
3796
|
+
"see on your Tailscale tailnet. Discovery uses HTTP over Tailscale with SSH fallback; the phone " +
|
|
3797
|
+
"makes no scans. Turn off to hide this project's registry row from peers; manual adds still work.",
|
|
3768
3798
|
},
|
|
3769
3799
|
{
|
|
3770
3800
|
key: "remoteValidation.enabled",
|
|
@@ -3790,6 +3820,24 @@ export function getConfigSchema() {
|
|
|
3790
3820
|
description: "tailscale: SSH into a persistent machine on your Tailscale network and run the gate in a fresh Docker container. " +
|
|
3791
3821
|
"hetzner: provision a disposable Hetzner Cloud VM from a prebuilt snapshot.",
|
|
3792
3822
|
},
|
|
3823
|
+
{
|
|
3824
|
+
key: "remoteValidation.command",
|
|
3825
|
+
label: "Remote validation: command",
|
|
3826
|
+
type: "string",
|
|
3827
|
+
tier: "restart",
|
|
3828
|
+
restartRequired: true,
|
|
3829
|
+
default: "",
|
|
3830
|
+
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.",
|
|
3831
|
+
},
|
|
3832
|
+
{
|
|
3833
|
+
key: "remoteValidation.requiredTools",
|
|
3834
|
+
label: "Remote validation: required runner tools",
|
|
3835
|
+
type: "array",
|
|
3836
|
+
tier: "restart",
|
|
3837
|
+
restartRequired: true,
|
|
3838
|
+
default: [],
|
|
3839
|
+
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.",
|
|
3840
|
+
},
|
|
3793
3841
|
{
|
|
3794
3842
|
key: "remoteValidation.tailscaleHost",
|
|
3795
3843
|
label: "Remote validation: tailscale host",
|
|
@@ -4705,6 +4753,8 @@ export const SUPPORTED_TOML_KEYS = [
|
|
|
4705
4753
|
// Remote validation
|
|
4706
4754
|
"remoteValidation.enabled",
|
|
4707
4755
|
"remoteValidation.provider",
|
|
4756
|
+
"remoteValidation.command",
|
|
4757
|
+
"remoteValidation.requiredTools",
|
|
4708
4758
|
"remoteValidation.tailscaleHost",
|
|
4709
4759
|
"remoteValidation.tailscaleHosts",
|
|
4710
4760
|
"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
|
+
}
|
package/dist/core/detect.js
CHANGED
|
@@ -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:
|
|
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
|
},
|
package/dist/core/git.js
CHANGED
|
@@ -100,10 +100,22 @@ function worktreeAddLockPath(root, branch) {
|
|
|
100
100
|
return join(root, ".repoos", "worktree-add-locks", hash);
|
|
101
101
|
}
|
|
102
102
|
function worktreeAddLockIsStale(lockDir) {
|
|
103
|
+
const oldEnoughToBeAbandoned = () => {
|
|
104
|
+
try {
|
|
105
|
+
return Date.now() - statSync(lockDir).mtimeMs > WORKTREE_ADD_LOCK_STALE_MS;
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
// The lock may have been released between existsSync and statSync.
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
103
112
|
try {
|
|
104
113
|
const pid = Number(readFileSync(join(lockDir, "pid"), "utf8"));
|
|
114
|
+
// mkdir(lockDir) and writing its pid are separate filesystem operations.
|
|
115
|
+
// Treat that brief initialization window as held; otherwise a contender
|
|
116
|
+
// can remove a live process's lock before its owner has recorded the pid.
|
|
105
117
|
if (!Number.isInteger(pid) || pid <= 0)
|
|
106
|
-
return
|
|
118
|
+
return oldEnoughToBeAbandoned();
|
|
107
119
|
if (process.platform !== "win32") {
|
|
108
120
|
const result = spawnSync("ps", ["-o", "stat=", "-p", String(pid)], {
|
|
109
121
|
encoding: "utf8",
|
|
@@ -123,7 +135,7 @@ function worktreeAddLockIsStale(lockDir) {
|
|
|
123
135
|
}
|
|
124
136
|
}
|
|
125
137
|
catch {
|
|
126
|
-
return
|
|
138
|
+
return oldEnoughToBeAbandoned();
|
|
127
139
|
}
|
|
128
140
|
}
|
|
129
141
|
/** Cross-process mutex so two starts for the same branch do not both run `-b` (#0994). */
|
package/dist/core/models.js
CHANGED
|
@@ -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
|
|
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:
|
|
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;
|