Files
openclaw/scripts/lib/root-package-bundled-plugin-excludes.mjs
Peter Steinberger 12d0fd2ef8 refactor(anthropic): replace handwritten Claude sessions with Agent SDK (#128131)
* refactor(anthropic): explore official Claude Agent SDK runtime

* refactor(anthropic): replace handwritten Claude sessions with SDK

* refactor(anthropic): collapse SDK live-session ownership

* refactor(anthropic): simplify SDK ownership and preserve live skills

* fix(anthropic): fence cancelled SDK runs before process startup

* fix(anthropic): harden SDK approvals, lifecycle, and packaging

* refactor(anthropic): own SDK process trees and streamline runtime

* fix(anthropic): repair rebased packaging and legacy test fixtures
2026-08-24 01:59:16 -07:00

24 lines
726 B
JavaScript

import fs from "node:fs";
import path from "node:path";
/** Collect bundled plugin directories excluded from the root package artifact. */
export function collectRootPackageExcludedExtensionDirs(params = {}) {
const packageJsonPath = path.join(params.cwd ?? process.cwd(), "package.json");
const excluded = new Set();
if (!fs.existsSync(packageJsonPath)) {
return excluded;
}
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
for (const entry of packageJson.files ?? []) {
if (typeof entry !== "string") {
continue;
}
const match = /^!dist\/extensions\/([^/]+)\/\*\*$/u.exec(entry);
if (match?.[1]) {
excluded.add(match[1]);
}
}
return excluded;
}