Skip to content

Commit 229851d

Browse files
committed
fix(gateway): resolve plugin-registered methods through live registry in gateway call dispatcher
When a plugin registers a gateway RPC method via registerGatewayMethod(), the method is added to the active plugin registry correctly (visible via plugins inspect --runtime). However, openclaw gateway call <method> returns INVALID_REQUEST: unknown method because handleGatewayRequest() used a cached method registry built at startup time, which didn't include plugin methods registered after gateway initialization. Fix: Always build the per-request method registry from the live active plugin registry via createRequestGatewayMethodRegistry(), which reads from getPluginRegistryState().activeRegistry. This ensures hot-loaded plugin gateway methods are discoverable without requiring a gateway restart. Closes #94127
1 parent 47cad60 commit 229851d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/gateway/server-methods.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,7 @@ export async function handleGatewayRequest(
630630
opts: GatewayRequestOptions & { extraHandlers?: GatewayRequestHandlers },
631631
): Promise<void> {
632632
const { req, respond, client, isWebchatConnect, context } = opts;
633-
const methodRegistry =
634-
opts.methodRegistry ?? createRequestGatewayMethodRegistry(opts.extraHandlers);
633+
const methodRegistry = createRequestGatewayMethodRegistry(opts.extraHandlers);
635634
const authError = authorizeGatewayMethod(req.method, client, req.params);
636635
if (authError) {
637636
respond(false, undefined, authError);

0 commit comments

Comments
 (0)