Skip to content

Commit f175f07

Browse files
committed
fix(qqbot): load bridge entries through sidecars
1 parent e3efd3b commit f175f07

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Narrow bridge entrypoint for qqbot registerFull composition.
2+
export { registerQQBotFull } from "./src/bridge/channel-entry.js";

extensions/qqbot/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ function registerQQBotFull(api: OpenClawPluginApi): void {
1010
const registerTools = loadBundledEntryExportSync<(api: OpenClawPluginApi) => void>(
1111
import.meta.url,
1212
{
13-
specifier: "./src/bridge/tools/index.js",
13+
specifier: "./tools-api.js",
1414
exportName: "registerQQBotTools",
1515
},
1616
);
1717
registerTools(api);
1818
return;
1919
}
2020
const register = loadBundledEntryExportSync<(api: OpenClawPluginApi) => void>(import.meta.url, {
21-
specifier: "./src/bridge/channel-entry.js",
21+
specifier: "./channel-entry-api.js",
2222
exportName: "registerQQBotFull",
2323
});
2424
register(api);

extensions/qqbot/tools-api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Narrow tool-discovery entrypoint for qqbot tools.
2+
export { registerQQBotTools } from "./src/bridge/tools/index.js";

test/plugin-npm-runtime-build.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ describe("plugin npm runtime build planning", () => {
5858
const qqbotRuntimePlan = expectPluginNpmRuntimeBuildPlan(qqbotPlan);
5959
expect(qqbotRuntimePlan.entry).toEqual({
6060
api: path.join(repoRoot, "extensions", "qqbot", "api.ts"),
61+
"channel-entry-api": path.join(repoRoot, "extensions", "qqbot", "channel-entry-api.ts"),
6162
"channel-plugin-api": path.join(repoRoot, "extensions", "qqbot", "channel-plugin-api.ts"),
6263
index: path.join(repoRoot, "extensions", "qqbot", "index.ts"),
6364
"runtime-api": path.join(repoRoot, "extensions", "qqbot", "runtime-api.ts"),
6465
"secret-contract-api": path.join(repoRoot, "extensions", "qqbot", "secret-contract-api.ts"),
6566
"setup-entry": path.join(repoRoot, "extensions", "qqbot", "setup-entry.ts"),
6667
"setup-plugin-api": path.join(repoRoot, "extensions", "qqbot", "setup-plugin-api.ts"),
68+
"tools-api": path.join(repoRoot, "extensions", "qqbot", "tools-api.ts"),
6769
});
6870
expect(qqbotRuntimePlan.runtimeExtensions).toEqual(["./dist/index.js"]);
6971
expect(qqbotRuntimePlan.runtimeSetupEntry).toBe("./dist/setup-entry.js");

0 commit comments

Comments
 (0)