refactor(plugin-sdk): split infra runtime barrel

This commit is contained in:
Peter Steinberger
2026-04-27 20:48:09 +01:00
parent d7c3a77b93
commit f0000ab72d
104 changed files with 405 additions and 165 deletions

View File

@@ -21,7 +21,7 @@ afterEach(() => {
});
describe("plugin loader git path regression", () => {
it("loads git-style package extension entries when they import plugin-sdk infra-runtime (#49806)", async () => {
it("loads git-style package extension entries when they import plugin-sdk subpaths (#49806)", async () => {
const copiedExtensionRoot = path.join(makeTempDir(), "extensions", "imessage");
const copiedSourceDir = path.join(copiedExtensionRoot, "src");
const copiedPluginSdkDir = path.join(copiedExtensionRoot, "plugin-sdk");
@@ -31,7 +31,7 @@ describe("plugin loader git path regression", () => {
fs.writeFileSync(jitiBaseFile, "export {};\n", "utf-8");
fs.writeFileSync(
path.join(copiedSourceDir, "channel.runtime.ts"),
`import { resolveOutboundSendDep } from "openclaw/plugin-sdk/infra-runtime";
`import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps";
import { PAIRING_APPROVED_MESSAGE } from "../runtime-api.js";
export const copiedRuntimeMarker = {
@@ -47,7 +47,7 @@ export const copiedRuntimeMarker = {
`,
"utf-8",
);
const copiedChannelRuntimeShim = path.join(copiedPluginSdkDir, "infra-runtime.ts");
const copiedChannelRuntimeShim = path.join(copiedPluginSdkDir, "outbound-send-deps.ts");
fs.writeFileSync(
copiedChannelRuntimeShim,
`export function resolveOutboundSendDep() {
@@ -75,7 +75,7 @@ export const copiedRuntimeMarker = {
tryNative: false,
extensions: [".ts", ".tsx", ".mts", ".cts", ".mtsx", ".ctsx", ".js", ".mjs", ".cjs", ".json"],
alias: {
"openclaw/plugin-sdk/infra-runtime": ${JSON.stringify(copiedChannelRuntimeShim)},
"openclaw/plugin-sdk/outbound-send-deps": ${JSON.stringify(copiedChannelRuntimeShim)},
},
});
const mod = withAlias(${JSON.stringify(copiedChannelRuntime)});