feat: install GitHub-backed ClawHub skills (#90478)

* feat: install GitHub-backed ClawHub skills

* fix: satisfy ClawHub install type checks

* fix: harden github-backed skill installs

* fix: keep heartbeat template non-actionable

* feat: support forcing pending ClawHub installs
This commit is contained in:
Patrick Erichsen
2026-06-04 19:10:02 -07:00
committed by GitHub
parent 5380d11977
commit 8f85f94946
14 changed files with 1029 additions and 179 deletions

View File

@@ -90,9 +90,9 @@ function readAuthProfileStoreText(agentDir) {
let db;
try {
db = new DatabaseSync(dbPath, { readOnly: true });
const row = db.prepare("SELECT store_json FROM auth_profile_store WHERE store_key = ?").get(
"primary",
);
const row = db
.prepare("SELECT store_json FROM auth_profile_store WHERE store_key = ?")
.get("primary");
return typeof row?.store_json === "string" ? row.store_json : "";
} finally {
db?.close();

View File

@@ -224,11 +224,14 @@ function handleParentSignal(signal) {
terminateChildGroup("SIGKILL");
rethrowParentSignal(signal);
}, timeoutKillGraceMs);
parentSignalPollTimer = setInterval(() => {
if (!childGroupExists()) {
rethrowParentSignal(signal);
}
}, Math.min(50, timeoutKillGraceMs));
parentSignalPollTimer = setInterval(
() => {
if (!childGroupExists()) {
rethrowParentSignal(signal);
}
},
Math.min(50, timeoutKillGraceMs),
);
}
for (const signal of ["SIGHUP", "SIGINT", "SIGTERM"]) {

View File

@@ -125,9 +125,12 @@ function readBody(req) {
}
function requestBodyTooLargeError() {
return Object.assign(new Error(`ClickClack fixture request body exceeded ${requestMaxBytes} bytes`), {
code: "ETOOBIG",
});
return Object.assign(
new Error(`ClickClack fixture request body exceeded ${requestMaxBytes} bytes`),
{
code: "ETOOBIG",
},
);
}
function isRequestBodyTooLargeError(error) {

View File

@@ -7,14 +7,7 @@ import { chromium } from "playwright";
import { resolvePnpmRunner } from "./pnpm-runner.mjs";
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
const playwrightInstallArgs = [
"--dir",
"ui",
"exec",
"playwright",
"install",
"chromium",
];
const playwrightInstallArgs = ["--dir", "ui", "exec", "playwright", "install", "chromium"];
const playwrightInstallWithDepsArgs = [
"--dir",
"ui",
@@ -123,10 +116,7 @@ export function ensurePlaywrightChromium(options = {}) {
const systemExecutablePath =
options.systemExecutablePath ?? resolveSystemChromiumExecutablePath(existsSync, spawnSync);
if (
systemExecutablePath &&
canRunChromiumExecutable(systemExecutablePath, spawnSync)
) {
if (systemExecutablePath && canRunChromiumExecutable(systemExecutablePath, spawnSync)) {
log(`[ui-e2e] Using system Chromium at ${systemExecutablePath}.`);
return 0;
}
@@ -157,11 +147,13 @@ export function ensurePlaywrightChromium(options = {}) {
}
if (!existsSync(executablePath) || !canRunChromiumExecutable(executablePath, spawnSync)) {
if (shouldInstallPlaywrightSystemDependencies({
env,
getuid: options.getuid,
platform: options.platform,
})) {
if (
shouldInstallPlaywrightSystemDependencies({
env,
getuid: options.getuid,
platform: options.platform,
})
) {
log(
`[ui-e2e] Chromium is installed but still cannot start; installing Linux system dependencies.`,
);