@repo-os/repoos 0.5.80 → 0.5.81
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/commands/upgrade.d.ts +89 -0
- package/dist/commands/upgrade.js +102 -13
- package/dist/core/config.js +20 -1
- package/dist/core/git.d.ts +89 -0
- package/dist/core/git.js +203 -8
- package/dist/core/landable.js +1 -1
- package/dist/core/lockfile-conflict.d.ts +5 -1
- package/dist/core/lockfile-conflict.js +34 -3
- package/dist/core/review-report-sections.js +2 -1
- package/dist/core/shot-fixtures.d.ts +1 -1
- package/dist/core/shot-fixtures.js +10 -2
- package/dist/core/types.d.ts +6 -0
- package/dist/server/check-gate-lock.d.ts +47 -0
- package/dist/server/check-gate-lock.js +63 -3
- package/dist/server/done.js +5 -6
- package/dist/server/engineer-remote-self-check.js +34 -6
- package/dist/server/handoff-status.d.ts +7 -0
- package/dist/server/handoff-status.js +13 -0
- package/dist/server/handoff.js +110 -13
- package/dist/server/integration-orchestrator.js +30 -3
- package/dist/server/review-guard.d.ts +15 -1
- package/dist/server/review-guard.js +95 -28
- package/dist/server/review-report-store.js +3 -1
- package/dist/server/review.d.ts +29 -0
- package/dist/server/review.js +117 -3
- package/dist/server/routes/release.d.ts +9 -0
- package/dist/server/routes/release.js +53 -27
- package/dist/server/routes/tasks.js +5 -1
- package/dist/ui/assets/ActivityIndicator-RQG6hvTL.js +1 -0
- package/dist/ui/assets/{AgentModelControl-CGjCdY-A.js → AgentModelControl-rddIj4UM.js} +1 -1
- package/dist/ui/assets/{AgentModelModal-DEUsHqtN.js → AgentModelModal-X2BCT9-u.js} +1 -1
- package/dist/ui/assets/{AgentsView-w4jAuJuM.css → AgentsView-B2_-D1yF.css} +1 -1
- package/dist/ui/assets/AgentsView-CX3N_jKt.js +2 -0
- package/dist/ui/assets/{ChatAgentModelChip-D-f5AGlh.js → ChatAgentModelChip-9tc5FOK8.js} +1 -1
- package/dist/ui/assets/ChecksView-BbrTCFAr.js +0 -0
- package/dist/ui/assets/{ChecksView-bW4060TJ.css → ChecksView-u0VznGkb.css} +1 -1
- package/dist/ui/assets/{ClientBoardView-BtHAVc1M.js → ClientBoardView-f5JZkZHB.js} +1 -1
- package/dist/ui/assets/ContextView-BDGKIDsx.js +4 -0
- package/dist/ui/assets/DashboardView-BYHeiXjK.js +1 -0
- package/dist/ui/assets/DeploymentsView--ftmbC8t.js +1 -0
- package/dist/ui/assets/DeploymentsView-CAxXPEHO.css +1 -0
- package/dist/ui/assets/DevView-BwdViVxh.css +1 -0
- package/dist/ui/assets/DevView-D_6ive6Q.js +2 -0
- package/dist/ui/assets/{DiffView-B_jjkijb.js → DiffView-YID6ReSi.js} +1 -1
- package/dist/ui/assets/{FailedTestsList-Sd4Z_nNr.js → FailedTestsList-lRPgMVk6.js} +1 -1
- package/dist/ui/assets/{InputsView-CkQLbsxk.js → InputsView-DQaDQNvL.js} +1 -1
- package/dist/ui/assets/{LoginView-B8o5rVKh.js → LoginView-ahrsIk5c.js} +1 -1
- package/dist/ui/assets/PageSkeleton-DVEAY03M.css +1 -0
- package/dist/ui/assets/PageSkeleton-DhwoOs3z.js +1 -0
- package/dist/ui/assets/ReleasesView-BwqinG0s.css +1 -0
- package/dist/ui/assets/ReleasesView-xkXPKhX6.js +5 -0
- package/dist/ui/assets/SecretsView-Qrvy3TDZ.js +1 -0
- package/dist/ui/assets/SettingsView-BpHgh1-0.js +4 -0
- package/dist/ui/assets/StoriesView-DKng4ydw.js +1 -0
- package/dist/ui/assets/{VoiceDictate-B2MSEMQv.js → VoiceDictate-Dv1thwPa.js} +1 -1
- package/dist/ui/assets/WorkView-B8AQuKG1.js +2 -0
- package/dist/ui/assets/{abnfDiagram-VCTEODGH-DryGHWlE.js → abnfDiagram-VCTEODGH-Cq8vcaFs.js} +1 -1
- package/dist/ui/assets/activity-motion-TFy0O4bk.js +1 -0
- package/dist/ui/assets/{architectureDiagram-5GKGNRK7-Ueawnvag.js → architectureDiagram-5GKGNRK7-CSpmSa1E.js} +1 -1
- package/dist/ui/assets/{blockDiagram-I7D4REHJ-5Wq5ln5C.js → blockDiagram-I7D4REHJ-DwxmE3mt.js} +1 -1
- package/dist/ui/assets/{c4Diagram-7LVT6UL2-ByHbNTwS.js → c4Diagram-7LVT6UL2-D89vxQRS.js} +1 -1
- package/dist/ui/assets/channel-CIRCgzQL.js +1 -0
- package/dist/ui/assets/{check-setup-DF3Qbm7Z.js → check-setup-CbHDLRRo.js} +1 -1
- package/dist/ui/assets/{chunk-2E4U76K2-B4qH-3a6.js → chunk-2E4U76K2-DdhwTfam.js} +1 -1
- package/dist/ui/assets/{chunk-4HAMMTFA-DuMIxuo8.js → chunk-4HAMMTFA-DmJvPn6W.js} +1 -1
- package/dist/ui/assets/{chunk-75Z2AOVW-DvF5482n.js → chunk-75Z2AOVW-4QN5k5n3.js} +1 -1
- package/dist/ui/assets/{chunk-CLGD4ZFX-BY9jsZYy.js → chunk-CLGD4ZFX-BR-A4icR.js} +1 -1
- package/dist/ui/assets/{chunk-DU6HZSFF-DWOIxL1_.js → chunk-DU6HZSFF-9xlXhgs1.js} +1 -1
- package/dist/ui/assets/{chunk-F27PBJKO-5e0atdG5.js → chunk-F27PBJKO-BwDeV6YA.js} +1 -1
- package/dist/ui/assets/{chunk-GMAD6QVW-C6VTc2Vj.js → chunk-GMAD6QVW-BWRBcS1R.js} +1 -1
- package/dist/ui/assets/{chunk-GVQU2GXP-BIFStR5h.js → chunk-GVQU2GXP-COQ3z0bS.js} +1 -1
- package/dist/ui/assets/{chunk-IMKFNOWR-C6W81G7J.js → chunk-IMKFNOWR-CR2co4I9.js} +1 -1
- package/dist/ui/assets/{chunk-L3NEJ4N5-BbSjn49W.js → chunk-L3NEJ4N5-BGrmTM3B.js} +1 -1
- package/dist/ui/assets/{chunk-OSK3NFVY-BdxwKs9t.js → chunk-OSK3NFVY-C6Y95IFY.js} +1 -1
- package/dist/ui/assets/{chunk-P2QGCYS3-CyEvHkhC.js → chunk-P2QGCYS3-cFOeR0fs.js} +1 -1
- package/dist/ui/assets/{chunk-POPQ4Y6H-Dd9wuoOs.js → chunk-POPQ4Y6H-DVCaMA3q.js} +1 -1
- package/dist/ui/assets/{chunk-PWAF6VOD-DvTHa2mX.js → chunk-PWAF6VOD-BfP23CLu.js} +1 -1
- package/dist/ui/assets/{chunk-SHT3W25Y-BZHrMNWC.js → chunk-SHT3W25Y-DsAut3fo.js} +1 -1
- package/dist/ui/assets/{chunk-SVP7TREG-C3uGkfzr.js → chunk-SVP7TREG-C1IhncTC.js} +1 -1
- package/dist/ui/assets/{chunk-TICWLB2K-bEVmnsCW.js → chunk-TICWLB2K-BQg61-Ax.js} +1 -1
- package/dist/ui/assets/chunk-TLUHSLCS-iZWa-iEt.js +2 -0
- package/dist/ui/assets/classDiagram-ZZMXUADV-DuCvGyds.js +1 -0
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-DuCvGyds.js +1 -0
- package/dist/ui/assets/{cynefinDiagram-5FMLGOSQ-C3mUaqhW.js → cynefinDiagram-5FMLGOSQ-BQMw9oCu.js} +1 -1
- package/dist/ui/assets/{dagre-GXQ25YYZ-B6Lo3YbE.js → dagre-GXQ25YYZ-Bwf0tGsh.js} +1 -1
- package/dist/ui/assets/{diagram-S7CK7UJ4-D_STpxl8.js → diagram-S7CK7UJ4--07nd2Km.js} +1 -1
- package/dist/ui/assets/{diagram-UQ7AKVKN-BGMweSF4.js → diagram-UQ7AKVKN-BnppfD3n.js} +1 -1
- package/dist/ui/assets/{diagram-VSXAHHWV-DnZ7CL2l.js → diagram-VSXAHHWV-DavsZSZR.js} +1 -1
- package/dist/ui/assets/{diagram-VX7I27RA-DA0SNLL2.js → diagram-VX7I27RA-vF99qObM.js} +1 -1
- package/dist/ui/assets/{diagram-Z3DM3KII-Bdpk9z1h.js → diagram-Z3DM3KII-ByMRp7Lj.js} +1 -1
- package/dist/ui/assets/{docs-Cf58QoJi.js → docs-Bib5O7zg.js} +1 -1
- package/dist/ui/assets/{ebnfDiagram-PWID7BFC-BYPRBYPX.js → ebnfDiagram-PWID7BFC-E3ksi-Se.js} +1 -1
- package/dist/ui/assets/{erDiagram-RLTQ6QDP-tKjeyYH3.js → erDiagram-RLTQ6QDP-CWu35TiV.js} +1 -1
- package/dist/ui/assets/flowDiagram-HODETNUW-yAw5OXM2.js +1 -0
- package/dist/ui/assets/{ganttDiagram-EL5Y4UJY-pZRckzDe.js → ganttDiagram-EL5Y4UJY-8sEpEebL.js} +1 -1
- package/dist/ui/assets/{gitGraphDiagram-WWUBYQGX-D_EIT5uo.js → gitGraphDiagram-WWUBYQGX-DKy2-XDk.js} +1 -1
- package/dist/ui/assets/index-CgvhPdup.js +92 -0
- package/dist/ui/assets/{index-DmBFMTgK.css → index-DK2w5dcH.css} +1 -1
- package/dist/ui/assets/{infoDiagram-27XIBGKW-BiNQDfK8.js → infoDiagram-27XIBGKW-DTp08qxU.js} +1 -1
- package/dist/ui/assets/{ishikawaDiagram-5VMMS53U-Dz2bDVEo.js → ishikawaDiagram-5VMMS53U-CTFdvXq3.js} +1 -1
- package/dist/ui/assets/{journeyDiagram-3NMN7TZE-C_wfOGre.js → journeyDiagram-3NMN7TZE-B1R6Dq0O.js} +1 -1
- package/dist/ui/assets/{kanban-definition-UXKFOSKX-JTOHk2mx.js → kanban-definition-UXKFOSKX-CZ9kXxNu.js} +1 -1
- package/dist/ui/assets/{line-BzLTvgmm.js → line-D9RfyImD.js} +1 -1
- package/dist/ui/assets/{mermaid-parser.core-CDNdUr1f.js → mermaid-parser.core-CJbML1of.js} +1 -1
- package/dist/ui/assets/mermaid.core-Dp6f40i4.js +11 -0
- package/dist/ui/assets/{mindmap-definition-YA3MSWOX-Bqitf_fH.js → mindmap-definition-YA3MSWOX-Drt3agXN.js} +1 -1
- package/dist/ui/assets/page-data-cache-D8m2QE6z.js +1 -0
- package/dist/ui/assets/{pegDiagram-XKGWAZYB-Dv2Okml_.js → pegDiagram-XKGWAZYB-BL1-4rQl.js} +1 -1
- package/dist/ui/assets/{pieDiagram-E7YTZNPT-DvdLMPaN.js → pieDiagram-E7YTZNPT-SgLUnkSx.js} +1 -1
- package/dist/ui/assets/{quadrantDiagram-AXDQQJYC-CxP-D_4q.js → quadrantDiagram-AXDQQJYC-DRceeGWZ.js} +1 -1
- package/dist/ui/assets/{railroadDiagram-O6MQD6OU-BiI8bRTu.js → railroadDiagram-O6MQD6OU-DRoUlx0K.js} +1 -1
- package/dist/ui/assets/repo-BA_wQb3l.js +66 -0
- package/dist/ui/assets/{requirementDiagram-BXWQKSXE-BCnusy2h.js → requirementDiagram-BXWQKSXE-C5udyCAl.js} +1 -1
- package/dist/ui/assets/{sankeyDiagram-P5KCCOFB-DVA3ufrv.js → sankeyDiagram-P5KCCOFB-BxDybL12.js} +1 -1
- package/dist/ui/assets/{sequenceDiagram-WJ2MYXX4-BI_qh5Hm.js → sequenceDiagram-WJ2MYXX4-Is4IwOMh.js} +1 -1
- package/dist/ui/assets/{stateDiagram-D77RDMKH-DyMRnVUJ.js → stateDiagram-D77RDMKH-DIvQUF30.js} +1 -1
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-C2WyqlbN.js +1 -0
- package/dist/ui/assets/{swimlanes-42K2YHIH-DPpIv9k5.js → swimlanes-42K2YHIH-DuHeh3aL.js} +1 -1
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-U3yBzN3c.js +8 -0
- package/dist/ui/assets/{timeline-definition-24CTP7MA-BYllwjwu.js → timeline-definition-24CTP7MA-BOh7-kWv.js} +1 -1
- package/dist/ui/assets/{vennDiagram-4TSXK5OY-CB0J350t.js → vennDiagram-4TSXK5OY-DhM7B1MC.js} +1 -1
- package/dist/ui/assets/{wardleyDiagram-VM6X3IG4-l6N8mMKY.js → wardleyDiagram-VM6X3IG4-B5RTZ0aA.js} +1 -1
- package/dist/ui/assets/{xychartDiagram-S5SC5T6Z-BteZhzza.js → xychartDiagram-S5SC5T6Z-CgV-_HAk.js} +1 -1
- package/dist/ui/index.html +13 -12
- package/dist/ui/sw.js +2 -2
- package/package.json +1 -1
- package/dist/ui/assets/ActivityIndicator-_ljevAYO.js +0 -1
- package/dist/ui/assets/AgentsView-CpQQsOvX.js +0 -2
- package/dist/ui/assets/ChecksView-NarAgPbO.js +0 -0
- package/dist/ui/assets/ContextView-Dvfmg2ZT.js +0 -4
- package/dist/ui/assets/DashboardView-B_hr_0z1.js +0 -1
- package/dist/ui/assets/DeploymentsView-DNipdK1H.css +0 -1
- package/dist/ui/assets/DeploymentsView-TfaRsp51.js +0 -1
- package/dist/ui/assets/DevView-CI2657c-.css +0 -1
- package/dist/ui/assets/DevView-DeUxHwbS.js +0 -2
- package/dist/ui/assets/PageSkeleton-Bt--aAPS.js +0 -1
- package/dist/ui/assets/PageSkeleton-CsTdMpw3.css +0 -1
- package/dist/ui/assets/ReleasesView-3yHTdc8L.css +0 -1
- package/dist/ui/assets/ReleasesView-BtdEfDWQ.js +0 -5
- package/dist/ui/assets/SecretsView-k9VXlh5N.js +0 -1
- package/dist/ui/assets/SettingsView-LN60oARW.js +0 -4
- package/dist/ui/assets/StoriesView-DOdBaLiI.js +0 -1
- package/dist/ui/assets/WorkView-CvRC1bUg.js +0 -2
- package/dist/ui/assets/channel-xF0QFUVz.js +0 -1
- package/dist/ui/assets/chunk-TLUHSLCS-HY9DRKeu.js +0 -2
- package/dist/ui/assets/classDiagram-ZZMXUADV-DUvPpnoK.js +0 -1
- package/dist/ui/assets/classDiagram-v2-VYDZK3BY-DUvPpnoK.js +0 -1
- package/dist/ui/assets/flowDiagram-HODETNUW-CmlN7AOV.js +0 -1
- package/dist/ui/assets/index-BIkCA9sP.js +0 -92
- package/dist/ui/assets/mermaid.core-CWhihRvD.js +0 -11
- package/dist/ui/assets/page-data-cache-D5B-w9R_.js +0 -1
- package/dist/ui/assets/repo-DAKR6P_m.js +0 -63
- package/dist/ui/assets/stateDiagram-v2-MP3YSRHH-CJqx7lVE.js +0 -1
- package/dist/ui/assets/swimlanesDiagram-VR7AAH4N-RdmdivWJ.js +0 -8
package/dist/.build-info.json
CHANGED
package/dist/.build-stamp.json
CHANGED
|
@@ -1,14 +1,92 @@
|
|
|
1
1
|
export { launcherScript } from "../core/launcher-runtime.js";
|
|
2
|
+
/**
|
|
3
|
+
* The directory containing cli/, core/, server/, ui/, .build-info.json — dist/
|
|
4
|
+
* in a source checkout, or the whole install root for a standalone install.
|
|
5
|
+
* Exported so the server's install detection starts from the same root.
|
|
6
|
+
*/
|
|
7
|
+
export declare function installRoot(): string;
|
|
8
|
+
/**
|
|
9
|
+
* The version in the install's own `.build-info.json`, or null when there is
|
|
10
|
+
* none — the same read `cmdUpgrade` uses. Exported so the server's install
|
|
11
|
+
* detection passes identical input to `upgradeInstruction` and never disagrees
|
|
12
|
+
* with the CLI on the same checkout (#1073 review).
|
|
13
|
+
*/
|
|
14
|
+
export declare function readInstallVersion(root: string): string | null;
|
|
2
15
|
export interface PackageManagerUpgrade {
|
|
3
16
|
label: string;
|
|
4
17
|
command: string;
|
|
5
18
|
}
|
|
19
|
+
/** How this RepoOS was installed, as far as `repoos upgrade` can tell (#1073). */
|
|
20
|
+
export type InstallKind = "standalone" | "source" | "package-manager";
|
|
21
|
+
/** The upgrade instruction a user should run, and how we decided it. */
|
|
22
|
+
export interface UpgradeInstruction {
|
|
23
|
+
installKind: InstallKind;
|
|
24
|
+
/** Package-manager label (e.g. "Homebrew") — only set for `package-manager`. */
|
|
25
|
+
packageManager: string | null;
|
|
26
|
+
/** The exact command/instruction, ready to copy into a terminal. */
|
|
27
|
+
command: string;
|
|
28
|
+
}
|
|
29
|
+
/** The command shown for a source checkout — the same one `repoos upgrade` prints. */
|
|
30
|
+
export declare const SOURCE_UPGRADE_COMMAND = "git pull && bun install && bun run build";
|
|
31
|
+
/**
|
|
32
|
+
* Whether `root` is a source checkout's build output rather than a standalone
|
|
33
|
+
* install (#1073 review).
|
|
34
|
+
*
|
|
35
|
+
* The version alone cannot tell them apart: `scripts/copy-assets.mjs` writes
|
|
36
|
+
* `package.json`'s version into `dist/.build-info.json` on every source build,
|
|
37
|
+
* so a built checkout looks exactly like a curl install. The reliable signal is
|
|
38
|
+
* structure: a checkout's install root is `<repo>/dist` (or `<repo>/src` for a
|
|
39
|
+
* `bun src/...` run), and its parent holds `src/` + `package.json`, or a `.git`
|
|
40
|
+
* directory. A standalone install's parent holds neither.
|
|
41
|
+
*/
|
|
42
|
+
export declare function isSourceCheckout(root: string): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The prerelease channel a version belongs to (`0.6.0-beta.1` → `"beta"`), or
|
|
45
|
+
* null for a stable version. Release tags carry the channel as the prerelease
|
|
46
|
+
* identifier, so an installed channel build is how the update dialog knows to
|
|
47
|
+
* offer `repoos upgrade --channel <name>` (docs/releases.md).
|
|
48
|
+
*/
|
|
49
|
+
export declare function channelFromVersion(version: string | null): string | null;
|
|
50
|
+
/**
|
|
51
|
+
* The install instruction for a checkout, matching `cmdUpgrade`'s own
|
|
52
|
+
* detection so the dashboard dialog and the CLI never disagree (#1073).
|
|
53
|
+
* Pure and exported: the server calls it to fill `upgradeCommand` /
|
|
54
|
+
* `installKind` on `GET /api/release/available`, and #1072 reuses it.
|
|
55
|
+
*
|
|
56
|
+
* Detection order mirrors `cmdUpgrade`:
|
|
57
|
+
* 1. a recognized package-manager path → that manager's update command;
|
|
58
|
+
* 2. a source checkout (`isSourceCheckout`) or no `.build-info.json`
|
|
59
|
+
* (`version` is null) → the source-checkout command;
|
|
60
|
+
* 3. otherwise → standalone (curl) install, with the channel form when the
|
|
61
|
+
* installed version is a prerelease.
|
|
62
|
+
*
|
|
63
|
+
* `sourceCheckout` overrides the filesystem probe for tests; production callers
|
|
64
|
+
* omit it.
|
|
65
|
+
*/
|
|
66
|
+
export declare function upgradeInstruction(input: {
|
|
67
|
+
installRoot: string;
|
|
68
|
+
version: string | null;
|
|
69
|
+
channel?: string | null;
|
|
70
|
+
sourceCheckout?: boolean;
|
|
71
|
+
}): UpgradeInstruction;
|
|
6
72
|
/**
|
|
7
73
|
* Infer the package manager from the installed package path. `root` is the
|
|
8
74
|
* compiled dist/ directory, so it keeps enough of the global-install path to
|
|
9
75
|
* distinguish Homebrew, mise, Bun, pnpm, and npm.
|
|
10
76
|
*/
|
|
11
77
|
export declare function packageManagerUpgrade(root: string): PackageManagerUpgrade | null;
|
|
78
|
+
interface ReleaseAsset {
|
|
79
|
+
name: string;
|
|
80
|
+
browser_download_url: string;
|
|
81
|
+
}
|
|
82
|
+
export interface Release {
|
|
83
|
+
tag_name: string;
|
|
84
|
+
assets: ReleaseAsset[];
|
|
85
|
+
prerelease?: boolean;
|
|
86
|
+
html_url?: string;
|
|
87
|
+
/** GitHub release body — the notes authored in the "Cut a release" modal (#0361), when set. */
|
|
88
|
+
body?: string | null;
|
|
89
|
+
}
|
|
12
90
|
/**
|
|
13
91
|
* The release notes to print after an upgrade, or null when there's nothing
|
|
14
92
|
* to show — GitHub returns `body` as `null`/absent for a release cut with an
|
|
@@ -16,4 +94,15 @@ export declare function packageManagerUpgrade(root: string): PackageManagerUpgra
|
|
|
16
94
|
* stay silent then, not print an empty line or "no notes available" filler.
|
|
17
95
|
*/
|
|
18
96
|
export declare function releaseNotesToPrint(body: string | null | undefined): string | null;
|
|
97
|
+
/**
|
|
98
|
+
* `GET /releases/latest` always excludes prereleases (GitHub's own rule, not
|
|
99
|
+
* configurable) — release.yml marks any tag with a "-" (v0.6.0-beta.1,
|
|
100
|
+
* -canary.N, -rc.N) as a prerelease, exactly so stable users never get handed
|
|
101
|
+
* one from this endpoint. A channel opt-in has to use the list endpoint
|
|
102
|
+
* instead and find its own match.
|
|
103
|
+
*
|
|
104
|
+
* Exported so the update dialog's banner (#1073) compares against exactly the
|
|
105
|
+
* release `repoos upgrade --channel <name>` would install.
|
|
106
|
+
*/
|
|
107
|
+
export declare function fetchLatestRelease(channel: string | null, signal?: AbortSignal): Promise<Release>;
|
|
19
108
|
export declare function cmdUpgrade(args: string[]): Promise<void>;
|
package/dist/commands/upgrade.js
CHANGED
|
@@ -15,11 +15,21 @@ import { c } from "../cli/colors.js";
|
|
|
15
15
|
import { launcherScript } from "../core/launcher-runtime.js";
|
|
16
16
|
export { launcherScript } from "../core/launcher-runtime.js";
|
|
17
17
|
const REPO = "repo-os/repoos";
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The directory containing cli/, core/, server/, ui/, .build-info.json — dist/
|
|
20
|
+
* in a source checkout, or the whole install root for a standalone install.
|
|
21
|
+
* Exported so the server's install detection starts from the same root.
|
|
22
|
+
*/
|
|
23
|
+
export function installRoot() {
|
|
20
24
|
return dirname(dirname(fileURLToPath(import.meta.url)));
|
|
21
25
|
}
|
|
22
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The version in the install's own `.build-info.json`, or null when there is
|
|
28
|
+
* none — the same read `cmdUpgrade` uses. Exported so the server's install
|
|
29
|
+
* detection passes identical input to `upgradeInstruction` and never disagrees
|
|
30
|
+
* with the CLI on the same checkout (#1073 review).
|
|
31
|
+
*/
|
|
32
|
+
export function readInstallVersion(root) {
|
|
23
33
|
try {
|
|
24
34
|
const info = JSON.parse(readFileSync(join(root, ".build-info.json"), "utf8"));
|
|
25
35
|
return info.version ?? null;
|
|
@@ -28,6 +38,78 @@ function readVersion(root) {
|
|
|
28
38
|
return null;
|
|
29
39
|
}
|
|
30
40
|
}
|
|
41
|
+
/** The command shown for a source checkout — the same one `repoos upgrade` prints. */
|
|
42
|
+
export const SOURCE_UPGRADE_COMMAND = "git pull && bun install && bun run build";
|
|
43
|
+
/**
|
|
44
|
+
* Whether `root` is a source checkout's build output rather than a standalone
|
|
45
|
+
* install (#1073 review).
|
|
46
|
+
*
|
|
47
|
+
* The version alone cannot tell them apart: `scripts/copy-assets.mjs` writes
|
|
48
|
+
* `package.json`'s version into `dist/.build-info.json` on every source build,
|
|
49
|
+
* so a built checkout looks exactly like a curl install. The reliable signal is
|
|
50
|
+
* structure: a checkout's install root is `<repo>/dist` (or `<repo>/src` for a
|
|
51
|
+
* `bun src/...` run), and its parent holds `src/` + `package.json`, or a `.git`
|
|
52
|
+
* directory. A standalone install's parent holds neither.
|
|
53
|
+
*/
|
|
54
|
+
export function isSourceCheckout(root) {
|
|
55
|
+
const parent = dirname(root);
|
|
56
|
+
try {
|
|
57
|
+
if (existsSync(join(parent, ".git")))
|
|
58
|
+
return true;
|
|
59
|
+
return existsSync(join(parent, "src")) && existsSync(join(parent, "package.json"));
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The prerelease channel a version belongs to (`0.6.0-beta.1` → `"beta"`), or
|
|
67
|
+
* null for a stable version. Release tags carry the channel as the prerelease
|
|
68
|
+
* identifier, so an installed channel build is how the update dialog knows to
|
|
69
|
+
* offer `repoos upgrade --channel <name>` (docs/releases.md).
|
|
70
|
+
*/
|
|
71
|
+
export function channelFromVersion(version) {
|
|
72
|
+
if (!version)
|
|
73
|
+
return null;
|
|
74
|
+
const match = version.trim().match(/^\d+\.\d+\.\d+-([A-Za-z]+)\./);
|
|
75
|
+
return match ? match[1] : null;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The install instruction for a checkout, matching `cmdUpgrade`'s own
|
|
79
|
+
* detection so the dashboard dialog and the CLI never disagree (#1073).
|
|
80
|
+
* Pure and exported: the server calls it to fill `upgradeCommand` /
|
|
81
|
+
* `installKind` on `GET /api/release/available`, and #1072 reuses it.
|
|
82
|
+
*
|
|
83
|
+
* Detection order mirrors `cmdUpgrade`:
|
|
84
|
+
* 1. a recognized package-manager path → that manager's update command;
|
|
85
|
+
* 2. a source checkout (`isSourceCheckout`) or no `.build-info.json`
|
|
86
|
+
* (`version` is null) → the source-checkout command;
|
|
87
|
+
* 3. otherwise → standalone (curl) install, with the channel form when the
|
|
88
|
+
* installed version is a prerelease.
|
|
89
|
+
*
|
|
90
|
+
* `sourceCheckout` overrides the filesystem probe for tests; production callers
|
|
91
|
+
* omit it.
|
|
92
|
+
*/
|
|
93
|
+
export function upgradeInstruction(input) {
|
|
94
|
+
const packageManager = packageManagerUpgrade(input.installRoot);
|
|
95
|
+
if (packageManager) {
|
|
96
|
+
return {
|
|
97
|
+
installKind: "package-manager",
|
|
98
|
+
packageManager: packageManager.label,
|
|
99
|
+
command: packageManager.command,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const source = input.sourceCheckout ?? isSourceCheckout(input.installRoot);
|
|
103
|
+
if (source || input.version === null) {
|
|
104
|
+
return { installKind: "source", packageManager: null, command: SOURCE_UPGRADE_COMMAND };
|
|
105
|
+
}
|
|
106
|
+
const channel = input.channel ?? null;
|
|
107
|
+
return {
|
|
108
|
+
installKind: "standalone",
|
|
109
|
+
packageManager: null,
|
|
110
|
+
command: channel ? `repoos upgrade --channel ${channel}` : "repoos upgrade",
|
|
111
|
+
};
|
|
112
|
+
}
|
|
31
113
|
/**
|
|
32
114
|
* Infer the package manager from the installed package path. `root` is the
|
|
33
115
|
* compiled dist/ directory, so it keeps enough of the global-install path to
|
|
@@ -77,16 +159,19 @@ function parseChannel(args) {
|
|
|
77
159
|
* -canary.N, -rc.N) as a prerelease, exactly so stable users never get handed
|
|
78
160
|
* one from this endpoint. A channel opt-in has to use the list endpoint
|
|
79
161
|
* instead and find its own match.
|
|
162
|
+
*
|
|
163
|
+
* Exported so the update dialog's banner (#1073) compares against exactly the
|
|
164
|
+
* release `repoos upgrade --channel <name>` would install.
|
|
80
165
|
*/
|
|
81
|
-
async function fetchLatestRelease(channel) {
|
|
166
|
+
export async function fetchLatestRelease(channel, signal) {
|
|
82
167
|
if (!channel) {
|
|
83
|
-
const res = await fetch(`https://api.github.com/repos/${REPO}/releases/latest
|
|
168
|
+
const res = await fetch(`https://api.github.com/repos/${REPO}/releases/latest`, { signal });
|
|
84
169
|
if (!res.ok)
|
|
85
170
|
throw new Error(`GitHub API returned ${res.status}`);
|
|
86
171
|
return (await res.json());
|
|
87
172
|
}
|
|
88
173
|
// Newest first by default; the first tag matching "-<channel>." wins.
|
|
89
|
-
const res = await fetch(`https://api.github.com/repos/${REPO}/releases?per_page=30
|
|
174
|
+
const res = await fetch(`https://api.github.com/repos/${REPO}/releases?per_page=30`, { signal });
|
|
90
175
|
if (!res.ok)
|
|
91
176
|
throw new Error(`GitHub API returned ${res.status}`);
|
|
92
177
|
const releases = (await res.json());
|
|
@@ -98,22 +183,26 @@ async function fetchLatestRelease(channel) {
|
|
|
98
183
|
export async function cmdUpgrade(args) {
|
|
99
184
|
const root = installRoot();
|
|
100
185
|
const channel = parseChannel(args);
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
186
|
+
const instruction = upgradeInstruction({
|
|
187
|
+
installRoot: root,
|
|
188
|
+
version: readInstallVersion(root),
|
|
189
|
+
channel,
|
|
190
|
+
});
|
|
191
|
+
if (instruction.installKind === "package-manager") {
|
|
192
|
+
console.log(c.yellow(` repoos was installed with ${instruction.packageManager}.`));
|
|
104
193
|
console.log(c.dim(" Update it with:"));
|
|
105
|
-
console.log(c.dim(` ${
|
|
194
|
+
console.log(c.dim(` ${instruction.command}`));
|
|
106
195
|
if (channel) {
|
|
107
196
|
console.log(c.dim(` --channel ${channel} only applies to standalone curl installs.`));
|
|
108
197
|
}
|
|
109
198
|
return;
|
|
110
199
|
}
|
|
111
|
-
|
|
112
|
-
if (!current) {
|
|
200
|
+
if (instruction.installKind === "source") {
|
|
113
201
|
console.log(c.yellow(" repoos appears to be running from a source checkout, not a standalone install."));
|
|
114
|
-
console.log(c.dim(
|
|
202
|
+
console.log(c.dim(` Update it with: ${instruction.command}`));
|
|
115
203
|
return;
|
|
116
204
|
}
|
|
205
|
+
const current = readInstallVersion(root);
|
|
117
206
|
console.log(c.dim(` Current version: v${current}`));
|
|
118
207
|
console.log(c.dim(channel ? ` Checking latest "${channel}" release…` : " Checking latest release…"));
|
|
119
208
|
let release;
|
package/dist/core/config.js
CHANGED
|
@@ -79,7 +79,8 @@ export const DEFAULT_AGENTS = [
|
|
|
79
79
|
"`highlight` selector that exists on the page; then open the captured PNG and confirm it shows the change. " +
|
|
80
80
|
"Before handoff, re-read the newest review report and any message sent to you; fix EVERY item, and when a " +
|
|
81
81
|
"finding names a bug, find its whole class (grep sibling paths, callers, config/schema/docs/test " +
|
|
82
|
-
"registrations) and fix all instances with a table-driven test instead of patching one.
|
|
82
|
+
"registrations) and fix all instances with a table-driven test instead of patching one. " +
|
|
83
|
+
"A new config key " +
|
|
83
84
|
"needs a Settings control, a `getConfigSchema()` entry, an entry in the supported-keys list and docs. Run " +
|
|
84
85
|
"the scoped check once and hand off only when it passes; end the final message with the handoff signal " +
|
|
85
86
|
"alone on its own line. After a merge conflict with the base branch, merge it and take the base branch's " +
|
|
@@ -281,6 +282,7 @@ export const DEFAULT_CONFIG = {
|
|
|
281
282
|
// is flagged for a human.
|
|
282
283
|
review: {
|
|
283
284
|
humanFlagAfterPasses: 5,
|
|
285
|
+
freezeAfterPasses: 4,
|
|
284
286
|
timeoutMinutes: 15,
|
|
285
287
|
},
|
|
286
288
|
// Check-gate defaults (#0655): how many times a failing test file is
|
|
@@ -2379,6 +2381,7 @@ export function loadConfig(rootArg, options = {}) {
|
|
|
2379
2381
|
? Number(raw.trim())
|
|
2380
2382
|
: undefined;
|
|
2381
2383
|
const reviewHumanFlag = reviewNumber(parsed["review.humanFlagAfterPasses"]);
|
|
2384
|
+
const reviewFreeze = reviewNumber(parsed["review.freezeAfterPasses"]);
|
|
2382
2385
|
const reviewTimeout = reviewNumber(parsed["review.timeoutMinutes"]);
|
|
2383
2386
|
const review = { ...DEFAULT_CONFIG.review, ...cfg.review };
|
|
2384
2387
|
let reviewConfigured = false;
|
|
@@ -2386,6 +2389,10 @@ export function loadConfig(rootArg, options = {}) {
|
|
|
2386
2389
|
review.humanFlagAfterPasses = Math.min(50, Math.floor(reviewHumanFlag));
|
|
2387
2390
|
reviewConfigured = true;
|
|
2388
2391
|
}
|
|
2392
|
+
if (reviewFreeze !== undefined && Number.isFinite(reviewFreeze) && reviewFreeze >= 1) {
|
|
2393
|
+
review.freezeAfterPasses = Math.min(50, Math.floor(reviewFreeze));
|
|
2394
|
+
reviewConfigured = true;
|
|
2395
|
+
}
|
|
2389
2396
|
if (reviewTimeout !== undefined && Number.isFinite(reviewTimeout) && reviewTimeout >= 1) {
|
|
2390
2397
|
review.timeoutMinutes = Math.min(240, Math.floor(reviewTimeout));
|
|
2391
2398
|
reviewConfigured = true;
|
|
@@ -3156,6 +3163,17 @@ export function getConfigSchema() {
|
|
|
3156
3163
|
"bug classes earlier passes kept finding and the task is flagged for a human. Default 5. The flag is " +
|
|
3157
3164
|
"separate from the auto-bounce review-rounds-exhausted backstop.",
|
|
3158
3165
|
},
|
|
3166
|
+
{
|
|
3167
|
+
key: "review.freezeAfterPasses",
|
|
3168
|
+
label: "Freeze the blocking bar after",
|
|
3169
|
+
type: "number",
|
|
3170
|
+
tier: "live",
|
|
3171
|
+
restartRequired: false,
|
|
3172
|
+
default: DEFAULT_CONFIG.review.freezeAfterPasses,
|
|
3173
|
+
description: "Completed review passes on one task before the blocking bar freezes. From the next pass on, only real " +
|
|
3174
|
+
"defects, regressions and landing blockers can block; further edge cases and hardening ideas become " +
|
|
3175
|
+
"non-blocking suggestions. Default 4. P3 tasks and Easter eggs bundles use the lighter bar from pass 1.",
|
|
3176
|
+
},
|
|
3159
3177
|
{
|
|
3160
3178
|
key: "review.timeoutMinutes",
|
|
3161
3179
|
label: "Review timeout",
|
|
@@ -4304,6 +4322,7 @@ export const SUPPORTED_TOML_KEYS = [
|
|
|
4304
4322
|
"reviewVerification.guardTestCheck",
|
|
4305
4323
|
"reviewVerification.testGlobs",
|
|
4306
4324
|
"review.humanFlagAfterPasses",
|
|
4325
|
+
"review.freezeAfterPasses",
|
|
4307
4326
|
"review.timeoutMinutes",
|
|
4308
4327
|
// Remote validation
|
|
4309
4328
|
"remoteValidation.enabled",
|
package/dist/core/git.d.ts
CHANGED
|
@@ -760,6 +760,84 @@ export declare function isTaskMarkdownBookkeepingPath(path: string, workDir?: st
|
|
|
760
760
|
* report files under `<workDir>/reports/<task-id>/` (#1013).
|
|
761
761
|
*/
|
|
762
762
|
export declare function isTaskBookkeepingPath(path: string, filter?: WorkFileFilter): boolean;
|
|
763
|
+
/**
|
|
764
|
+
* The paths in `paths` that are ANOTHER task's board bookkeeping — a
|
|
765
|
+
* `work/<other-id>-*.md` task file, or a `work/reports/<other-id>/**` file
|
|
766
|
+
* (#1076). These are written into a task worktree by the server (activity/CTO
|
|
767
|
+
* notes, task sync, merges of main) and must never ride a commit made in that
|
|
768
|
+
* worktree: a bare `git commit` folds whatever is staged into the branch, so a
|
|
769
|
+
* checkpoint that only meant to capture the engineer's own work re-commits a
|
|
770
|
+
* sibling task's file, and the branch then fails the landing preflight
|
|
771
|
+
* ("the diff changes another task's bookkeeping").
|
|
772
|
+
*
|
|
773
|
+
* This task's own markdown (`work/<taskId>-*.md`) and its own report directory
|
|
774
|
+
* (`work/reports/<taskId>/**`) are NOT foreign and are never returned.
|
|
775
|
+
* `taskId` is required: without it the caller cannot tell its own file from a
|
|
776
|
+
* sibling's, and every `work/*.md` would look foreign.
|
|
777
|
+
*/
|
|
778
|
+
export declare function foreignTaskBookkeepingPaths(paths: string[], filter: WorkFileFilter & {
|
|
779
|
+
taskId: string;
|
|
780
|
+
}): string[];
|
|
781
|
+
/**
|
|
782
|
+
* Another task's bookkeeping paths already STAGED in `worktree`'s index (#1076).
|
|
783
|
+
*
|
|
784
|
+
* The dirty-file list (`uncommittedWorkFiles`) discounts every `work/` path as
|
|
785
|
+
* generated/runtime, so a foreign `work/<other-id>-*.md` left staged by an
|
|
786
|
+
* earlier `git add -A` is invisible there and survives into the next bare
|
|
787
|
+
* commit. This reads the index directly (`git diff --cached --name-only`), so a
|
|
788
|
+
* commit boundary can reset exactly the foreign paths the index holds.
|
|
789
|
+
*/
|
|
790
|
+
export declare function stagedForeignBookkeepingPaths(worktree: string, filter: WorkFileFilter & {
|
|
791
|
+
taskId: string;
|
|
792
|
+
}): Promise<string[]>;
|
|
793
|
+
/**
|
|
794
|
+
* Restore the branch point's copy of another task's `work/` bookkeeping that a
|
|
795
|
+
* task branch has committed or staged (#1076), so the branch's diff against main
|
|
796
|
+
* is only ever this task's own files.
|
|
797
|
+
*
|
|
798
|
+
* The engine is the same "make main authoritative for foreign task files" rule
|
|
799
|
+
* close-out applies (`resetForeignWorkFiles`): a foreign file the branch
|
|
800
|
+
* modified or deleted gets the branch point's version back, and one the branch
|
|
801
|
+
* newly added is removed. The restore lands as one plain commit — a handoff
|
|
802
|
+
* bookkeeping commit the review tolerates — so a branch that already carries a
|
|
803
|
+
* sibling's file (from a self-check WIP checkpoint, a concurrent board write, or
|
|
804
|
+
* a partial merge of main) can be healed at handoff instead of failing landing.
|
|
805
|
+
*
|
|
806
|
+
* The copy restored is the branch point (the merge-base with `baseBranch`), not
|
|
807
|
+
* `baseBranch`'s tip: the branch's own diff is graded `baseFull..HEAD`, so the
|
|
808
|
+
* branch-point copy is what removes the foreign file from that diff. A board
|
|
809
|
+
* write that landed on main after the branch point is a later, separate change.
|
|
810
|
+
*
|
|
811
|
+
* `baseBranch` is the branch the task diverged from (normally `main`). Returns
|
|
812
|
+
* the repo-relative foreign paths it restored, empty when there were none.
|
|
813
|
+
* Fails soft (`[]`) when the branch point cannot be resolved, so a handoff is
|
|
814
|
+
* never blocked by a repo with no common ancestor.
|
|
815
|
+
*/
|
|
816
|
+
export declare function restoreForeignTaskBookkeepingFromMain(opts: {
|
|
817
|
+
worktree: string;
|
|
818
|
+
baseBranch: string;
|
|
819
|
+
taskId: string;
|
|
820
|
+
/** This task's own task file (repo-relative) — never restored or removed. */
|
|
821
|
+
ownTaskFile: string | null;
|
|
822
|
+
workDir?: string;
|
|
823
|
+
}): Promise<string[]>;
|
|
824
|
+
/**
|
|
825
|
+
* Drop the tracked `dist/` from a task worktree's branch, as one bookkeeping
|
|
826
|
+
* commit, without letting any OTHER task's `work/` bookkeeping ride along
|
|
827
|
+
* (#1076). `dist/` is regenerated from source on main right after the close-out
|
|
828
|
+
* merge, and leaving it tracked makes hashed Vite asset filenames conflict
|
|
829
|
+
* artificially.
|
|
830
|
+
*
|
|
831
|
+
* The commit must stay bare: after `git rm -r --cached -- dist/`, the deletion
|
|
832
|
+
* is untracked in the working tree, so a pathspec commit (`git commit -- dist/`)
|
|
833
|
+
* sees nothing to commit and leaves `dist/` tracked in HEAD (a silent no-op).
|
|
834
|
+
* A bare commit would otherwise fold in whatever the index holds — including a
|
|
835
|
+
* sibling's `work/<other-id>-*.md` staged by a concurrent board write — so the
|
|
836
|
+
* foreign paths are unstaged first. Returns true when a commit was made.
|
|
837
|
+
*/
|
|
838
|
+
export declare function dropDistBeforeMerge(worktree: string, filter: WorkFileFilter & {
|
|
839
|
+
taskId: string;
|
|
840
|
+
}): Promise<boolean>;
|
|
763
841
|
/**
|
|
764
842
|
* The dirty paths on `main` that must block close-out. Task markdown under the
|
|
765
843
|
* work dir is excluded: the publish step checkpoint-commits it when the merge
|
|
@@ -842,6 +920,17 @@ export declare function mergeBranch(root: string, branch: string, opts?: {
|
|
|
842
920
|
dryRun?: boolean;
|
|
843
921
|
/** When true, lockfile-only conflicts are resolved by regenerating the lockfile (#0679). */
|
|
844
922
|
regenerateLockfileConflicts?: boolean;
|
|
923
|
+
/**
|
|
924
|
+
* The task id whose branch is merging. When set, a lockfile-regeneration
|
|
925
|
+
* merge commit unstages any other task's `work/` bookkeeping the index may
|
|
926
|
+
* hold, so a sibling's file can never ride the merge commit (#1076).
|
|
927
|
+
*/
|
|
928
|
+
taskId?: string;
|
|
929
|
+
/** Work/cache dirs for the foreign-bookkeeping filter (#1076). */
|
|
930
|
+
workFileFilter?: {
|
|
931
|
+
workDir?: string;
|
|
932
|
+
cacheDir?: string;
|
|
933
|
+
};
|
|
845
934
|
}): Promise<MergeBranchResult>;
|
|
846
935
|
/**
|
|
847
936
|
* Marker RepoOS tags its own publish-time stash with, so `popPublishStash`
|