mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
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:
@@ -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();
|
||||
|
||||
@@ -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"]) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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.`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user