Build: isolate optional bundled plugin-sdk clusters

This commit is contained in:
Vincent Koc
2026-03-18 09:54:22 -07:00
parent b4f16bad32
commit 891e2a3da8
10 changed files with 221 additions and 15 deletions

View File

@@ -14,3 +14,17 @@ export const optionalBundledClusters = [
];
export const optionalBundledClusterSet = new Set(optionalBundledClusters);
export const OPTIONAL_BUNDLED_BUILD_ENV = "OPENCLAW_INCLUDE_OPTIONAL_BUNDLED";
export function isOptionalBundledCluster(cluster) {
return optionalBundledClusterSet.has(cluster);
}
export function shouldIncludeOptionalBundledClusters(env = process.env) {
return env[OPTIONAL_BUNDLED_BUILD_ENV] === "1";
}
export function shouldBuildBundledCluster(cluster, env = process.env) {
return shouldIncludeOptionalBundledClusters(env) || !isOptionalBundledCluster(cluster);
}