import path from "node:path"; import type { OpenClawConfig } from "../config/types.openclaw.js"; import { evaluateEntryRequirementsForCurrentPlatform } from "../shared/entry-status.js"; import type { RequirementConfigCheck, Requirements } from "../shared/requirements.js"; import { CONFIG_DIR } from "../utils.js"; import { hasBinary, isConfigPathTruthy } from "./config.js"; import {
resolveHookConfig,
resolveHookEnableState,
resolveHookEntries,
type HookEnableStateReason,
} from "./policy.js"; import type { HookEligibilityContext, HookEntry, HookInstallSpec } from "./types.js"; import { loadWorkspaceHookEntries } from "./workspace.js";
export type HookStatusConfigCheck = RequirementConfigCheck;
function resolveHookKey(entry: HookEntry): string { return entry.metadata?.hookKey ?? entry.hook.name;
}
function normalizeInstallOptions(entry: HookEntry): HookInstallOption[] { const install = entry.metadata?.install ?? []; if (install.length === 0) { return [];
}
// For hooks, we just list all install options return install.map((spec, index) => { const id = (spec.id ?? `${spec.kind}-${index}`).trim(); const bins = spec.bins ?? [];
let label = (spec.label ?? "").trim();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.