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
923 B
Diff
21 lines
923 B
Diff
diff --git a/src/plugins/public-surface-loader.ts b/src/plugins/public-surface-loader.ts
|
|
index 5f6f939..b8d27c8 100644
|
|
--- a/src/plugins/public-surface-loader.ts
|
|
+++ b/src/plugins/public-surface-loader.ts
|
|
@@ -133,8 +133,12 @@ export function loadBundledPluginPublicArtifactModuleSync<T extends object>(para
|
|
- const opened = openRootFileSync({
|
|
+ const packageRoot = path.resolve(OPENCLAW_PACKAGE_ROOT);
|
|
+ const resolvedModulePath = path.resolve(location.modulePath);
|
|
+ const isPackagePublicSurface = resolvedModulePath.startsWith(`${packageRoot}${path.sep}`);
|
|
+
|
|
+ const opened = openRootFileSync({
|
|
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(
|