fix: stabilize contract loader seams

This commit is contained in:
Peter Steinberger
2026-04-06 04:39:22 +01:00
parent 4a690b452a
commit 4aeabf95cc
7 changed files with 40 additions and 85 deletions

View File

@@ -1,11 +1,19 @@
// Manual facade. Keep loader boundary explicit.
type FacadeModule = typeof import("@openclaw/mattermost/api.js");
type MattermostSenderAllowed = (params: {
senderId: string;
senderName?: string;
allowFrom: string[];
allowNameMatching?: boolean;
}) => boolean;
type FacadeModule = {
isMattermostSenderAllowed: MattermostSenderAllowed;
};
import { loadBundledPluginPublicSurfaceModuleSync } from "./facade-runtime.js";
function loadFacadeModule(): FacadeModule {
return loadBundledPluginPublicSurfaceModuleSync<FacadeModule>({
dirName: "mattermost",
artifactBasename: "api.js",
artifactBasename: "policy-api.js",
});
}
export const isMattermostSenderAllowed: FacadeModule["isMattermostSenderAllowed"] = ((...args) =>