import fs from "node:fs"; import os from "node:os"; import path from "node:path"; import { fileURLToPath } from "node:url"; import { resolveOpenClawPackageRootSync } from "../infra/openclaw-root.js"; import { normalizeOptionalLowercaseString } from "../shared/string-coerce.js"; import { resolveUserPath } from "../utils.js";
function bundledPluginsDisabled(env: NodeJS.ProcessEnv): boolean { const raw = normalizeOptionalLowercaseString(env.OPENCLAW_DISABLE_BUNDLED_PLUGINS); return raw === "1" || raw === "true";
}
// bun --compile: ship a sibling bundled plugin tree next to the executable. try { const execDir = path.dirname(process.execPath); const siblingBuilt = path.join(execDir, "dist", "extensions"); if (fs.existsSync(siblingBuilt)) { return siblingBuilt;
} const sibling = path.join(execDir, "extensions"); if (fs.existsSync(sibling)) { return sibling;
}
} catch { // ignore
}
// npm/dev: walk up from this module to find the bundled plugin tree at the package root. try {
let cursor = path.dirname(fileURLToPath(import.meta.url)); for (let i = 0; i < 6; i += 1) { const candidate = path.join(cursor, "extensions"); if (fs.existsSync(candidate)) { return candidate;
} const parent = path.dirname(cursor); if (parent === cursor) { break;
}
cursor = parent;
}
} catch { // ignore
}
return undefined;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-06-09)
¤
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.