惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
博客园 - Franky
MyScale Blog
MyScale Blog
L
LangChain Blog
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
Stack Overflow Blog
Stack Overflow Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
量子位
A
About on SuperTechFans
C
Check Point Blog
大猫的无限游戏
大猫的无限游戏
Last Week in AI
Last Week in AI
小众软件
小众软件
Apple Machine Learning Research
Apple Machine Learning Research
I
InfoQ
V
Visual Studio Blog
Vercel News
Vercel News
B
Blog
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
U
Unit 42

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(gateway): preserve advertised method ordering · openc...
steipete · 2026-05-15 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -70,9 +70,7 @@ function normalizeDescriptor(input: GatewayMethodDescriptorInput): GatewayMethod

7070

export function createGatewayMethodRegistry(

7171

inputs: readonly GatewayMethodDescriptorInput[],

7272

): GatewayMethodRegistry {

73-

const descriptors = inputs

74-

.map(normalizeDescriptor)

75-

.toSorted((left, right) => left.name.localeCompare(right.name));

73+

const descriptors = inputs.map(normalizeDescriptor);

7674

const byName = new Map<string, GatewayMethodDescriptor>();

7775

for (const descriptor of descriptors) {

7876

if (byName.has(descriptor.name)) {

Original file line numberDiff line numberDiff line change

@@ -22,6 +22,24 @@ describe("listGatewayMethods", () => {

2222

expect(methods).not.toContain("sessions.usage");

2323

});

2424
25+

it("preserves the legacy advertised method order", () => {

26+

const methods = listGatewayMethods();

27+

expect(methods.slice(0, 5)).toEqual([

28+

"health",

29+

"diagnostics.stability",

30+

"doctor.memory.status",

31+

"doctor.memory.dreamDiary",

32+

"doctor.memory.backfillDreamDiary",

33+

]);

34+

expect(methods.slice(32, 37)).toEqual([

35+

"exec.approvals.get",

36+

"exec.approvals.set",

37+

"exec.approvals.node.get",

38+

"exec.approvals.node.set",

39+

"exec.approval.get",

40+

]);

41+

});

42+
2543

it("advertises the versioned Talk session RPCs", () => {

2644

const methods = listGatewayMethods();

2745

expect(methods).toContain("talk.client.create");

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,6 @@

11

import { listLoadedChannelPlugins } from "../channels/plugins/registry-loaded.js";

22

import { GATEWAY_EVENT_UPDATE_AVAILABLE } from "./events.js";

3+

import { CORE_ADVERTISED_GATEWAY_METHODS } from "./methods/legacy-metadata.js";

34

import {

45

createCoreGatewayMethodDescriptors,

56

createGatewayMethodRegistry,

@@ -13,9 +14,10 @@ type GatewayMethodChannelPlugin = {

1314

};

1415
1516

export function listCoreGatewayMethods(): string[] {

16-

return createGatewayMethodRegistry(

17+

const registry = createGatewayMethodRegistry(

1718

createCoreGatewayMethodDescriptors(coreGatewayHandlers),

18-

).listAdvertisedMethods();

19+

);

20+

return [...CORE_ADVERTISED_GATEWAY_METHODS].filter((method) => registry.getHandler(method));

1921

}

2022
2123

function listChannelGatewayMethods(): string[] {

@@ -30,8 +32,12 @@ function listChannelGatewayMethods(): string[] {

3032

}

3133
3234

export function listGatewayMethods(): string[] {

35+

const advertisedBaseMethods = new Set([...listCoreGatewayMethods(), ...GATEWAY_AUX_METHODS]);

36+

const baseMethods = [...CORE_ADVERTISED_GATEWAY_METHODS].filter((method) =>

37+

advertisedBaseMethods.has(method),

38+

);

3339

return Array.from(

34-

new Set([...listCoreGatewayMethods(), ...GATEWAY_AUX_METHODS, ...listChannelGatewayMethods()]),

40+

new Set([...baseMethods, ...GATEWAY_AUX_METHODS, ...listChannelGatewayMethods()]),

3541

);

3642

}

3743
Original file line numberDiff line numberDiff line change

@@ -57,6 +57,7 @@ import {

5757

import { createAuthRateLimiter, type AuthRateLimiter } from "./auth-rate-limit.js";

5858

import { resolveGatewayAuth } from "./auth.js";

5959

import { ADMIN_SCOPE } from "./method-scopes.js";

60+

import { CORE_ADVERTISED_GATEWAY_METHODS } from "./methods/legacy-metadata.js";

6061

import {

6162

createCoreGatewayMethodDescriptors,

6263

createGatewayMethodDescriptorsFromHandlers,

@@ -1107,13 +1108,20 @@ export async function startGatewayServer(

11071108

}),

11081109

]);

11091110

let attachedGatewayMethodRegistry = buildAttachedGatewayMethodRegistry(pluginRegistry);

1110-

const listAttachedGatewayMethods = () =>

1111-

Array.from(

1112-

new Set([

1113-

...attachedGatewayMethodRegistry.listAdvertisedMethods(),

1114-

...listStartupChannelGatewayMethods(),

1115-

]),

1111+

const listAttachedGatewayMethods = () => {

1112+

const advertisedMethods = attachedGatewayMethodRegistry.listAdvertisedMethods();

1113+

const advertisedSet = new Set(advertisedMethods);

1114+

const methods = [...CORE_ADVERTISED_GATEWAY_METHODS].filter((method) =>

1115+

advertisedSet.has(method),

11161116

);

1117+

for (const method of advertisedMethods) {

1118+

if (!CORE_ADVERTISED_GATEWAY_METHODS.has(method)) {

1119+

methods.push(method);

1120+

}

1121+

}

1122+

methods.push(...listStartupChannelGatewayMethods());

1123+

return Array.from(new Set(methods));

1124+

};

11171125

runtimeState.gatewayMethods.splice(

11181126

0,

11191127

runtimeState.gatewayMethods.length,