fix(linux): start Hopper demo sessions headlessly

This commit is contained in:
morluto
2026-07-14 04:58:45 +08:00
parent 08d5b913b0
commit 75818d119e
18 changed files with 816 additions and 169 deletions
+6 -4
View File
@@ -117,7 +117,7 @@ try {
const doctor = json(await run(cli, ["doctor", "--json"], environment));
const supportedSetupHost =
doctor.checks?.find(({ name }) => name === "host")?.ok === true;
const expectedDoctorHealth = supportedSetupHost;
const expectedDoctorHealth = doctor.checks?.every(({ ok }) => ok) === true;
if (
!help.includes("setup") ||
!help.includes("upgrade") ||
@@ -135,6 +135,7 @@ try {
!llms.includes("capabilities") ||
!llms.includes("providers") ||
!llms.includes("inventory-artifact") ||
!supportedSetupHost ||
doctor.healthy !== expectedDoctorHealth ||
doctor.checks?.find(({ name }) => name === "hopper")?.ok !== true
)
@@ -350,9 +351,10 @@ try {
),
);
if (supportedSetupHost) {
const status = process.platform === "linux" ? "needs_human" : "ready";
if (
first.status !== "ready" ||
second.status !== "ready" ||
first.status !== status ||
second.status !== status ||
second.appliedActions.length !== 0
)
throw new Error("packaged setup was not ready and idempotent");
@@ -398,7 +400,7 @@ try {
const recovered = json(
await run(cli, ["setup", "--yes", "--json"], environment),
);
if (recovered.status !== "ready")
if (recovered.status !== status)
throw new Error("packaged setup did not recover");
} else if (
first.status !== "needs_human" ||