The stable and dogfood OpenClaw source pins need different public-surface hardlink patch shapes while upstream is still catching up. Select the right patch per source and make package contents import the OpenAI provider policy public surface, which is the path the gateway uses before a model run. Tests: nix fmt --accept-flake-config; git diff --check; remote mac-mini nix build .#checks.aarch64-darwin.package-contents-dogfood --no-link; remote mac-mini nix build .#checks.aarch64-darwin.package-contents --no-link Co-authored-by: Codex <noreply@openai.com>
21 lines
931 B
Diff
21 lines
931 B
Diff
diff --git a/src/plugins/public-surface-loader.ts b/src/plugins/public-surface-loader.ts
|
|
index 1f5b5ab..a08ef8a 100644
|
|
--- a/src/plugins/public-surface-loader.ts
|
|
+++ b/src/plugins/public-surface-loader.ts
|
|
@@ -124,8 +124,12 @@ export function loadBundledPluginPublicArtifactModuleSync<T extends object>(para
|
|
- const opened = openBoundaryFileSync({
|
|
+ const packageRoot = path.resolve(OPENCLAW_PACKAGE_ROOT);
|
|
+ const resolvedModulePath = path.resolve(location.modulePath);
|
|
+ const isPackagePublicSurface = resolvedModulePath.startsWith(`${packageRoot}${path.sep}`);
|
|
+
|
|
+ const opened = openBoundaryFileSync({
|
|
absolutePath: location.modulePath,
|
|
rootPath: location.boundaryRoot,
|
|
boundaryLabel:
|
|
location.boundaryRoot === OPENCLAW_PACKAGE_ROOT ? "OpenClaw package root" : "plugin root",
|
|
- rejectHardlinks: true,
|
|
+ rejectHardlinks: !isPackagePublicSurface,
|
|
});
|
|
if (!opened.ok) {
|
|
throw new Error(
|