@repo-os/repoos 0.5.94 → 0.5.96
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 +7 -8
- package/dist/.build-info.json +2 -2
- package/dist/.build-stamp.json +1 -1
- package/dist/cli/help.js +4 -1
- package/dist/commands/servers.d.ts +4 -0
- package/dist/commands/servers.js +34 -3
- package/dist/commands/upgrade.d.ts +5 -0
- package/dist/commands/upgrade.js +49 -13
- package/dist/core/board-columns.test.js +33 -1
- package/dist/core/config.js +14 -0
- package/dist/core/tailnet-servers.d.ts +4 -2
- package/dist/core/tailnet-servers.js +7 -4
- package/dist/core/types.d.ts +1 -0
- package/dist/server/routes/servers.d.ts +2 -0
- package/dist/server/routes/servers.js +34 -3
- package/dist/server/server.js +5 -3
- package/dist/ui/assets/{ChecksView-CRKxZdK-.js → ChecksView-CULwA_TL.js} +0 -0
- package/dist/ui/assets/{ContextView-9lb3fi1E.js → ContextView-DqBHoosr.js} +2 -2
- package/dist/ui/assets/{DashboardView-DML-SwJm.js → DashboardView-BTdy_ySp.js} +1 -1
- package/dist/ui/assets/{DependencyChip-aVw_afXH.js → DependencyChip-C5VNY7gl.js} +1 -1
- package/dist/ui/assets/{DeploymentsView-D0vBCh-_.js → DeploymentsView-BDfarOn-.js} +1 -1
- package/dist/ui/assets/{DevView-Bi3kmS0A.js → DevView-ntdUzHkE.js} +1 -1
- package/dist/ui/assets/{DiffView-C0a9if1_.js → DiffView-Cf2p3rFC.js} +1 -1
- package/dist/ui/assets/{InputsView-dWeoR3QA.js → InputsView-D255PNzL.js} +1 -1
- package/dist/ui/assets/{LoginView-Dasdh16U.js → LoginView-S0jogm1Y.js} +1 -1
- package/dist/ui/assets/{ReleasesView-B_bRXl-7.js → ReleasesView-D6lg-AWs.js} +1 -1
- package/dist/ui/assets/{SecretsView-B-YybI69.js → SecretsView-DOQmVf4V.js} +1 -1
- package/dist/ui/assets/SettingsView-BjHI0gdq.js +4 -0
- package/dist/ui/assets/{StoriesView-DtBQtl2s.js → StoriesView-2kWYWs5P.js} +1 -1
- package/dist/ui/assets/{WorkView-BLjtDVdQ.css → WorkView-Biy6VQn9.css} +1 -1
- package/dist/ui/assets/WorkView-CGtQZOnz.js +2 -0
- package/dist/ui/assets/{abnfDiagram-VCTEODGH-CQOB6sI_.js → abnfDiagram-VCTEODGH-D2A7SHug.js} +1 -1
- package/dist/ui/assets/{architectureDiagram-5GKGNRK7-C738jf7d.js → architectureDiagram-5GKGNRK7-Cou8SIPE.js} +1 -1
- package/dist/ui/assets/{blockDiagram-I7D4REHJ-CtE_8Gcx.js → blockDiagram-I7D4REHJ-SXNhhko2.js} +1 -1
- package/dist/ui/assets/{c4Diagram-7LVT6UL2-2rNQq-eo.js → c4Diagram-7LVT6UL2-B-tpBfOx.js} +1 -1
- package/dist/ui/assets/channel-BEgkbNvj.js +1 -0
- package/dist/ui/assets/{chunk-2E4U76K2-CdEYtHGS.js → chunk-2E4U76K2-lmPqZMXN.js} +1 -1
- package/dist/ui/assets/{chunk-4HAMMTFA-Dgwtte2C.js → chunk-4HAMMTFA-C0tgf_1t.js} +1 -1
- package/dist/ui/assets/{chunk-75Z2AOVW-Dkj5mpou.js → chunk-75Z2AOVW-bSsW-KGE.js} +1 -1
- package/dist/ui/assets/{chunk-CLGD4ZFX-D9cBAa6L.js → chunk-CLGD4ZFX-VoCTMgMr.js} +1 -1
- package/dist/ui/assets/{chunk-DU6HZSFF-CykeLTG_.js → chunk-DU6HZSFF-DIqGroIg.js} +1 -1
- package/dist/ui/assets/{chunk-F27PBJKO-KI6LDcIq.js → chunk-F27PBJKO-DvA7R4Rh.js} +1 -1
- package/dist/ui/assets/{chunk-GMAD6QVW-Zqagj6Sz.js → chunk-GMAD6QVW-DEJGSb2v.js} +1 -1
- package/dist/ui/assets/{chunk-GVQU2GXP-A7tAMXsf.js → chunk-GVQU2GXP-CazbgFu6.js} +1 -1
- package/dist/ui/assets/{chunk-IMKFNOWR-B4pfU8MS.js → chunk-IMKFNOWR-DUtbLTE_.js} +1 -1
- package/dist/ui/assets/{chunk-L3NEJ4N5-D8X0gAhO.js → chunk-L3NEJ4N5-BVAy2-6E.js} +1 -1
- package/dist/ui/assets/{chunk-OSK3NFVY-Dpv1DxEV.js → chunk-OSK3NFVY-DqV-eD0o.js} +1 -1
- package/dist/ui/assets/{chunk-P2QGCYS3-CHH6ioNE.js → chunk-P2QGCYS3-NPQHSWha.js} +1 -1
- package/dist/ui/assets/{chunk-POPQ4Y6H-CDNwt9kk.js → chunk-POPQ4Y6H-Cbc2glFe.js} +1 -1
- package/dist/ui/assets/{chunk-PWAF6VOD-Dn8oH62R.js → chunk-PWAF6VOD-E4hoWYnt.js} +1 -1
- package/dist/ui/assets/{chunk-SHT3W25Y-uEAVqkcf.js → chunk-SHT3W25Y-DbVXy1vA.js} +1 -1
- package/dist/ui/assets/{chunk-SVP7TREG-DyxtOVJR.js → chunk-SVP7TREG-VDz53lWo.js} +1 -1
- package/dist/ui/assets/{chunk-TICWLB2K-CZif683b.js → chunk-TICWLB2K-Dp7_7G3W.js} +1 -1
- package/dist/ui/assets/{chunk-TLUHSLCS-CbuLTxNb.js → chunk-TLUHSLCS-RqBvuYFY.js} +2 -2
- package/dist/ui/assets/classDiagram-ZZMXUADV-Ca2957Wr.js +1 -0
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-Ca2957Wr.js +1 -0
- package/dist/ui/assets/{cynefinDiagram-5FMLGOSQ-C6Udddit.js → cynefinDiagram-5FMLGOSQ-i8WRiMqt.js} +1 -1
- package/dist/ui/assets/{dagre-GXQ25YYZ-DGrhJ1kt.js → dagre-GXQ25YYZ-BJcNLyqh.js} +1 -1
- package/dist/ui/assets/{diagram-S7CK7UJ4-B-f1lv24.js → diagram-S7CK7UJ4-BLliM3ye.js} +1 -1
- package/dist/ui/assets/{diagram-UQ7AKVKN-Bd4CucmI.js → diagram-UQ7AKVKN-Da1Hf0Hg.js} +1 -1
- package/dist/ui/assets/{diagram-VSXAHHWV-DZJJWr7v.js → diagram-VSXAHHWV-RznGP5Tf.js} +1 -1
- package/dist/ui/assets/{diagram-VX7I27RA-DUIcR9D2.js → diagram-VX7I27RA-B8-ud1br.js} +1 -1
- package/dist/ui/assets/{diagram-Z3DM3KII-BzCb6yyG.js → diagram-Z3DM3KII-DATmbaeB.js} +1 -1
- package/dist/ui/assets/{ebnfDiagram-PWID7BFC-Cp89Sb2K.js → ebnfDiagram-PWID7BFC-CUSxehdi.js} +1 -1
- package/dist/ui/assets/{erDiagram-RLTQ6QDP-DP7Zytfe.js → erDiagram-RLTQ6QDP-BYJ4oCZC.js} +1 -1
- package/dist/ui/assets/flowDiagram-HODETNUW-CUAGxYpY.js +1 -0
- package/dist/ui/assets/{ganttDiagram-EL5Y4UJY-VbX7dw12.js → ganttDiagram-EL5Y4UJY-DyqNeerc.js} +1 -1
- package/dist/ui/assets/{gitGraphDiagram-WWUBYQGX-TE4It0GX.js → gitGraphDiagram-WWUBYQGX-CY9iSA1O.js} +1 -1
- package/dist/ui/assets/{index-BCAYWGK7.js → index-BX3Of6Ah.js} +3 -3
- package/dist/ui/assets/{infoDiagram-27XIBGKW-Yy7ko1Z6.js → infoDiagram-27XIBGKW-DMSn1eG4.js} +1 -1
- package/dist/ui/assets/{ishikawaDiagram-5VMMS53U-D3Ep8x_w.js → ishikawaDiagram-5VMMS53U-mRPtZREa.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-3NMN7TZE-CQCChwqq.js → journeyDiagram-3NMN7TZE-S6tmN6FP.js} +1 -1
- package/dist/ui/assets/{kanban-definition-UXKFOSKX-3M6qLTzN.js → kanban-definition-UXKFOSKX-CgjJlpFi.js} +1 -1
- package/dist/ui/assets/{line-D4-qJcIJ.js → line-DwXI6Hdc.js} +1 -1
- package/dist/ui/assets/{mermaid-parser.core-CHGDgAsW.js → mermaid-parser.core-DRyKTzV4.js} +1 -1
- package/dist/ui/assets/{mermaid.core-D_NxnoSe.js → mermaid.core-BPwYCwp1.js} +3 -3
- package/dist/ui/assets/{mindmap-definition-YA3MSWOX-CzaaiuQO.js → mindmap-definition-YA3MSWOX-DX0qTdHQ.js} +1 -1
- package/dist/ui/assets/{pegDiagram-XKGWAZYB-Bewp8CnK.js → pegDiagram-XKGWAZYB-Bj8oYxfJ.js} +1 -1
- package/dist/ui/assets/{pieDiagram-E7YTZNPT-M9IYv9CW.js → pieDiagram-E7YTZNPT-D1pTO3_Q.js} +1 -1
- package/dist/ui/assets/{quadrantDiagram-AXDQQJYC-DjK4H9J5.js → quadrantDiagram-AXDQQJYC-DGHdMJli.js} +1 -1
- package/dist/ui/assets/{railroadDiagram-O6MQD6OU-iN_NP2IN.js → railroadDiagram-O6MQD6OU-qnjLV-GN.js} +1 -1
- package/dist/ui/assets/{requirementDiagram-BXWQKSXE-Cu1IbVKn.js → requirementDiagram-BXWQKSXE-DFUkcL9F.js} +1 -1
- package/dist/ui/assets/{sankeyDiagram-P5KCCOFB-Cb7rg9s3.js → sankeyDiagram-P5KCCOFB-CIeQiPEH.js} +1 -1
- package/dist/ui/assets/{sequenceDiagram-WJ2MYXX4-B1gYuq1k.js → sequenceDiagram-WJ2MYXX4-D0cPk33G.js} +1 -1
- package/dist/ui/assets/{stateDiagram-D77RDMKH-LYtzKCJs.js → stateDiagram-D77RDMKH-b0dqXAMh.js} +1 -1
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-OVe8wPLf.js +1 -0
- package/dist/ui/assets/{swimlanes-42K2YHIH-wURfWaBm.js → swimlanes-42K2YHIH-Bc8GCCgs.js} +1 -1
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-C8DnFsZY.js +8 -0
- package/dist/ui/assets/{timeline-definition-24CTP7MA-B_z7jfBq.js → timeline-definition-24CTP7MA-CigSMiUW.js} +1 -1
- package/dist/ui/assets/{vennDiagram-4TSXK5OY-CicQANat.js → vennDiagram-4TSXK5OY-X3cL2aG1.js} +1 -1
- package/dist/ui/assets/{wardleyDiagram-VM6X3IG4-CzjJV58Y.js → wardleyDiagram-VM6X3IG4-DrkrQT3-.js} +1 -1
- package/dist/ui/assets/{xychartDiagram-S5SC5T6Z-DBcIjaEX.js → xychartDiagram-S5SC5T6Z-rlQw2eQM.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/ui/sw.js +2 -2
- package/package.json +1 -1
- package/dist/ui/assets/SettingsView-BXRHFm7O.js +0 -4
- package/dist/ui/assets/WorkView-BDbHEfHG.js +0 -2
- package/dist/ui/assets/channel-D-e4o1fy.js +0 -1
- package/dist/ui/assets/classDiagram-ZZMXUADV-yMKlPYKF.js +0 -1
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-yMKlPYKF.js +0 -1
- package/dist/ui/assets/flowDiagram-HODETNUW-B6Hl2Zu6.js +0 -1
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-BFwRUbyz.js +0 -1
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-DpBidr-b.js +0 -8
package/README.md
CHANGED
|
@@ -204,7 +204,7 @@ your task files, and serves a JSON API plus a live event stream. It adds no new
|
|
|
204
204
|
business logic — it's a transport layer over the same core the CLI uses.
|
|
205
205
|
|
|
206
206
|
```bash
|
|
207
|
-
repoos serve #
|
|
207
|
+
repoos serve # prints this project's address (or your Tailscale IP, if detected)
|
|
208
208
|
repoos serve --port 8080 # custom port
|
|
209
209
|
repoos serve --host 0.0.0.0 # listen on all interfaces
|
|
210
210
|
repoos serve --quiet # no terminal activity log
|
|
@@ -277,8 +277,8 @@ won't clobber a body edit an agent made a moment earlier.
|
|
|
277
277
|
|
|
278
278
|
## The web UI
|
|
279
279
|
|
|
280
|
-
`repoos serve` also serves a web UI at the root URL
|
|
281
|
-
in a browser. It's a live control plane: a dashboard, the work board, an Agents
|
|
280
|
+
`repoos serve` also serves a web UI at the root URL. Open the address printed
|
|
281
|
+
at startup in a browser; each project has its own stable port. It's a live control plane: a dashboard, the work board, an Agents
|
|
282
282
|
page for configuring and running coding agents, a context-docs viewer with
|
|
283
283
|
skills, and settings. All reading from the API and updating in real time via the
|
|
284
284
|
SSE stream. Edit a task file in your editor (or let an agent edit it) and the
|
|
@@ -326,11 +326,10 @@ The same Hub for your phone, requiring **Android 8.0 (API 26) or newer**. It
|
|
|
326
326
|
keeps the server list on the device and opens each server in an isolated
|
|
327
327
|
WebView, so accounts and cookies never cross between servers.
|
|
328
328
|
|
|
329
|
-
Download the latest [RepoOS Hub APK](https://
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
verification steps are in the [Android Hub guide](https://docs.repoos.org/android-hub).
|
|
329
|
+
Download the latest [RepoOS Hub APK](https://repoos.org/downloads/repoos-hub.apk)
|
|
330
|
+
when one is published. It is not on the Play Store yet, so you sideload the
|
|
331
|
+
APK. Install, update, and certificate verification steps are in the
|
|
332
|
+
[Android Hub guide](https://docs.repoos.org/android-hub).
|
|
334
333
|
|
|
335
334
|
## Roadmap
|
|
336
335
|
|
package/dist/.build-info.json
CHANGED
package/dist/.build-stamp.json
CHANGED
package/dist/cli/help.js
CHANGED
|
@@ -450,7 +450,10 @@ const EXAMPLES = [
|
|
|
450
450
|
{ cmd: "repoos status", comment: "one-screen health snapshot" },
|
|
451
451
|
{ cmd: "repoos status --json", comment: "machine-readable, for agents/tools" },
|
|
452
452
|
{ cmd: "repoos index --json", comment: "machine-readable, for agents/tools" },
|
|
453
|
-
{
|
|
453
|
+
{
|
|
454
|
+
cmd: "repoos serve",
|
|
455
|
+
comment: "live API + SSE at the project-specific address printed at startup",
|
|
456
|
+
},
|
|
454
457
|
];
|
|
455
458
|
/** Command aliases accepted by the dispatcher (`src/cli/index.ts`). */
|
|
456
459
|
const ALIASES = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { collectTailnetServers } from "../core/tailnet-servers.js";
|
|
2
|
+
import { getServiceStatus, listServices } from "../core/service-manager.js";
|
|
2
3
|
export { collectTailnetServers, parseTailnetPeers, remoteFailureReason, remoteShellCommand, remoteShellScript, serversSshArgs, shellQuote, } from "../core/tailnet-servers.js";
|
|
3
4
|
export type { ListedServer, RemoteExec } from "../core/tailnet-servers.js";
|
|
4
5
|
/** Human-readable fallback line when the local Tailscale status is unavailable. */
|
|
@@ -8,5 +9,8 @@ export interface ServersCommandDeps {
|
|
|
8
9
|
root?: string;
|
|
9
10
|
/** Test seam: replace tailnet collection (the CLI path has no network seam). */
|
|
10
11
|
collect?: typeof collectTailnetServers;
|
|
12
|
+
/** Test seams for installed service discovery and live status. */
|
|
13
|
+
listServices?: typeof listServices;
|
|
14
|
+
getServiceStatus?: typeof getServiceStatus;
|
|
11
15
|
}
|
|
12
16
|
export declare function cmdServers(argv: string[], deps?: ServersCommandDeps): Promise<void>;
|
package/dist/commands/servers.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/** `repoos servers` — list registered RepoOS control-plane processes. */
|
|
2
2
|
import { findRepoRoot, loadConfig } from "../core/config.js";
|
|
3
3
|
import { resolveRemoteHosts } from "../core/remote-hosts.js";
|
|
4
|
-
import { listValidatedServerRegistry, pruneStaleServerRegistryEntries, } from "../core/server-registry.js";
|
|
4
|
+
import { listValidatedServerRegistry, pruneStaleServerRegistryEntries, canonicalRegistryRoot, } from "../core/server-registry.js";
|
|
5
5
|
import { collectTailnetServers } from "../core/tailnet-servers.js";
|
|
6
6
|
import { c } from "../cli/colors.js";
|
|
7
|
+
import { existsSync } from "node:fs";
|
|
8
|
+
import { getServiceStatus, listServices } from "../core/service-manager.js";
|
|
7
9
|
// Re-exported for callers (and tests) that used to import these from the CLI
|
|
8
10
|
// command before tailnet discovery moved into `src/core/tailnet-servers.ts` so
|
|
9
11
|
// the server endpoint can share it.
|
|
@@ -70,6 +72,25 @@ export async function cmdServers(argv, deps = {}) {
|
|
|
70
72
|
if (prune)
|
|
71
73
|
pruned = await pruneStaleServerRegistryEntries();
|
|
72
74
|
const localRows = await listValidatedServerRegistry();
|
|
75
|
+
const activeRows = localRows.filter((row) => row.valid);
|
|
76
|
+
const inactiveServices = [];
|
|
77
|
+
let staleCount = localRows.filter((row) => !row.valid).length;
|
|
78
|
+
if (!tailscale) {
|
|
79
|
+
const installed = (deps.listServices ?? listServices)().services;
|
|
80
|
+
const runningRoots = new Set(activeRows.map((row) => canonicalRegistryRoot(row.entry.root)));
|
|
81
|
+
for (const service of installed) {
|
|
82
|
+
if (!existsSync(service.root) || runningRoots.has(canonicalRegistryRoot(service.root)))
|
|
83
|
+
continue;
|
|
84
|
+
const live = await (deps.getServiceStatus ?? getServiceStatus)(service.root);
|
|
85
|
+
if (!live || live.status !== "running") {
|
|
86
|
+
inactiveServices.push({
|
|
87
|
+
name: service.id.replace(/-[a-f0-9]{8}$/, ""),
|
|
88
|
+
port: service.port,
|
|
89
|
+
root: service.root,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
73
94
|
const local = localRows.map((row) => ({
|
|
74
95
|
host: "local",
|
|
75
96
|
port: row.entry.port,
|
|
@@ -110,7 +131,7 @@ export async function cmdServers(argv, deps = {}) {
|
|
|
110
131
|
console.log(c.yellow(tailnetFallbackNotice(remoteHosts.map((host) => host.host))));
|
|
111
132
|
}
|
|
112
133
|
if (!tailscale && !prune && pruned === undefined) {
|
|
113
|
-
if (localRows.length === 0) {
|
|
134
|
+
if (localRows.length === 0 && inactiveServices.length === 0) {
|
|
114
135
|
console.log(c.dim(" No registered RepoOS servers."));
|
|
115
136
|
console.log(c.dim(" Control-plane `repoos serve` processes register under ") +
|
|
116
137
|
c.cyan("~/.repoos/servers/") +
|
|
@@ -118,8 +139,18 @@ export async function cmdServers(argv, deps = {}) {
|
|
|
118
139
|
return;
|
|
119
140
|
}
|
|
120
141
|
console.log(c.bold(" Registered RepoOS servers:\n"));
|
|
121
|
-
|
|
142
|
+
console.log(c.bold(" Running:\n"));
|
|
143
|
+
for (const row of activeRows)
|
|
122
144
|
printLocalRow(row);
|
|
145
|
+
console.log(c.bold("\n Inactive:\n"));
|
|
146
|
+
if (!inactiveServices.length)
|
|
147
|
+
console.log(c.dim(" None."));
|
|
148
|
+
for (const service of inactiveServices) {
|
|
149
|
+
console.log(` ${c.cyan(String(service.port).padStart(5))} ${c.dim("inactive")} ${c.bold(service.name)}`);
|
|
150
|
+
console.log(` ${c.dim(service.root)}`);
|
|
151
|
+
}
|
|
152
|
+
if (staleCount)
|
|
153
|
+
console.log(c.yellow(`\n ${staleCount} stale registry entr${staleCount === 1 ? "y" : "ies"}; run repoos servers --prune to remove.`));
|
|
123
154
|
return;
|
|
124
155
|
}
|
|
125
156
|
console.log(c.bold(tailscale ? " RepoOS servers by host:\n" : " Registered RepoOS servers:\n"));
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export { launcherScript } from "../core/launcher-runtime.js";
|
|
2
|
+
/** Keep in sync with install.sh's PAYLOAD_NAMES. */
|
|
3
|
+
export declare const INSTALL_PAYLOAD_NAMES: string[];
|
|
4
|
+
export declare function isLegacyStateInstall(root: string, home?: string): boolean;
|
|
5
|
+
/** Swap an extracted build while carrying every non-program entry forward. */
|
|
6
|
+
export declare function swapInstall(root: string, staged: string): void;
|
|
2
7
|
/** Upgrade completion note when the server is still serving an older build. */
|
|
3
8
|
export declare function upgradeRestartReminder(runningVersion: string | null, installedVersion: string): string | null;
|
|
4
9
|
/**
|
package/dist/commands/upgrade.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* command can give an actionable, source-specific instruction.
|
|
8
8
|
*/
|
|
9
9
|
import { execFileSync } from "node:child_process";
|
|
10
|
-
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync, } from "node:fs";
|
|
10
|
+
import { chmodSync, cpSync, existsSync, readdirSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync, } from "node:fs";
|
|
11
11
|
import { homedir } from "node:os";
|
|
12
12
|
import { dirname, join } from "node:path";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
@@ -18,6 +18,37 @@ import { boardRoot } from "../core/config.js";
|
|
|
18
18
|
import { locateRepoServer } from "../core/server-locate.js";
|
|
19
19
|
export { launcherScript } from "../core/launcher-runtime.js";
|
|
20
20
|
const REPO = "repo-os/repoos";
|
|
21
|
+
/** Keep in sync with install.sh's PAYLOAD_NAMES. */
|
|
22
|
+
export const INSTALL_PAYLOAD_NAMES = [
|
|
23
|
+
"cli",
|
|
24
|
+
"commands",
|
|
25
|
+
"core",
|
|
26
|
+
"server",
|
|
27
|
+
"ui",
|
|
28
|
+
".build-info.json",
|
|
29
|
+
];
|
|
30
|
+
export function isLegacyStateInstall(root, home = homedir()) {
|
|
31
|
+
return root === join(home, ".repoos");
|
|
32
|
+
}
|
|
33
|
+
/** Swap an extracted build while carrying every non-program entry forward. */
|
|
34
|
+
export function swapInstall(root, staged) {
|
|
35
|
+
for (const name of readdirSync(root)) {
|
|
36
|
+
if (!INSTALL_PAYLOAD_NAMES.includes(name))
|
|
37
|
+
cpSync(join(root, name), join(staged, name), { recursive: true, errorOnExist: true });
|
|
38
|
+
}
|
|
39
|
+
const displaced = `${root}.upgrade-old`;
|
|
40
|
+
if (existsSync(displaced))
|
|
41
|
+
throw new Error(`Upgrade backup already exists: ${displaced}`);
|
|
42
|
+
renameSync(root, displaced);
|
|
43
|
+
try {
|
|
44
|
+
renameSync(staged, root);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
renameSync(displaced, root);
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
rmSync(displaced, { recursive: true, force: true });
|
|
51
|
+
}
|
|
21
52
|
/** Upgrade completion note when the server is still serving an older build. */
|
|
22
53
|
export function upgradeRestartReminder(runningVersion, installedVersion) {
|
|
23
54
|
if (!runningVersion || runningVersion === installedVersion)
|
|
@@ -231,11 +262,13 @@ export async function cmdUpgrade(args) {
|
|
|
231
262
|
return;
|
|
232
263
|
}
|
|
233
264
|
}
|
|
234
|
-
const
|
|
265
|
+
const installedRoot = installRoot();
|
|
266
|
+
const legacy = isLegacyStateInstall(installedRoot);
|
|
267
|
+
const root = legacy ? join(homedir(), ".local", "share", "repoos") : installedRoot;
|
|
235
268
|
const channel = parseChannel(args);
|
|
236
269
|
const instruction = upgradeInstruction({
|
|
237
|
-
installRoot:
|
|
238
|
-
version: readInstallVersion(
|
|
270
|
+
installRoot: installedRoot,
|
|
271
|
+
version: readInstallVersion(installedRoot),
|
|
239
272
|
channel,
|
|
240
273
|
});
|
|
241
274
|
if (instruction.installKind === "package-manager") {
|
|
@@ -252,7 +285,7 @@ export async function cmdUpgrade(args) {
|
|
|
252
285
|
console.log(c.dim(` Update it with: ${instruction.command}`));
|
|
253
286
|
return;
|
|
254
287
|
}
|
|
255
|
-
const current = readInstallVersion(
|
|
288
|
+
const current = readInstallVersion(installedRoot);
|
|
256
289
|
console.log(c.dim(` Current version: v${current}`));
|
|
257
290
|
console.log(c.dim(channel ? ` Checking latest "${channel}" release…` : " Checking latest release…"));
|
|
258
291
|
let release;
|
|
@@ -283,8 +316,7 @@ export async function cmdUpgrade(args) {
|
|
|
283
316
|
// final swap is a plain rename.
|
|
284
317
|
const work = `${root}.upgrade-download`;
|
|
285
318
|
const staged = `${root}.upgrade-staged`;
|
|
286
|
-
const
|
|
287
|
-
for (const dir of [work, staged, displaced]) {
|
|
319
|
+
for (const dir of [work, staged]) {
|
|
288
320
|
if (existsSync(dir))
|
|
289
321
|
rmSync(dir, { recursive: true, force: true });
|
|
290
322
|
}
|
|
@@ -295,15 +327,17 @@ export async function cmdUpgrade(args) {
|
|
|
295
327
|
mkdirSync(staged, { recursive: true });
|
|
296
328
|
execFileSync("tar", ["-xzf", tmpTar, "-C", staged]);
|
|
297
329
|
execFileSync("chmod", ["+x", join(staged, "cli", "index.js")]);
|
|
298
|
-
|
|
299
|
-
|
|
330
|
+
if (legacy) {
|
|
331
|
+
if (existsSync(root))
|
|
332
|
+
throw new Error(`Install destination already exists: ${root}`);
|
|
333
|
+
mkdirSync(dirname(root), { recursive: true });
|
|
300
334
|
renameSync(staged, root);
|
|
335
|
+
for (const name of INSTALL_PAYLOAD_NAMES)
|
|
336
|
+
rmSync(join(installedRoot, name), { recursive: true, force: true });
|
|
301
337
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
throw e;
|
|
338
|
+
else {
|
|
339
|
+
swapInstall(root, staged);
|
|
305
340
|
}
|
|
306
|
-
rmSync(displaced, { recursive: true, force: true });
|
|
307
341
|
}
|
|
308
342
|
finally {
|
|
309
343
|
rmSync(work, { recursive: true, force: true });
|
|
@@ -311,6 +345,8 @@ export async function cmdUpgrade(args) {
|
|
|
311
345
|
rmSync(staged, { recursive: true, force: true });
|
|
312
346
|
}
|
|
313
347
|
regenerateLauncher(root);
|
|
348
|
+
if (legacy)
|
|
349
|
+
console.log(c.green(` Moved the legacy install to ${root}; kept machine state in ${installedRoot}.`));
|
|
314
350
|
console.log(c.green(` Upgraded to v${latest}.`));
|
|
315
351
|
try {
|
|
316
352
|
const server = await locateRepoServer(boardRoot().root);
|
|
@@ -2,7 +2,7 @@ import { afterEach, describe, expect, it, vi } from "vitest";
|
|
|
2
2
|
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
import { parseBoardColumns, resolveColumnLabels, patchTomlConfig, DEFAULT_COLUMN_LABELS, } from "./config.js";
|
|
5
|
+
import { parseBoardColumns, resolveColumnLabels, patchTomlConfig, DEFAULT_COLUMN_LABELS, getConfigSchema, loadConfig, SUPPORTED_TOML_KEYS, } from "./config.js";
|
|
6
6
|
describe("parseBoardColumns", () => {
|
|
7
7
|
it("returns undefined when no board.columns keys are present", () => {
|
|
8
8
|
expect(parseBoardColumns({})).toBeUndefined();
|
|
@@ -174,6 +174,38 @@ describe("patchTomlConfig with board.columns", () => {
|
|
|
174
174
|
expect(rootScoped).toHaveLength(0);
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
|
+
describe("board.emptyColumnText config", () => {
|
|
178
|
+
const roots = [];
|
|
179
|
+
afterEach(() => {
|
|
180
|
+
for (const root of roots)
|
|
181
|
+
rmSync(root, { recursive: true, force: true });
|
|
182
|
+
roots.length = 0;
|
|
183
|
+
});
|
|
184
|
+
function configFromToml(value) {
|
|
185
|
+
const root = mkdtempSync(join(tmpdir(), "repoos-empty-column-text-"));
|
|
186
|
+
roots.push(root);
|
|
187
|
+
writeFileSync(join(root, "repoos.toml"), value === undefined ? "" : `[board]\nemptyColumnText = ${JSON.stringify(value)}\n`, "utf8");
|
|
188
|
+
return loadConfig(root);
|
|
189
|
+
}
|
|
190
|
+
it.each([
|
|
191
|
+
[undefined, ""],
|
|
192
|
+
["-", "-"],
|
|
193
|
+
[" ", " "],
|
|
194
|
+
])("loads %j from [board] as %j", (value, expected) => {
|
|
195
|
+
expect(configFromToml(value).board?.emptyColumnText).toBe(expected);
|
|
196
|
+
});
|
|
197
|
+
it("registers the live setting and supported TOML key", () => {
|
|
198
|
+
const field = getConfigSchema().find((item) => item.key === "board.emptyColumnText");
|
|
199
|
+
expect(field).toMatchObject({
|
|
200
|
+
label: "Empty column text",
|
|
201
|
+
type: "string",
|
|
202
|
+
tier: "live",
|
|
203
|
+
restartRequired: false,
|
|
204
|
+
default: "",
|
|
205
|
+
});
|
|
206
|
+
expect(SUPPORTED_TOML_KEYS).toContain("board.emptyColumnText");
|
|
207
|
+
});
|
|
208
|
+
});
|
|
177
209
|
describe("init template board.columns example", () => {
|
|
178
210
|
it("includes a commented [board.columns] section", async () => {
|
|
179
211
|
const mod = await import("./config.js");
|
package/dist/core/config.js
CHANGED
|
@@ -252,6 +252,7 @@ export const DEFAULT_CONFIG = {
|
|
|
252
252
|
board: {
|
|
253
253
|
agentPopoverCloseSeconds: 15,
|
|
254
254
|
doneCollapsedByDefault: true,
|
|
255
|
+
emptyColumnText: "",
|
|
255
256
|
},
|
|
256
257
|
whisper: {
|
|
257
258
|
provider: "none",
|
|
@@ -1674,6 +1675,9 @@ export function loadConfig(rootArg, options = {}) {
|
|
|
1674
1675
|
const doneCollapsedByDefault = get("board.doneCollapsedByDefault");
|
|
1675
1676
|
if (typeof doneCollapsedByDefault === "boolean")
|
|
1676
1677
|
cfg.board = { ...cfg.board, doneCollapsedByDefault };
|
|
1678
|
+
const emptyColumnText = get("board.emptyColumnText");
|
|
1679
|
+
if (typeof emptyColumnText === "string")
|
|
1680
|
+
cfg.board = { ...cfg.board, emptyColumnText };
|
|
1677
1681
|
const popoverClose = get("board.agentPopoverCloseSeconds");
|
|
1678
1682
|
const popoverCloseNum = typeof popoverClose === "number"
|
|
1679
1683
|
? popoverClose
|
|
@@ -3248,6 +3252,15 @@ export function getConfigSchema() {
|
|
|
3248
3252
|
default: DEFAULT_CONFIG.board?.agentPopoverCloseSeconds ?? 15,
|
|
3249
3253
|
description: "Seconds before the task-card agent popover fades closed. Any hover, focus, or click inside starts the timer again. Set 0 to leave it open until you click away.",
|
|
3250
3254
|
},
|
|
3255
|
+
{
|
|
3256
|
+
key: "board.emptyColumnText",
|
|
3257
|
+
label: "Empty column text",
|
|
3258
|
+
type: "string",
|
|
3259
|
+
tier: "live",
|
|
3260
|
+
restartRequired: false,
|
|
3261
|
+
default: "",
|
|
3262
|
+
description: "Use this text for every empty Work Queue column. Leave blank to use each column's default.",
|
|
3263
|
+
},
|
|
3251
3264
|
{
|
|
3252
3265
|
key: "attention.spendAlertUsd",
|
|
3253
3266
|
label: "Spend alert threshold (USD)",
|
|
@@ -4548,6 +4561,7 @@ export const SUPPORTED_TOML_KEYS = [
|
|
|
4548
4561
|
"worktreeWarnThreshold",
|
|
4549
4562
|
"board.doneCollapsedByDefault",
|
|
4550
4563
|
"board.agentPopoverCloseSeconds",
|
|
4564
|
+
"board.emptyColumnText",
|
|
4551
4565
|
"dev.inspector.enabled",
|
|
4552
4566
|
"dev.inspector.editorCommand",
|
|
4553
4567
|
"editor.command",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RemoteValidationConfig, RemoteValidationHost } from "./types.js";
|
|
2
2
|
/** Per-command budget for one remote host. */
|
|
3
|
-
export declare const HOST_TIMEOUT_MS =
|
|
3
|
+
export declare const HOST_TIMEOUT_MS = 3500;
|
|
4
4
|
/** Whole-request budget for one discovery pass; slow hosts become `unreachable`. */
|
|
5
|
-
export declare const DISCOVERY_DEADLINE_MS =
|
|
5
|
+
export declare const DISCOVERY_DEADLINE_MS = 4800;
|
|
6
6
|
/** Machine-level HTTP endpoint bound directly to the Tailscale interface. */
|
|
7
7
|
export declare const TAILNET_DISCOVERY_PORT = 41641;
|
|
8
8
|
export interface ListedServer {
|
|
@@ -146,6 +146,8 @@ export interface CollectTailnetOptions {
|
|
|
146
146
|
annotateUrls?: boolean;
|
|
147
147
|
/** Test seam for the deadline clock. */
|
|
148
148
|
now?: () => number;
|
|
149
|
+
/** Called as each peer finishes; local rows are emitted first. */
|
|
150
|
+
onPeerResult?: (rows: ListedServer[]) => void;
|
|
149
151
|
}
|
|
150
152
|
export declare function defaultHttpDiscovery(peer: TailnetPeer, timeoutMs: number): Promise<string | null>;
|
|
151
153
|
export interface TailnetCollection {
|
|
@@ -14,13 +14,13 @@ import { promisify } from "node:util";
|
|
|
14
14
|
import { remoteHostUser } from "./remote-hosts.js";
|
|
15
15
|
const execFileAsync = promisify(execFile);
|
|
16
16
|
/** Per-command budget for one remote host. */
|
|
17
|
-
export const HOST_TIMEOUT_MS =
|
|
17
|
+
export const HOST_TIMEOUT_MS = 3_500;
|
|
18
18
|
/** Whole-request budget for one discovery pass; slow hosts become `unreachable`. */
|
|
19
|
-
export const DISCOVERY_DEADLINE_MS =
|
|
19
|
+
export const DISCOVERY_DEADLINE_MS = 4_800;
|
|
20
20
|
/** Machine-level HTTP endpoint bound directly to the Tailscale interface. */
|
|
21
21
|
export const TAILNET_DISCOVERY_PORT = 41641;
|
|
22
22
|
/** Leave time for the peer listener's local Tailscale URL enrichment. */
|
|
23
|
-
const HTTP_DISCOVERY_TIMEOUT_MS =
|
|
23
|
+
const HTTP_DISCOVERY_TIMEOUT_MS = 1_800;
|
|
24
24
|
/** `tailscale status --json` is local and cheap; never let it hold a request. */
|
|
25
25
|
const TAILSCALE_STATUS_TIMEOUT_MS = 2_000;
|
|
26
26
|
/** URL enrichment is a nicety; a slow `serve status` must not hide servers. */
|
|
@@ -502,6 +502,7 @@ export async function collectTailnetServers(local, options = {}) {
|
|
|
502
502
|
}),
|
|
503
503
|
}))
|
|
504
504
|
: local;
|
|
505
|
+
options.onPeerResult?.(localRows);
|
|
505
506
|
const remoteExec = options.remoteExec ?? defaultRemoteExec;
|
|
506
507
|
const configuredByHost = new Map((options.remoteHosts ?? []).map((host) => [host.host, host]));
|
|
507
508
|
const remotes = await Promise.all(peers.map(async (peer) => {
|
|
@@ -585,9 +586,11 @@ export async function collectTailnetServers(local, options = {}) {
|
|
|
585
586
|
];
|
|
586
587
|
}
|
|
587
588
|
};
|
|
588
|
-
|
|
589
|
+
const rows = await within(work(), deadlineAt - now(), () => [
|
|
589
590
|
{ host: peer.host, ...displayFields, unreachable: true, reason: "timed out" },
|
|
590
591
|
]);
|
|
592
|
+
options.onPeerResult?.(rows);
|
|
593
|
+
return rows;
|
|
591
594
|
}));
|
|
592
595
|
return {
|
|
593
596
|
servers: [...localRows, ...remotes.flat()],
|
package/dist/core/types.d.ts
CHANGED
|
@@ -31,12 +31,14 @@ export interface TailnetDiscoveryDeps {
|
|
|
31
31
|
httpDiscovery?: CollectTailnetOptions["httpDiscovery"];
|
|
32
32
|
deadlineMs?: number;
|
|
33
33
|
now?: () => number;
|
|
34
|
+
onPeerResult?: (rows: ListedServer[]) => void;
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
37
|
* Build the endpoint's response. Exported separately from the route handler so
|
|
37
38
|
* tests can fake the Tailscale CLI and SSH without a live server or network.
|
|
38
39
|
*/
|
|
39
40
|
export declare function buildTailnetDiscoveryPayload(config: Pick<RepoOSConfig, "remoteValidation" | "tailnetDiscovery">, deps?: TailnetDiscoveryDeps): Promise<TailnetDiscoveryPayload>;
|
|
41
|
+
export declare function createTailnetServersHandler(discoveryDeps?: TailnetDiscoveryDeps): RouteHandler;
|
|
40
42
|
export declare const getTailnetServers: RouteHandler;
|
|
41
43
|
/** Validate the direct socket address; forwarded or loopback requests are never trusted. */
|
|
42
44
|
export declare function isTailnetPeerDiscoveryRequest(req: IncomingMessage): boolean;
|
|
@@ -65,6 +65,7 @@ export async function buildTailnetDiscoveryPayload(config, deps = {}) {
|
|
|
65
65
|
...(deps.remoteExec ? { remoteExec: deps.remoteExec } : {}),
|
|
66
66
|
...(deps.httpDiscovery ? { httpDiscovery: deps.httpDiscovery } : {}),
|
|
67
67
|
...(deps.now ? { now: deps.now } : {}),
|
|
68
|
+
...(deps.onPeerResult ? { onPeerResult: deps.onPeerResult } : {}),
|
|
68
69
|
});
|
|
69
70
|
return {
|
|
70
71
|
ok: true,
|
|
@@ -73,9 +74,39 @@ export async function buildTailnetDiscoveryPayload(config, deps = {}) {
|
|
|
73
74
|
discoverySource: result.source,
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
|
-
export
|
|
77
|
-
return
|
|
78
|
-
|
|
77
|
+
export function createTailnetServersHandler(discoveryDeps = {}) {
|
|
78
|
+
return async (ctx, req, res) => {
|
|
79
|
+
if (!new URL(req.url ?? "/", "http://localhost").searchParams.has("stream"))
|
|
80
|
+
return json(res, 200, await buildTailnetDiscoveryPayload(ctx.config, discoveryDeps));
|
|
81
|
+
res.writeHead(200, {
|
|
82
|
+
"Content-Type": "text/event-stream",
|
|
83
|
+
"Cache-Control": "no-cache",
|
|
84
|
+
Connection: "keep-alive",
|
|
85
|
+
"X-Accel-Buffering": "no",
|
|
86
|
+
});
|
|
87
|
+
try {
|
|
88
|
+
const payload = await buildTailnetDiscoveryPayload(ctx.config, {
|
|
89
|
+
...discoveryDeps,
|
|
90
|
+
onPeerResult(rows) {
|
|
91
|
+
discoveryDeps.onPeerResult?.(rows);
|
|
92
|
+
if (!res.writableEnded)
|
|
93
|
+
res.write(`event: peer\ndata: ${JSON.stringify({ servers: rows })}\n\n`);
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
if (!res.writableEnded) {
|
|
97
|
+
res.write(`event: done\ndata: ${JSON.stringify(payload)}\n\n`);
|
|
98
|
+
res.end();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
if (!res.writableEnded) {
|
|
103
|
+
res.write(`event: error\ndata: ${JSON.stringify({ reason: "Tailnet discovery stopped before it finished." })}\n\n`);
|
|
104
|
+
res.end();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export const getTailnetServers = createTailnetServersHandler();
|
|
79
110
|
function normalizedAddress(value) {
|
|
80
111
|
return (value ?? "")
|
|
81
112
|
.trim()
|
package/dist/server/server.js
CHANGED
|
@@ -337,7 +337,9 @@ async function tunnelReadiness(root, port) {
|
|
|
337
337
|
present: existsSync(certPath),
|
|
338
338
|
usable: usableOriginCertificate(certPath),
|
|
339
339
|
};
|
|
340
|
-
const
|
|
340
|
+
const serveDefaultPort = resolveServePort(root, loadConfig(root));
|
|
341
|
+
const originPort = port ?? serveDefaultPort;
|
|
342
|
+
const originListening = await portListening(originPort);
|
|
341
343
|
return {
|
|
342
344
|
cloudflared: { installed: !!bin, version },
|
|
343
345
|
originCertificate,
|
|
@@ -347,8 +349,8 @@ async function tunnelReadiness(root, port) {
|
|
|
347
349
|
tunnelId: tunnel.tunnelId || null,
|
|
348
350
|
baseDomain: tunnel.domain || null,
|
|
349
351
|
},
|
|
350
|
-
localOrigin: { port:
|
|
351
|
-
serveDefaultPort
|
|
352
|
+
localOrigin: { port: originPort, listening: originListening },
|
|
353
|
+
serveDefaultPort,
|
|
352
354
|
running: (await tunnelProcessRunning()) || (await serviceRunning()),
|
|
353
355
|
publishedHostnames: Object.values(allApps)
|
|
354
356
|
.map((app) => app.hostname)
|
|
Binary file
|