@repo-os/repoos 0.5.87 → 0.5.89
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/README.md +12 -0
- package/dist/.build-info.json +2 -2
- package/dist/.build-stamp.json +1 -1
- package/dist/cli/api-route-parity.js +15 -0
- package/dist/cli/help.js +6 -0
- package/dist/cli/index.js +7 -1
- package/dist/commands/control-api.d.ts +2 -0
- package/dist/commands/control-api.js +293 -13
- package/dist/commands/servers.d.ts +10 -29
- package/dist/commands/servers.js +25 -85
- package/dist/commands/status.d.ts +15 -0
- package/dist/commands/status.js +46 -1
- package/dist/commands/ui-contrast-audit.js +3 -3
- package/dist/commands/ui-smoke.js +153 -6
- package/dist/core/agent-failure.js +35 -1
- package/dist/core/agent-failure.test.js +35 -0
- package/dist/core/agent-last-runs.d.ts +30 -10
- package/dist/core/agent-last-runs.js +79 -29
- package/dist/core/agent-last-runs.test.js +59 -47
- package/dist/core/allowlist-group-sync.d.ts +70 -0
- package/dist/core/allowlist-group-sync.js +155 -0
- package/dist/core/allowlist-groups.d.ts +95 -0
- package/dist/core/allowlist-groups.js +478 -0
- package/dist/core/attention.d.ts +4 -2
- package/dist/core/attention.js +27 -3
- package/dist/core/config.js +101 -3
- package/dist/core/db.d.ts +1 -1
- package/dist/core/db.js +2 -2
- package/dist/core/git.d.ts +12 -0
- package/dist/core/git.js +109 -9
- package/dist/core/hub-return.d.ts +76 -0
- package/dist/core/hub-return.js +141 -0
- package/dist/core/page-browser-gate.js +5 -0
- package/dist/core/pressure-guard.d.ts +24 -0
- package/dist/core/pressure-guard.js +50 -1
- package/dist/core/run-processes.d.ts +144 -0
- package/dist/core/run-processes.js +417 -0
- package/dist/core/server-registry.d.ts +47 -6
- package/dist/core/server-registry.js +37 -18
- package/dist/core/shot-fixtures.d.ts +1 -1
- package/dist/core/shot-fixtures.js +13 -0
- package/dist/core/tailnet-servers.d.ts +159 -0
- package/dist/core/tailnet-servers.js +515 -0
- package/dist/core/temp-dir.d.ts +1 -0
- package/dist/core/temp-dir.js +23 -0
- package/dist/core/types.d.ts +26 -0
- package/dist/server/agents.d.ts +5 -0
- package/dist/server/agents.js +40 -10
- package/dist/server/attention-events.d.ts +1 -1
- package/dist/server/attention-events.js +2 -8
- package/dist/server/attention-notify.d.ts +10 -0
- package/dist/server/attention-notify.js +34 -0
- package/dist/server/config-watch.d.ts +10 -1
- package/dist/server/config-watch.js +84 -16
- package/dist/server/cto-monitor.d.ts +3 -0
- package/dist/server/cto-monitor.js +45 -3
- package/dist/server/engineer-remote-self-check.js +1 -0
- package/dist/server/handoff.js +3 -1
- package/dist/server/integration-orchestrator.js +4 -0
- package/dist/server/notifications/dispatch.d.ts +22 -0
- package/dist/server/notifications/dispatch.js +51 -2
- package/dist/server/notifications/index.d.ts +2 -2
- package/dist/server/notifications/index.js +2 -2
- package/dist/server/notifications/ntfy-provider.js +3 -0
- package/dist/server/notifications/spec.d.ts +6 -0
- package/dist/server/notifications/spec.js +29 -0
- package/dist/server/notifications/telegram-provider.js +10 -1
- package/dist/server/notifications/types.d.ts +1 -1
- package/dist/server/pre-review-remote-gate.js +3 -1
- package/dist/server/release-auto-publish.d.ts +46 -0
- package/dist/server/release-auto-publish.js +99 -0
- package/dist/server/release.d.ts +8 -0
- package/dist/server/release.js +13 -0
- package/dist/server/request-close-out.js +6 -2
- package/dist/server/routes/budget-allowlist-groups.d.ts +61 -0
- package/dist/server/routes/budget-allowlist-groups.js +353 -0
- package/dist/server/routes/config.d.ts +8 -0
- package/dist/server/routes/config.js +81 -1
- package/dist/server/routes/index.d.ts +2 -0
- package/dist/server/routes/index.js +2 -0
- package/dist/server/routes/release.d.ts +28 -1
- package/dist/server/routes/release.js +458 -25
- package/dist/server/routes/servers.d.ts +35 -0
- package/dist/server/routes/servers.js +75 -0
- package/dist/server/routes/tasks.js +11 -6
- package/dist/server/routes/ui.d.ts +15 -0
- package/dist/server/routes/ui.js +73 -2
- package/dist/server/run-process-reaper.d.ts +61 -0
- package/dist/server/run-process-reaper.js +131 -0
- package/dist/server/schedule-automation.js +2 -1
- package/dist/server/serve-reaper.d.ts +10 -1
- package/dist/server/serve-reaper.js +2 -1
- package/dist/server/server.js +143 -8
- package/dist/server/system.d.ts +24 -1
- package/dist/server/system.js +5 -1
- package/dist/server/worktree-handoff-guard.js +9 -3
- package/dist/ui/assets/ActivityIndicator-D3kaLo54.js +1 -0
- package/dist/ui/assets/AgentModelControl-BXndbOjd.js +1 -0
- package/dist/ui/assets/AgentModelModal-BZon9Xw-.js +1 -0
- package/dist/ui/assets/AgentsView-B9f2VxAB.js +2 -0
- package/dist/ui/assets/{AgentsView-B-MwFhrh.css → AgentsView-DPOKSgl6.css} +1 -1
- package/dist/ui/assets/ChatAgentModelChip-CFf6DH-x.js +1 -0
- package/dist/ui/assets/ChecksView-BikrNX6o.js +0 -0
- package/dist/ui/assets/{ChecksView-u0VznGkb.css → ChecksView-DftvND4G.css} +1 -1
- package/dist/ui/assets/ClientBoardView-DJuKrnmC.js +1 -0
- package/dist/ui/assets/ConfirmDialog-DtTUkVd2.js +1 -0
- package/dist/ui/assets/ContextView-CSUEv8W2.js +4 -0
- package/dist/ui/assets/DashboardView-6twQIuGs.css +1 -0
- package/dist/ui/assets/DashboardView-BYuxnCWd.js +1 -0
- package/dist/ui/assets/DeleteConfirmDialog-QLp5rh6F.js +1 -0
- package/dist/ui/assets/DeploymentsView-CZHcw_RB.js +1 -0
- package/dist/ui/assets/DevView-C_o_mWmQ.js +2 -0
- package/dist/ui/assets/DiffView-C1x0YcRf.js +6 -0
- package/dist/ui/assets/DiffView-nIrAbr64.css +1 -0
- package/dist/ui/assets/{FailedTestsList-P_rSNZ69.js → FailedTestsList-DIkE11W-.js} +1 -1
- package/dist/ui/assets/InputsView-D0M0_D-W.js +1 -0
- package/dist/ui/assets/LoginView-C5tfoTdU.js +1 -0
- package/dist/ui/assets/LoginView-DgYid8_T.css +1 -0
- package/dist/ui/assets/{PageSkeleton-CcaR0Kfv.js → PageSkeleton-BkUizmiD.js} +1 -1
- package/dist/ui/assets/ReleasesView-CAIlRSH_.css +1 -0
- package/dist/ui/assets/ReleasesView-nDp30TpJ.js +7 -0
- package/dist/ui/assets/SecretsView-CWJrzLhZ.js +1 -0
- package/dist/ui/assets/SettingsView-D2harUCZ.js +4 -0
- package/dist/ui/assets/StoriesView-CeMml429.js +1 -0
- package/dist/ui/assets/StoriesView-CgQxAeKp.css +1 -0
- package/dist/ui/assets/VoiceDictate-eEL8mOQ6.js +16 -0
- package/dist/ui/assets/WorkView-CqOjmAMH.js +2 -0
- package/dist/ui/assets/WorkView-T4sLeN-G.css +1 -0
- package/dist/ui/assets/{abnfDiagram-VCTEODGH-Bz8-GAIx.js → abnfDiagram-VCTEODGH-CJQbh9Y8.js} +1 -1
- package/dist/ui/assets/{activity-motion-BmUJdM2_.js → activity-motion-ZdL9OJaH.js} +1 -1
- package/dist/ui/assets/agent-failure-Bmoh7dgZ.js +1 -0
- package/dist/ui/assets/{architectureDiagram-5GKGNRK7-CXNWF1SF.js → architectureDiagram-5GKGNRK7-sZsdeKGF.js} +1 -1
- package/dist/ui/assets/{blockDiagram-I7D4REHJ-Djzn2CjQ.js → blockDiagram-I7D4REHJ-B2ZrksFF.js} +1 -1
- package/dist/ui/assets/{c4Diagram-7LVT6UL2-B49fjNlt.js → c4Diagram-7LVT6UL2-BmaZ6zn9.js} +1 -1
- package/dist/ui/assets/channel-DTyhDnV5.js +1 -0
- package/dist/ui/assets/{check-setup-CI1BITko.js → check-setup-CC3TsiUM.js} +1 -1
- package/dist/ui/assets/checkbox-E2VmX5cG.js +1 -0
- package/dist/ui/assets/{chunk-2E4U76K2-DIQZICvD.js → chunk-2E4U76K2-CBdsovAD.js} +1 -1
- package/dist/ui/assets/{chunk-4HAMMTFA-CvDOLnGx.js → chunk-4HAMMTFA-C8S0dbJX.js} +1 -1
- package/dist/ui/assets/{chunk-75Z2AOVW-BhcP2hXI.js → chunk-75Z2AOVW-DZhJMnav.js} +1 -1
- package/dist/ui/assets/{chunk-CLGD4ZFX-BRB4aywL.js → chunk-CLGD4ZFX-CbV5aAbV.js} +1 -1
- package/dist/ui/assets/{chunk-DU6HZSFF-B0GAxPMc.js → chunk-DU6HZSFF-BvZvehaf.js} +1 -1
- package/dist/ui/assets/{chunk-F27PBJKO-IHaBYO5l.js → chunk-F27PBJKO-xu6ZrehS.js} +1 -1
- package/dist/ui/assets/{chunk-GMAD6QVW-BI3hBVRJ.js → chunk-GMAD6QVW-CzsEFWQ4.js} +1 -1
- package/dist/ui/assets/{chunk-GVQU2GXP-DbzKPEnJ.js → chunk-GVQU2GXP-BL-cKxCh.js} +1 -1
- package/dist/ui/assets/{chunk-IMKFNOWR-BenvuJs1.js → chunk-IMKFNOWR-CT-dkpxG.js} +1 -1
- package/dist/ui/assets/{chunk-L3NEJ4N5-QAakbhpj.js → chunk-L3NEJ4N5-fGoKWh-p.js} +1 -1
- package/dist/ui/assets/{chunk-OSK3NFVY-BF7wdcGk.js → chunk-OSK3NFVY-CKymLuc9.js} +1 -1
- package/dist/ui/assets/{chunk-P2QGCYS3-BlRSmyqq.js → chunk-P2QGCYS3-8wVktsZB.js} +1 -1
- package/dist/ui/assets/{chunk-POPQ4Y6H-DVbDJ3q9.js → chunk-POPQ4Y6H-DBSXL1-m.js} +1 -1
- package/dist/ui/assets/{chunk-PWAF6VOD-DSOcAa9g.js → chunk-PWAF6VOD-BQMqcIDA.js} +1 -1
- package/dist/ui/assets/{chunk-SHT3W25Y-C57AnXf2.js → chunk-SHT3W25Y-BvhuqVhV.js} +1 -1
- package/dist/ui/assets/{chunk-SVP7TREG-C0X--UiX.js → chunk-SVP7TREG-sGDG6HEd.js} +1 -1
- package/dist/ui/assets/{chunk-TICWLB2K-DdSWhkCM.js → chunk-TICWLB2K-DVS0G_1O.js} +1 -1
- package/dist/ui/assets/chunk-TLUHSLCS-BEiR6_Cd.js +2 -0
- package/dist/ui/assets/classDiagram-ZZMXUADV-BiFSDfNF.js +1 -0
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-BiFSDfNF.js +1 -0
- package/dist/ui/assets/close-DEOXwz7c.js +1 -0
- package/dist/ui/assets/{cynefinDiagram-5FMLGOSQ-jvUSfoXV.js → cynefinDiagram-5FMLGOSQ-DugpXVI1.js} +1 -1
- package/dist/ui/assets/{dagre-GXQ25YYZ-vBatcNfm.js → dagre-GXQ25YYZ-Dadsjkxy.js} +1 -1
- package/dist/ui/assets/{diagram-S7CK7UJ4-Can4QKc3.js → diagram-S7CK7UJ4-B2rv42rU.js} +1 -1
- package/dist/ui/assets/{diagram-UQ7AKVKN-Bq9bmA8F.js → diagram-UQ7AKVKN-Deh5LDq7.js} +1 -1
- package/dist/ui/assets/{diagram-VSXAHHWV-BiKkp9zo.js → diagram-VSXAHHWV-B5ief5K-.js} +1 -1
- package/dist/ui/assets/{diagram-VX7I27RA-jlPm1GsN.js → diagram-VX7I27RA-DMOOrVmC.js} +1 -1
- package/dist/ui/assets/{diagram-Z3DM3KII-ChqysqSZ.js → diagram-Z3DM3KII-D-u4Zzjo.js} +1 -1
- package/dist/ui/assets/{docs-55C1_zAl.js → docs-Bru9enkv.js} +1 -1
- package/dist/ui/assets/{ebnfDiagram-PWID7BFC-DKvZJ2sG.js → ebnfDiagram-PWID7BFC-qrEkGeJN.js} +1 -1
- package/dist/ui/assets/{erDiagram-RLTQ6QDP-BkzO_9pW.js → erDiagram-RLTQ6QDP-D3YAPFLv.js} +1 -1
- package/dist/ui/assets/flowDiagram-HODETNUW-BAFQ0lbU.js +1 -0
- package/dist/ui/assets/{ganttDiagram-EL5Y4UJY-CVK1o8iQ.js → ganttDiagram-EL5Y4UJY-D87AcrkY.js} +1 -1
- package/dist/ui/assets/{gitGraphDiagram-WWUBYQGX-D6DLi_gp.js → gitGraphDiagram-WWUBYQGX-BHCwj7xO.js} +1 -1
- package/dist/ui/assets/index-CqMm4or2.css +1 -0
- package/dist/ui/assets/index-DlcT4WYV.js +109 -0
- package/dist/ui/assets/{infoDiagram-27XIBGKW-CDlRO__M.js → infoDiagram-27XIBGKW-CZtHbCPm.js} +1 -1
- package/dist/ui/assets/input-usKnLzob.js +1 -0
- package/dist/ui/assets/{ishikawaDiagram-5VMMS53U-B3kVylwC.js → ishikawaDiagram-5VMMS53U-C4Ko2mjP.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-3NMN7TZE-BW6l28ES.js → journeyDiagram-3NMN7TZE-Coc0Ellm.js} +1 -1
- package/dist/ui/assets/{kanban-definition-UXKFOSKX-CeE7pWlu.js → kanban-definition-UXKFOSKX-Dlgy_hEA.js} +1 -1
- package/dist/ui/assets/{layer-BvZDv12j.js → layer-DJtr131Z.js} +1 -1
- package/dist/ui/assets/{line-DF7CoM1t.js → line-CdlVA-Q3.js} +1 -1
- package/dist/ui/assets/{mermaid-parser.core-Ckxy8Ohc.js → mermaid-parser.core-kZNhTLCA.js} +1 -1
- package/dist/ui/assets/mermaid.core-9vSuqd5C.js +11 -0
- package/dist/ui/assets/{mindmap-definition-YA3MSWOX-ujyfdZe4.js → mindmap-definition-YA3MSWOX-DUohcg5e.js} +1 -1
- package/dist/ui/assets/{pegDiagram-XKGWAZYB-FSE44dnU.js → pegDiagram-XKGWAZYB-BKXrOVd0.js} +1 -1
- package/dist/ui/assets/{pieDiagram-E7YTZNPT-BTXqQhQ3.js → pieDiagram-E7YTZNPT-BVEAQvJF.js} +1 -1
- package/dist/ui/assets/{quadrantDiagram-AXDQQJYC-DiA78Qq5.js → quadrantDiagram-AXDQQJYC-7uByTHux.js} +1 -1
- package/dist/ui/assets/{railroadDiagram-O6MQD6OU-PCYwyboL.js → railroadDiagram-O6MQD6OU-DWOl1GRi.js} +1 -1
- package/dist/ui/assets/repo-BX_-2THs.js +79 -0
- package/dist/ui/assets/{requirementDiagram-BXWQKSXE-YWxU423B.js → requirementDiagram-BXWQKSXE-C6pt-TXk.js} +1 -1
- package/dist/ui/assets/{sankeyDiagram-P5KCCOFB-BBdcKygi.js → sankeyDiagram-P5KCCOFB-C74T196H.js} +1 -1
- package/dist/ui/assets/{sequenceDiagram-WJ2MYXX4-PlII0Tzj.js → sequenceDiagram-WJ2MYXX4-CEYBFs6A.js} +1 -1
- package/dist/ui/assets/{stateDiagram-D77RDMKH-BXZtQxcN.js → stateDiagram-D77RDMKH-CUh9rg93.js} +1 -1
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-D0CaT-C2.js +1 -0
- package/dist/ui/assets/{swimlanes-42K2YHIH-cO-1fpIX.js → swimlanes-42K2YHIH-CsB1lCCx.js} +1 -1
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-DXIUYdjM.js +8 -0
- package/dist/ui/assets/{switch-BHLgIQon.js → switch-CHw_LJLk.js} +1 -1
- package/dist/ui/assets/{timeline-definition-24CTP7MA-Cy2bf2Af.js → timeline-definition-24CTP7MA-BlqdShIR.js} +1 -1
- package/dist/ui/assets/title-BtztnD4i.js +1 -0
- package/dist/ui/assets/useChatScroll--_KRDDa8.js +1 -0
- package/dist/ui/assets/{useResponsiveLayout-avkGtdev.js → useResponsiveLayout-CWHmiJKK.js} +1 -1
- package/dist/ui/assets/value-Cnv_lviy.js +1 -0
- package/dist/ui/assets/vendor-ui-DdxFTke2.js +3 -0
- package/dist/ui/assets/vendor-vue-BbjysADZ.js +1 -0
- package/dist/ui/assets/{vennDiagram-4TSXK5OY-CFz9NVr4.js → vennDiagram-4TSXK5OY-BGVhy2hm.js} +1 -1
- package/dist/ui/assets/viewport-T9GJSA28.js +1 -0
- package/dist/ui/assets/{wardleyDiagram-VM6X3IG4-C7h_Nxkw.js → wardleyDiagram-VM6X3IG4-CNAD8zdQ.js} +1 -1
- package/dist/ui/assets/{xychartDiagram-S5SC5T6Z-BoAILUVz.js → xychartDiagram-S5SC5T6Z-D_qAaCpN.js} +1 -1
- package/dist/ui/index.html +25 -25
- package/dist/ui/sw.js +2 -2
- package/package.json +1 -1
- package/dist/commands/servers.test.d.ts +0 -1
- package/dist/commands/servers.test.js +0 -92
- package/dist/core/server-registry.test.d.ts +0 -1
- package/dist/core/server-registry.test.js +0 -138
- package/dist/ui/assets/ActivityIndicator-CPm5BRNB.js +0 -1
- package/dist/ui/assets/AgentModelControl-BP8sqze-.js +0 -1
- package/dist/ui/assets/AgentModelModal-CmDfWucB.js +0 -1
- package/dist/ui/assets/AgentsView-CW7gnr_T.js +0 -2
- package/dist/ui/assets/ChatAgentModelChip-C1iZ_8MD.js +0 -1
- package/dist/ui/assets/ChecksView-B2tvH_ih.js +0 -0
- package/dist/ui/assets/ClientBoardView-BQ-tf2gs.js +0 -1
- package/dist/ui/assets/ConfirmDialog-DPnkOFol.js +0 -1
- package/dist/ui/assets/ContextView-CNvMQPgF.js +0 -4
- package/dist/ui/assets/DashboardView-B18MiZwS.js +0 -1
- package/dist/ui/assets/DashboardView-jENeCIEX.css +0 -1
- package/dist/ui/assets/DeleteConfirmDialog-Da9Bacbx.js +0 -1
- package/dist/ui/assets/DeploymentsView-Detw_RL3.js +0 -1
- package/dist/ui/assets/DevView-DyNvxoeI.js +0 -2
- package/dist/ui/assets/DiffView-BNXCMPX-.js +0 -6
- package/dist/ui/assets/DiffView-DLg3DKTC.css +0 -1
- package/dist/ui/assets/InputsView-BU-zAjp2.js +0 -1
- package/dist/ui/assets/LoginView-6QlGg6cx.css +0 -1
- package/dist/ui/assets/LoginView-C0t2TIgW.js +0 -1
- package/dist/ui/assets/ReleasesView-4IdvUDjT.css +0 -1
- package/dist/ui/assets/ReleasesView-DXIbVlo2.js +0 -7
- package/dist/ui/assets/SecretsView-D3XsQR7w.js +0 -1
- package/dist/ui/assets/SettingsView-DfVuWB1p.js +0 -4
- package/dist/ui/assets/StoriesView-CIvCqeyj.js +0 -1
- package/dist/ui/assets/StoriesView-DEihGJ88.css +0 -1
- package/dist/ui/assets/VoiceDictate-DJxI4R1e.js +0 -1
- package/dist/ui/assets/WorkView-BSyD2pmD.js +0 -2
- package/dist/ui/assets/WorkView-C1apCJBN.css +0 -1
- package/dist/ui/assets/agent-failure-oD7JrpAX.js +0 -1
- package/dist/ui/assets/channel-Dm7tReYq.js +0 -1
- package/dist/ui/assets/checkbox-CppTZSHg.js +0 -1
- package/dist/ui/assets/chunk-TLUHSLCS-RJWXCd0v.js +0 -2
- package/dist/ui/assets/classDiagram-ZZMXUADV-DwuWGpLi.js +0 -1
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-DwuWGpLi.js +0 -1
- package/dist/ui/assets/close-DGMDnjoO.js +0 -1
- package/dist/ui/assets/flowDiagram-HODETNUW-DNXve0ms.js +0 -1
- package/dist/ui/assets/index-D67m9qKl.css +0 -1
- package/dist/ui/assets/index-DmWcWHlU.js +0 -95
- package/dist/ui/assets/input-Bc0aNTNs.js +0 -1
- package/dist/ui/assets/markdown-rVjWPmDr.js +0 -16
- package/dist/ui/assets/mermaid.core-CP5xfia6.js +0 -11
- package/dist/ui/assets/repo-DlWSO5L1.js +0 -79
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-ApI_GghP.js +0 -1
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-DceTZbc1.js +0 -8
- package/dist/ui/assets/title-BSEVo0iT.js +0 -1
- package/dist/ui/assets/useChatScroll-Cx8yub8t.js +0 -1
- package/dist/ui/assets/value-CIJASySy.js +0 -1
- package/dist/ui/assets/vendor-ui-BmzYkqZG.js +0 -3
- package/dist/ui/assets/vendor-vue-CQ0VGVRu.js +0 -1
- package/dist/ui/assets/viewport-B5Qy7nSx.js +0 -1
package/README.md
CHANGED
|
@@ -320,6 +320,18 @@ Current builds are ad-hoc signed and not notarized. After a first blocked launch
|
|
|
320
320
|
use **System Settings → Privacy & Security → Open Anyway**; the guide has the
|
|
321
321
|
exact steps. Developer ID signing and notarization are planned.
|
|
322
322
|
|
|
323
|
+
## RepoOS Hub for Android
|
|
324
|
+
|
|
325
|
+
The same Hub for your phone, requiring **Android 8.0 (API 26) or newer**. It
|
|
326
|
+
keeps the server list on the device and opens each server in an isolated
|
|
327
|
+
WebView, so accounts and cookies never cross between servers.
|
|
328
|
+
|
|
329
|
+
Download the latest [RepoOS Hub APK](https://github.com/repo-os/repoos/releases/latest/download/RepoOSHub.apk),
|
|
330
|
+
or browse [GitHub Releases](https://github.com/repo-os/repoos/releases). It is
|
|
331
|
+
not on the Play Store yet, so you sideload the APK; each stable tag ships a
|
|
332
|
+
release-signed `RepoOSHub.apk` next to the DMG. Install, update, and certificate
|
|
333
|
+
verification steps are in the [Android Hub guide](https://docs.repoos.org/android-hub).
|
|
334
|
+
|
|
323
335
|
## Roadmap
|
|
324
336
|
|
|
325
337
|
- **Stage 1 — parser + index + CLI** ✅
|
package/dist/.build-info.json
CHANGED
package/dist/.build-stamp.json
CHANGED
|
@@ -35,6 +35,12 @@ const CONTROL_API_MATCHERS = [
|
|
|
35
35
|
re("POST", /^\/api\/dev\/targets\/([^/]+)\/(start|stop|restart)$/.source),
|
|
36
36
|
exact("GET", "/api/config"),
|
|
37
37
|
exact("PATCH", "/api/config"),
|
|
38
|
+
// `repoos allowlist …` (#1132): group state, pause/resume + tailnet
|
|
39
|
+
// propagation, re-sync, and the authenticated receiver a peer's CLI calls.
|
|
40
|
+
exact("GET", "/api/budget/allowlist-group"),
|
|
41
|
+
exact("POST", "/api/budget/allowlist-group/pause"),
|
|
42
|
+
exact("POST", "/api/budget/allowlist-group/resync"),
|
|
43
|
+
exact("POST", "/api/budget/allowlist-group/apply"),
|
|
38
44
|
exact("GET", "/api/remote-validation/status"),
|
|
39
45
|
exact("POST", "/api/remote-validation/test"),
|
|
40
46
|
exact("GET", "/api/agents/running"),
|
|
@@ -91,6 +97,10 @@ const UI_ONLY_MATCHERS = [
|
|
|
91
97
|
re("GET", /^\/api\/tasks\/([^/]+)\/engineering-reports\/([^/]+)$/.source),
|
|
92
98
|
under("/api/auth/"),
|
|
93
99
|
under("/api/hub/"),
|
|
100
|
+
// The native mobile Hub's server-assisted tailnet import (#1127). The phone
|
|
101
|
+
// cannot run the CLI, and the CLI's own `repoos servers --tailscale` reads
|
|
102
|
+
// the same core directly rather than this authenticated endpoint.
|
|
103
|
+
exact("GET", "/api/servers/tailnet"),
|
|
94
104
|
under("/api/telegram/"),
|
|
95
105
|
exact("GET", "/api/index"),
|
|
96
106
|
exact("GET", "/api/board"),
|
|
@@ -105,6 +115,11 @@ const UI_ONLY_MATCHERS = [
|
|
|
105
115
|
exact("GET", "/api/system/logs"),
|
|
106
116
|
under("/api/support/"),
|
|
107
117
|
under("/api/tunnel/"),
|
|
118
|
+
// The Releases page owns the cut and its AI draft (#0605, #1126). The CLI's
|
|
119
|
+
// `repoos release` only previews the release email: an auto-publish promise
|
|
120
|
+
// is bound to a live server-side draft run and is cancellable from the page,
|
|
121
|
+
// so exposing it as an HTTP-only UI action is deliberate rather than a
|
|
122
|
+
// missing command.
|
|
108
123
|
under("/api/release"),
|
|
109
124
|
under("/api/deployments"),
|
|
110
125
|
under("/api/chat"),
|
package/dist/cli/help.js
CHANGED
|
@@ -232,6 +232,12 @@ const GROUPS = [
|
|
|
232
232
|
desc: "List running agents, or pause/resume an allowlist agent or model without removing it",
|
|
233
233
|
flags: "--model · --until · --reason · --json · --port",
|
|
234
234
|
},
|
|
235
|
+
{
|
|
236
|
+
name: "allowlist",
|
|
237
|
+
usage: 'allowlist [show] · allowlist pause|resume <cli> [model] [--until <date>] [--reason "..."] [--no-propagate] [--json]',
|
|
238
|
+
desc: "Show the budget allowlist group, or pause/resume an entry and propagate it to every group member",
|
|
239
|
+
flags: "--until · --reason · --no-propagate · --json · --port",
|
|
240
|
+
},
|
|
235
241
|
{
|
|
236
242
|
name: "stats",
|
|
237
243
|
usage: "stats [--json] [--port N]",
|
package/dist/cli/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import { cmdCertify } from "../commands/certify.js";
|
|
|
29
29
|
import { cmdSupport } from "../commands/support.js";
|
|
30
30
|
import { cmdService } from "../commands/service.js";
|
|
31
31
|
import { cmdServers } from "../commands/servers.js";
|
|
32
|
-
import { cmdAgentsRunning, cmdConfig, cmdDone, cmdLandable, cmdHandoffStatus, cmdSummary, cmdMessage, cmdSendBack, cmdOverride, cmdPause, cmdPreview, cmdDev, cmdReview, cmdVerify, cmdRunners, cmdStart, cmdSync, cmdStats, cmdDecisions, cmdApi, cmdIntegration, cmdAttention, cmdHold, cmdUnhold, } from "../commands/control-api.js";
|
|
32
|
+
import { cmdAgentsRunning, cmdAllowlist, cmdConfig, cmdDone, cmdLandable, cmdHandoffStatus, cmdSummary, cmdMessage, cmdSendBack, cmdOverride, cmdPause, cmdPreview, cmdDev, cmdReview, cmdVerify, cmdRunners, cmdStart, cmdSync, cmdStats, cmdDecisions, cmdApi, cmdIntegration, cmdAttention, cmdHold, cmdUnhold, } from "../commands/control-api.js";
|
|
33
33
|
import { cmdWatch } from "../commands/watch.js";
|
|
34
34
|
import { cmdDriver } from "../commands/driver.js";
|
|
35
35
|
import { cmdBundle } from "../commands/bundle.js";
|
|
@@ -394,6 +394,12 @@ function main() {
|
|
|
394
394
|
process.exitCode = code;
|
|
395
395
|
});
|
|
396
396
|
break;
|
|
397
|
+
case "allowlist":
|
|
398
|
+
void cmdAllowlist(rest).then((code) => {
|
|
399
|
+
if (code !== 0)
|
|
400
|
+
process.exitCode = code;
|
|
401
|
+
});
|
|
402
|
+
break;
|
|
397
403
|
case "stats":
|
|
398
404
|
void cmdStats(rest).then((code) => {
|
|
399
405
|
if (code !== 0)
|
|
@@ -64,6 +64,8 @@ export declare function cmdDev(args: string[]): Promise<number>;
|
|
|
64
64
|
export declare function cmdConfig(args: string[]): Promise<number>;
|
|
65
65
|
export declare function cmdRunners(args: string[]): Promise<number>;
|
|
66
66
|
export declare function cmdAgentsRunning(args: string[]): Promise<number>;
|
|
67
|
+
/** `repoos allowlist …` (#1132). */
|
|
68
|
+
export declare function cmdAllowlist(args: string[]): Promise<number>;
|
|
67
69
|
export declare function cmdDecisions(args: string[]): Promise<number>;
|
|
68
70
|
export declare function cmdStats(args: string[]): Promise<number>;
|
|
69
71
|
interface StatsTopProcess {
|
|
@@ -8,6 +8,9 @@ import { effectiveEngineerFromApi } from "../cli/effective-from-api.js";
|
|
|
8
8
|
import { HANDOFF_DEADLINE_MS } from "../server/handoff.js";
|
|
9
9
|
import { fmtDuration } from "./driver.js";
|
|
10
10
|
import { agentModelAllowRows, pauseAllowlistEntry, resumeAllowlistEntry, pairPauseInfo, } from "../core/budget-allowlist.js";
|
|
11
|
+
import { findRepoRoot, loadConfig } from "../core/config.js";
|
|
12
|
+
import { isNewerGroup, normalizeAllowlistGroupPayload, readAllowlistGroup, writeAllowlistGroup, } from "../core/allowlist-groups.js";
|
|
13
|
+
import { detectAgents } from "../core/detect.js";
|
|
11
14
|
import { effectiveSummaryJobStatus } from "../core/task-summary.js";
|
|
12
15
|
function parseCommonFlags(args) {
|
|
13
16
|
const opts = { json: false, wait: false, now: false };
|
|
@@ -1423,22 +1426,299 @@ async function cmdAgentsPauseResume(mode, args) {
|
|
|
1423
1426
|
const api = new RepoOsApi({ port: opts.port });
|
|
1424
1427
|
try {
|
|
1425
1428
|
await ensureServer(api);
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1429
|
+
// A grouped project shares pause state with its group, so `agents pause`
|
|
1430
|
+
// and `allowlist pause` must not diverge (#1132).
|
|
1431
|
+
return await runAllowlistPauseResume(api, mode, {
|
|
1432
|
+
cli: agent,
|
|
1433
|
+
model,
|
|
1434
|
+
until,
|
|
1435
|
+
reason,
|
|
1436
|
+
json: opts.json,
|
|
1437
|
+
});
|
|
1438
|
+
}
|
|
1439
|
+
catch (e) {
|
|
1440
|
+
printErr(e.message);
|
|
1441
|
+
return 1;
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
// ── Allowlist groups (#1132) ────────────────────────────────────────────────
|
|
1445
|
+
const ALLOWLIST_USAGE = 'Usage: repoos allowlist pause|resume <cli> [model] [--until <date>] [--reason "..."] [--no-propagate] [--json]';
|
|
1446
|
+
function printGroupResults(results) {
|
|
1447
|
+
for (const result of results) {
|
|
1448
|
+
const where = result.local
|
|
1449
|
+
? `${result.projectName ?? "this project"} (this machine)`
|
|
1450
|
+
: `${result.projectName ?? "RepoOS"} on ${result.host ?? "?"}`;
|
|
1451
|
+
const status = result.status ?? "applied";
|
|
1452
|
+
const mark = status === "applied" ? c.green("✓") : status === "unreachable" ? c.yellow("·") : c.red("✗");
|
|
1453
|
+
const detail = result.reason ? c.dim(` — ${result.reason}`) : "";
|
|
1454
|
+
console.log(` ${mark} ${where}: ${status}${detail}`);
|
|
1455
|
+
if (result.notLoggedIn?.length) {
|
|
1456
|
+
console.log(c.dim(` not logged in on that host: ${result.notLoggedIn.join(", ")} (logins are never synced)`));
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
/**
|
|
1461
|
+
* Pause/resume one allowlist entry. A grouped project updates the group (and
|
|
1462
|
+
* the server propagates to every member); a project without a group keeps the
|
|
1463
|
+
* exact `PATCH /api/config` behaviour it had before #1132.
|
|
1464
|
+
*/
|
|
1465
|
+
async function runAllowlistPauseResume(api, mode, target) {
|
|
1466
|
+
const configData = await api.requestOk("GET", "/api/config");
|
|
1467
|
+
const cfg = configData.config;
|
|
1468
|
+
const group = typeof cfg?.["budget.allowlistGroup"] === "string" ? cfg["budget.allowlistGroup"].trim() : "";
|
|
1469
|
+
const label = target.model ? `${target.cli} + ${target.model}` : `${target.cli} (all models)`;
|
|
1470
|
+
let projectRows = agentModelAllowRows(cfg?.["budget.allowlist"]);
|
|
1471
|
+
if (group) {
|
|
1472
|
+
const state = (await api.requestOk("GET", "/api/budget/allowlist-group?members=0"));
|
|
1473
|
+
projectRows = agentModelAllowRows(state.projectRows);
|
|
1474
|
+
// No group file yet means the first pause seeds the group from this
|
|
1475
|
+
// project's rows, so it still belongs to the group. Only a local-only CLI
|
|
1476
|
+
// in an existing group falls back to the project's committed rows.
|
|
1477
|
+
const inGroup = !state.group || state.group.allowlist?.some((row) => row.cli === target.cli) === true;
|
|
1478
|
+
if (!inGroup) {
|
|
1479
|
+
// A local-only entry is not group state; pause it in this repo's own rows.
|
|
1480
|
+
const localResult = mode === "pause"
|
|
1481
|
+
? pauseAllowlistEntry(projectRows, {
|
|
1482
|
+
cli: target.cli,
|
|
1483
|
+
model: target.model,
|
|
1484
|
+
until: target.until,
|
|
1485
|
+
reason: target.reason,
|
|
1486
|
+
})
|
|
1487
|
+
: resumeAllowlistEntry(projectRows, { cli: target.cli, model: target.model });
|
|
1488
|
+
if ("error" in localResult) {
|
|
1489
|
+
printErr(localResult.error);
|
|
1490
|
+
return 1;
|
|
1491
|
+
}
|
|
1492
|
+
await api.requestOk("PATCH", "/api/config", { "budget.allowlist": localResult.rows });
|
|
1493
|
+
if (target.json) {
|
|
1494
|
+
printJson({
|
|
1495
|
+
ok: true,
|
|
1496
|
+
action: mode,
|
|
1497
|
+
agent: target.cli,
|
|
1498
|
+
model: target.model ?? null,
|
|
1499
|
+
rows: localResult.rows,
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1502
|
+
else {
|
|
1503
|
+
console.log(c.green(" ✓ ") +
|
|
1504
|
+
c.dim(`${mode === "pause" ? "paused" : "resumed"} ${label} in this project only`));
|
|
1505
|
+
}
|
|
1506
|
+
return 0;
|
|
1507
|
+
}
|
|
1508
|
+
const body = {
|
|
1509
|
+
action: mode,
|
|
1510
|
+
cli: target.cli,
|
|
1511
|
+
...(target.model ? { model: target.model } : {}),
|
|
1512
|
+
...(mode === "pause" && target.until ? { until: target.until } : {}),
|
|
1513
|
+
...(target.reason ? { reason: target.reason } : {}),
|
|
1514
|
+
...(target.noPropagate ? { propagate: false } : {}),
|
|
1515
|
+
};
|
|
1516
|
+
const data = (await api.requestOk("POST", "/api/budget/allowlist-group/pause", body));
|
|
1517
|
+
if (target.json) {
|
|
1518
|
+
printJson({ ok: true, action: mode, group, target: label, ...data });
|
|
1519
|
+
return 0;
|
|
1520
|
+
}
|
|
1521
|
+
console.log(c.green(" ✓ ") +
|
|
1522
|
+
c.dim(`${mode === "pause" ? "paused" : "resumed"} ${label} in allowlist group "${group}"`));
|
|
1523
|
+
printGroupResults(data.results ?? []);
|
|
1524
|
+
return 0;
|
|
1525
|
+
}
|
|
1526
|
+
const rows = agentModelAllowRows(cfg?.["budget.allowlist"]);
|
|
1527
|
+
const result = mode === "pause"
|
|
1528
|
+
? pauseAllowlistEntry(rows, {
|
|
1529
|
+
cli: target.cli,
|
|
1530
|
+
model: target.model,
|
|
1531
|
+
until: target.until,
|
|
1532
|
+
reason: target.reason,
|
|
1533
|
+
})
|
|
1534
|
+
: resumeAllowlistEntry(rows, { cli: target.cli, model: target.model });
|
|
1535
|
+
if ("error" in result) {
|
|
1536
|
+
printErr(result.error);
|
|
1537
|
+
return 1;
|
|
1538
|
+
}
|
|
1539
|
+
await api.requestOk("PATCH", "/api/config", { "budget.allowlist": result.rows });
|
|
1540
|
+
if (target.json) {
|
|
1541
|
+
printJson({
|
|
1542
|
+
ok: true,
|
|
1543
|
+
action: mode,
|
|
1544
|
+
agent: target.cli,
|
|
1545
|
+
model: target.model ?? null,
|
|
1546
|
+
rows: result.rows,
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
else {
|
|
1550
|
+
console.log(c.green(" ✓ ") + c.dim(`${mode === "pause" ? "paused" : "resumed"} ${label}`));
|
|
1551
|
+
}
|
|
1552
|
+
return 0;
|
|
1553
|
+
}
|
|
1554
|
+
/** `repoos allowlist group apply` — the receiver a tailnet peer's SSH runs. */
|
|
1555
|
+
async function cmdAllowlistGroupApply(args) {
|
|
1556
|
+
let payloadBase64 = "";
|
|
1557
|
+
let checkLogins = false;
|
|
1558
|
+
for (let i = 0; i < args.length; i++) {
|
|
1559
|
+
const a = args[i];
|
|
1560
|
+
if (a === "--payload-base64")
|
|
1561
|
+
payloadBase64 = args[++i] ?? "";
|
|
1562
|
+
else if (a === "--check-logins")
|
|
1563
|
+
checkLogins = true;
|
|
1564
|
+
else if (a === "--json") {
|
|
1565
|
+
/* JSON is the only receiver output format */
|
|
1566
|
+
}
|
|
1567
|
+
else if (a === "--help" || a === "-h") {
|
|
1568
|
+
console.log(c.cyan("Usage:") +
|
|
1569
|
+
" repoos allowlist group apply --payload-base64 <b64> [--check-logins] [--json]");
|
|
1570
|
+
return 0;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
const refuse = (reason) => {
|
|
1574
|
+
printJson({ ok: true, applied: false, status: "refused", reason });
|
|
1575
|
+
return 0;
|
|
1576
|
+
};
|
|
1577
|
+
if (!payloadBase64.trim())
|
|
1578
|
+
return refuse("missing --payload-base64");
|
|
1579
|
+
let parsedPayload;
|
|
1580
|
+
try {
|
|
1581
|
+
parsedPayload = JSON.parse(Buffer.from(payloadBase64.trim(), "base64").toString("utf8"));
|
|
1582
|
+
}
|
|
1583
|
+
catch {
|
|
1584
|
+
return refuse("payload is not base64-encoded JSON");
|
|
1585
|
+
}
|
|
1586
|
+
let root;
|
|
1587
|
+
try {
|
|
1588
|
+
root = findRepoRoot();
|
|
1589
|
+
}
|
|
1590
|
+
catch {
|
|
1591
|
+
return refuse("run this from a RepoOS project checkout");
|
|
1592
|
+
}
|
|
1593
|
+
let config;
|
|
1594
|
+
try {
|
|
1595
|
+
config = loadConfig(root);
|
|
1596
|
+
}
|
|
1597
|
+
catch (error) {
|
|
1598
|
+
return refuse(`could not read this project's config: ${error.message}`);
|
|
1599
|
+
}
|
|
1600
|
+
const localName = config.budget?.allowlistGroup;
|
|
1601
|
+
if (!localName)
|
|
1602
|
+
return refuse("this project is not in an allowlist group");
|
|
1603
|
+
const incoming = normalizeAllowlistGroupPayload(parsedPayload, localName);
|
|
1604
|
+
if (typeof incoming === "string")
|
|
1605
|
+
return refuse(incoming);
|
|
1606
|
+
const current = readAllowlistGroup(incoming.name);
|
|
1607
|
+
if (current === "invalid")
|
|
1608
|
+
return refuse(`local allowlist group "${incoming.name}" is unreadable`);
|
|
1609
|
+
if (!isNewerGroup(incoming, current)) {
|
|
1610
|
+
return refuse("this host already has a newer allowlist-group state");
|
|
1611
|
+
}
|
|
1612
|
+
writeAllowlistGroup(incoming);
|
|
1613
|
+
let notLoggedIn;
|
|
1614
|
+
if (checkLogins && incoming.allowlist.length) {
|
|
1615
|
+
const wanted = new Set(incoming.allowlist.map((row) => row.cli));
|
|
1616
|
+
try {
|
|
1617
|
+
const detected = await detectAgents({ probeAuth: true, versionTimeoutMs: 1200 });
|
|
1618
|
+
notLoggedIn = detected
|
|
1619
|
+
.filter((agent) => agent.cli && wanted.has(agent.cli) && agent.auth === false)
|
|
1620
|
+
.map((agent) => agent.cli);
|
|
1434
1621
|
}
|
|
1435
|
-
|
|
1622
|
+
catch {
|
|
1623
|
+
notLoggedIn = undefined;
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
printJson({
|
|
1627
|
+
ok: true,
|
|
1628
|
+
applied: true,
|
|
1629
|
+
status: "applied",
|
|
1630
|
+
name: incoming.name,
|
|
1631
|
+
updatedAt: incoming.updatedAt,
|
|
1632
|
+
...(notLoggedIn?.length ? { notLoggedIn } : {}),
|
|
1633
|
+
});
|
|
1634
|
+
return 0;
|
|
1635
|
+
}
|
|
1636
|
+
/** `repoos allowlist …` (#1132). */
|
|
1637
|
+
export async function cmdAllowlist(args) {
|
|
1638
|
+
if (args.includes("--help") || args.includes("-h") || args.length === 0) {
|
|
1639
|
+
console.log(c.cyan("Usage:") + ` ${ALLOWLIST_USAGE}`);
|
|
1640
|
+
console.log(c.cyan(" ") + " repoos allowlist [show] [--json]");
|
|
1641
|
+
console.log(c.cyan(" ") + " repoos allowlist group show|apply …");
|
|
1642
|
+
return 0;
|
|
1643
|
+
}
|
|
1644
|
+
if (args[0] === "group") {
|
|
1645
|
+
if (args[1] === "apply")
|
|
1646
|
+
return cmdAllowlistGroupApply(args.slice(2));
|
|
1647
|
+
// `group show` is the same view as plain `show`.
|
|
1648
|
+
args = ["show", ...args.slice(2)];
|
|
1649
|
+
}
|
|
1650
|
+
const { rest, opts, error } = parseCommonFlags(args);
|
|
1651
|
+
if (error) {
|
|
1652
|
+
printErr(error);
|
|
1653
|
+
return 1;
|
|
1654
|
+
}
|
|
1655
|
+
const mode = rest[0] === "pause" || rest[0] === "resume" ? rest[0] : null;
|
|
1656
|
+
const api = new RepoOsApi({ port: opts.port });
|
|
1657
|
+
try {
|
|
1658
|
+
await ensureServer(api);
|
|
1659
|
+
if (mode) {
|
|
1660
|
+
let model;
|
|
1661
|
+
let cli = "";
|
|
1662
|
+
const words = [];
|
|
1663
|
+
for (let i = 1; i < rest.length; i++) {
|
|
1664
|
+
const a = rest[i];
|
|
1665
|
+
if (a === "--model")
|
|
1666
|
+
model = rest[++i];
|
|
1667
|
+
else if (!a.startsWith("-"))
|
|
1668
|
+
words.push(a);
|
|
1669
|
+
}
|
|
1670
|
+
if (words.length)
|
|
1671
|
+
cli = words[0];
|
|
1672
|
+
if (!model && words.length > 1)
|
|
1673
|
+
model = words.slice(1).join(" ");
|
|
1674
|
+
if (mode === "resume" && opts.until) {
|
|
1675
|
+
printErr("--until is only meaningful with `pause`");
|
|
1676
|
+
return 1;
|
|
1677
|
+
}
|
|
1678
|
+
if (!cli) {
|
|
1679
|
+
printErr(ALLOWLIST_USAGE);
|
|
1680
|
+
return 1;
|
|
1681
|
+
}
|
|
1682
|
+
return await runAllowlistPauseResume(api, mode, {
|
|
1683
|
+
cli,
|
|
1684
|
+
model,
|
|
1685
|
+
until: opts.until,
|
|
1686
|
+
reason: opts.reason,
|
|
1687
|
+
json: opts.json,
|
|
1688
|
+
noPropagate: rest.includes("--no-propagate"),
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
// show
|
|
1692
|
+
const state = await api.requestOk("GET", "/api/budget/allowlist-group");
|
|
1436
1693
|
if (opts.json) {
|
|
1437
|
-
printJson(
|
|
1694
|
+
printJson(state);
|
|
1695
|
+
return 0;
|
|
1438
1696
|
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
console.log(c.
|
|
1697
|
+
const s = state;
|
|
1698
|
+
if (!s.enabled) {
|
|
1699
|
+
console.log(c.dim(" This project is not in an allowlist group (project-only allowlist)."));
|
|
1700
|
+
return 0;
|
|
1701
|
+
}
|
|
1702
|
+
console.log(c.cyan(` Group "${s.name}"`) +
|
|
1703
|
+
(s.group?.updatedAt
|
|
1704
|
+
? c.dim(` · updated ${s.group.updatedAt}`)
|
|
1705
|
+
: c.dim(" · not created yet")));
|
|
1706
|
+
for (const row of s.group?.allowlist ?? []) {
|
|
1707
|
+
const source = s.sources?.[row.cli] ?? "group";
|
|
1708
|
+
console.log(` ${c.bold(row.cli)} · ${row.models.join(", ")} ${c.dim(`(${source})`)}`);
|
|
1709
|
+
}
|
|
1710
|
+
for (const projectRow of s.projectRows ?? []) {
|
|
1711
|
+
if (s.sources?.[projectRow.cli] !== "project")
|
|
1712
|
+
continue;
|
|
1713
|
+
if ((s.group?.allowlist ?? []).some((row) => row.cli === projectRow.cli))
|
|
1714
|
+
continue;
|
|
1715
|
+
console.log(` ${c.bold(projectRow.cli)} ${c.dim("(project only)")}`);
|
|
1716
|
+
}
|
|
1717
|
+
for (const entry of s.drift ?? [])
|
|
1718
|
+
console.log(c.yellow(` drift: ${entry.detail}`));
|
|
1719
|
+
if (s.members?.length) {
|
|
1720
|
+
console.log(c.dim(" Members:"));
|
|
1721
|
+
printGroupResults(s.members);
|
|
1442
1722
|
}
|
|
1443
1723
|
return 0;
|
|
1444
1724
|
}
|
|
@@ -1,31 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { collectTailnetServers } from "../core/tailnet-servers.js";
|
|
2
|
+
export { collectTailnetServers, parseTailnetPeers, remoteFailureReason, remoteShellCommand, remoteShellScript, serversSshArgs, shellQuote, } from "../core/tailnet-servers.js";
|
|
3
|
+
export type { ListedServer, RemoteExec } from "../core/tailnet-servers.js";
|
|
4
|
+
/** Human-readable fallback line when the local Tailscale status is unavailable. */
|
|
5
|
+
export declare function tailnetFallbackNotice(configuredHosts: string[]): string;
|
|
6
|
+
export interface ServersCommandDeps {
|
|
7
|
+
/** Test seam: resolve config from this root instead of the current repo. */
|
|
6
8
|
root?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
uptimeSeconds?: number | null;
|
|
10
|
-
activeEngineers?: number;
|
|
11
|
-
staleReason?: string | null;
|
|
12
|
-
unreachable?: boolean;
|
|
13
|
-
reason?: string;
|
|
14
|
-
[key: string]: unknown;
|
|
9
|
+
/** Test seam: replace tailnet collection (the CLI path has no network seam). */
|
|
10
|
+
collect?: typeof collectTailnetServers;
|
|
15
11
|
}
|
|
16
|
-
export declare function
|
|
17
|
-
type RemoteExec = (host: string, user: string, timeoutMs: number) => Promise<string>;
|
|
18
|
-
export declare function serversSshArgs(host: string, user: string, timeoutMs: number): string[];
|
|
19
|
-
export declare function collectTailnetServers(local: ListedServer[], options?: {
|
|
20
|
-
tailscaleStatus?: () => Promise<string>;
|
|
21
|
-
configuredHosts?: string[];
|
|
22
|
-
remoteHosts?: RemoteValidationHost[];
|
|
23
|
-
remoteValidation?: RemoteValidationConfig;
|
|
24
|
-
remoteExec?: RemoteExec;
|
|
25
|
-
timeoutMs?: number;
|
|
26
|
-
}): Promise<{
|
|
27
|
-
servers: ListedServer[];
|
|
28
|
-
tailscaleUnavailable: boolean;
|
|
29
|
-
}>;
|
|
30
|
-
export declare function cmdServers(argv: string[]): Promise<void>;
|
|
31
|
-
export {};
|
|
12
|
+
export declare function cmdServers(argv: string[], deps?: ServersCommandDeps): Promise<void>;
|
package/dist/commands/servers.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/** `repoos servers` — list registered RepoOS control-plane processes. */
|
|
2
|
-
import { execFile } from "node:child_process";
|
|
3
|
-
import { promisify } from "node:util";
|
|
4
2
|
import { findRepoRoot, loadConfig } from "../core/config.js";
|
|
5
|
-
import {
|
|
3
|
+
import { resolveRemoteHosts } from "../core/remote-hosts.js";
|
|
6
4
|
import { listValidatedServerRegistry, pruneStaleServerRegistryEntries, } from "../core/server-registry.js";
|
|
5
|
+
import { collectTailnetServers } from "../core/tailnet-servers.js";
|
|
7
6
|
import { c } from "../cli/colors.js";
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
// Re-exported for callers (and tests) that used to import these from the CLI
|
|
8
|
+
// command before tailnet discovery moved into `src/core/tailnet-servers.ts` so
|
|
9
|
+
// the server endpoint can share it.
|
|
10
|
+
export { collectTailnetServers, parseTailnetPeers, remoteFailureReason, remoteShellCommand, remoteShellScript, serversSshArgs, shellQuote, } from "../core/tailnet-servers.js";
|
|
10
11
|
function localJsonRow(row) {
|
|
11
12
|
return {
|
|
12
13
|
port: row.entry.port,
|
|
@@ -18,6 +19,7 @@ function localJsonRow(row) {
|
|
|
18
19
|
startedAt: row.entry.startedAt,
|
|
19
20
|
activeEngineers: row.entry.activeEngineers ?? 0,
|
|
20
21
|
engineersUpdatedAt: row.entry.engineersUpdatedAt ?? null,
|
|
22
|
+
allowlistGroup: row.entry.allowlistGroup,
|
|
21
23
|
uptimeSeconds: row.uptimeSeconds,
|
|
22
24
|
valid: row.valid,
|
|
23
25
|
staleReason: row.staleReason,
|
|
@@ -40,78 +42,6 @@ function printLocalRow(row) {
|
|
|
40
42
|
console.log(` ${c.cyan(String(e.port).padStart(5))} ${status} ${c.bold(e.projectName)} ${c.dim(`pid ${e.pid}`)} ${c.dim(formatUptime(row.uptimeSeconds))}${engineers}`);
|
|
41
43
|
console.log(` ${c.dim(e.root)}`);
|
|
42
44
|
}
|
|
43
|
-
export function parseTailnetPeers(json) {
|
|
44
|
-
const status = JSON.parse(json);
|
|
45
|
-
const self = (status.Self?.HostName ?? status.Self?.DNSName ?? "")
|
|
46
|
-
.replace(/\.$/, "")
|
|
47
|
-
.split(".")[0];
|
|
48
|
-
return [
|
|
49
|
-
...new Set(Object.values(status.Peer ?? {})
|
|
50
|
-
.filter((peer) => peer.Online !== false)
|
|
51
|
-
.map((peer) => (peer.HostName ?? peer.DNSName ?? "").replace(/\.$/, "").split(".")[0])
|
|
52
|
-
.filter((host) => host && host !== self)),
|
|
53
|
-
];
|
|
54
|
-
}
|
|
55
|
-
export function serversSshArgs(host, user, timeoutMs) {
|
|
56
|
-
return [
|
|
57
|
-
"-o",
|
|
58
|
-
"BatchMode=yes",
|
|
59
|
-
"-o",
|
|
60
|
-
`ConnectTimeout=${Math.ceil(timeoutMs / 1000)}`,
|
|
61
|
-
`${user}@${host}`,
|
|
62
|
-
"repoos servers --json",
|
|
63
|
-
];
|
|
64
|
-
}
|
|
65
|
-
const defaultRemoteExec = async (host, user, timeoutMs) => {
|
|
66
|
-
const { stdout } = await execFileAsync("ssh", serversSshArgs(host, user, timeoutMs), {
|
|
67
|
-
timeout: timeoutMs,
|
|
68
|
-
maxBuffer: 2 * 1024 * 1024,
|
|
69
|
-
});
|
|
70
|
-
return stdout.toString();
|
|
71
|
-
};
|
|
72
|
-
export async function collectTailnetServers(local, options = {}) {
|
|
73
|
-
let peers = [];
|
|
74
|
-
let tailscaleUnavailable = false;
|
|
75
|
-
try {
|
|
76
|
-
peers = parseTailnetPeers(await (options.tailscaleStatus ??
|
|
77
|
-
(async () => {
|
|
78
|
-
const { stdout } = await execFileAsync("tailscale", ["status", "--json"], {
|
|
79
|
-
timeout: 2_000,
|
|
80
|
-
maxBuffer: 2 * 1024 * 1024,
|
|
81
|
-
});
|
|
82
|
-
return stdout.toString();
|
|
83
|
-
}))());
|
|
84
|
-
}
|
|
85
|
-
catch {
|
|
86
|
-
tailscaleUnavailable = true;
|
|
87
|
-
peers = options.configuredHosts ?? [];
|
|
88
|
-
}
|
|
89
|
-
const remoteExec = options.remoteExec ?? defaultRemoteExec;
|
|
90
|
-
const configuredByHost = new Map((options.remoteHosts ?? []).map((host) => [host.host, host]));
|
|
91
|
-
const remotes = await Promise.all(peers.map(async (host) => {
|
|
92
|
-
try {
|
|
93
|
-
const hostConfig = configuredByHost.get(host) ?? { host };
|
|
94
|
-
const user = options.remoteValidation
|
|
95
|
-
? remoteHostUser(options.remoteValidation, hostConfig)
|
|
96
|
-
: hostConfig.user?.trim() || "root";
|
|
97
|
-
const payload = JSON.parse(await remoteExec(host, user, options.timeoutMs ?? HOST_TIMEOUT_MS));
|
|
98
|
-
if (!Array.isArray(payload.servers))
|
|
99
|
-
throw new Error("remote response has no servers list");
|
|
100
|
-
return payload.servers.map((server) => ({ ...server, host }));
|
|
101
|
-
}
|
|
102
|
-
catch (error) {
|
|
103
|
-
const reason = error instanceof Error ? error.message : String(error);
|
|
104
|
-
return [
|
|
105
|
-
{
|
|
106
|
-
host,
|
|
107
|
-
unreachable: true,
|
|
108
|
-
reason: /timed? ?out|timeout/i.test(reason) ? "timed out" : reason,
|
|
109
|
-
},
|
|
110
|
-
];
|
|
111
|
-
}
|
|
112
|
-
}));
|
|
113
|
-
return { servers: [...local, ...remotes.flat()], tailscaleUnavailable };
|
|
114
|
-
}
|
|
115
45
|
function formatUptime(seconds) {
|
|
116
46
|
if (seconds == null)
|
|
117
47
|
return "—";
|
|
@@ -122,7 +52,13 @@ function formatUptime(seconds) {
|
|
|
122
52
|
return `${m}m ${s}s`;
|
|
123
53
|
return `${Math.floor(m / 60)}h ${m % 60}m`;
|
|
124
54
|
}
|
|
125
|
-
|
|
55
|
+
/** Human-readable fallback line when the local Tailscale status is unavailable. */
|
|
56
|
+
export function tailnetFallbackNotice(configuredHosts) {
|
|
57
|
+
return configuredHosts.length
|
|
58
|
+
? ` Tailscale peer discovery unavailable; using configured hosts (${configuredHosts.join(", ")}) instead of the tailnet peer list.`
|
|
59
|
+
: " Tailscale peer discovery unavailable and no remoteValidation.tailscaleHosts configured; showing local servers only.";
|
|
60
|
+
}
|
|
61
|
+
export async function cmdServers(argv, deps = {}) {
|
|
126
62
|
const json = argv.includes("--json");
|
|
127
63
|
const prune = argv.includes("--prune");
|
|
128
64
|
const tailscale = argv.includes("--tailscale");
|
|
@@ -144,32 +80,35 @@ export async function cmdServers(argv) {
|
|
|
144
80
|
startedAt: row.entry.startedAt,
|
|
145
81
|
activeEngineers: row.entry.activeEngineers ?? 0,
|
|
146
82
|
engineersUpdatedAt: row.entry.engineersUpdatedAt ?? null,
|
|
83
|
+
allowlistGroup: row.entry.allowlistGroup,
|
|
147
84
|
uptimeSeconds: row.uptimeSeconds,
|
|
148
85
|
valid: row.valid,
|
|
149
86
|
staleReason: row.staleReason,
|
|
150
87
|
healthRoot: row.healthRoot,
|
|
151
88
|
}));
|
|
152
|
-
const cfg = tailscale ? loadConfig(findRepoRoot()) : undefined;
|
|
89
|
+
const cfg = tailscale ? loadConfig(deps.root ?? findRepoRoot()) : undefined;
|
|
153
90
|
const remoteHosts = resolveRemoteHosts(cfg?.remoteValidation);
|
|
154
91
|
const result = tailscale
|
|
155
|
-
? await collectTailnetServers(local, {
|
|
92
|
+
? await (deps.collect ?? collectTailnetServers)(local, {
|
|
156
93
|
configuredHosts: remoteHosts.map((host) => host.host),
|
|
157
94
|
remoteHosts,
|
|
158
95
|
remoteValidation: cfg?.remoteValidation,
|
|
159
96
|
})
|
|
160
|
-
: { servers: local, tailscaleUnavailable: false };
|
|
97
|
+
: { servers: local, tailscaleUnavailable: false, source: "tailscale" };
|
|
161
98
|
if (json) {
|
|
162
99
|
console.log(JSON.stringify({
|
|
163
100
|
servers: tailscale ? result.servers : localRows.map(localJsonRow),
|
|
164
101
|
...(pruned !== undefined ? { pruned } : {}),
|
|
165
102
|
...(result.tailscaleUnavailable ? { tailscaleUnavailable: true } : {}),
|
|
103
|
+
...(tailscale && result.source ? { discoverySource: result.source } : {}),
|
|
166
104
|
}, null, 2));
|
|
167
105
|
return;
|
|
168
106
|
}
|
|
169
107
|
if (pruned)
|
|
170
108
|
console.log(c.dim(` Pruned ${pruned} stale local registry entr${pruned === 1 ? "y" : "ies"}.`));
|
|
171
|
-
if (result.tailscaleUnavailable)
|
|
172
|
-
console.log(c.yellow(
|
|
109
|
+
if (result.tailscaleUnavailable) {
|
|
110
|
+
console.log(c.yellow(tailnetFallbackNotice(remoteHosts.map((host) => host.host))));
|
|
111
|
+
}
|
|
173
112
|
if (!tailscale && !prune && pruned === undefined) {
|
|
174
113
|
if (localRows.length === 0) {
|
|
175
114
|
console.log(c.dim(" No registered RepoOS servers."));
|
|
@@ -192,14 +131,15 @@ export async function cmdServers(argv) {
|
|
|
192
131
|
return;
|
|
193
132
|
}
|
|
194
133
|
for (const row of result.servers) {
|
|
134
|
+
const display = row.displayName && row.displayName !== row.host ? ` ${c.dim(`(${row.displayName})`)}` : "";
|
|
195
135
|
if (row.unreachable) {
|
|
196
|
-
console.log(` ${c.cyan(row.host.padEnd(16))} ${c.yellow("unreachable")} ${row.reason ?? "unknown error"}`);
|
|
136
|
+
console.log(` ${c.cyan(row.host.padEnd(16))} ${c.yellow("unreachable")} ${row.reason ?? "unknown error"}${display}`);
|
|
197
137
|
continue;
|
|
198
138
|
}
|
|
199
139
|
const status = row.valid === false
|
|
200
140
|
? c.yellow(row.staleReason ? `stale (${row.staleReason})` : "stale")
|
|
201
141
|
: c.green("ok");
|
|
202
|
-
console.log(` ${c.cyan(row.host.padEnd(16))} ${String(row.port ?? "—").padStart(5)} ${status} ${c.bold(row.projectName ?? "RepoOS")} ${c.dim(formatUptime(row.uptimeSeconds ?? null))}`);
|
|
142
|
+
console.log(` ${c.cyan(row.host.padEnd(16))} ${String(row.port ?? "—").padStart(5)} ${status} ${c.bold(row.projectName ?? "RepoOS")} ${c.dim(formatUptime(row.uptimeSeconds ?? null))}${display}`);
|
|
203
143
|
if (row.root)
|
|
204
144
|
console.log(` ${c.dim(row.root)}`);
|
|
205
145
|
}
|