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

推荐订阅源

J
Java Code Geeks
Last Week in AI
Last Week in AI
T
Tailwind CSS Blog
WordPress大学
WordPress大学
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
C
Check Point Blog
P
Proofpoint News Feed
H
Help Net Security
月光博客
月光博客
博客园_首页
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
Martin Fowler
Martin Fowler
Recent Announcements
Recent Announcements
人人都是产品经理
人人都是产品经理
U
Unit 42
美团技术团队
I
InfoQ
A
About on SuperTechFans

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(cli): use gateway skills status when available · open...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

@@ -72,6 +72,7 @@ const mocks = vi.hoisted(() => {

7272

return skillStatusReportFixture;

7373

});

7474

return {

75+

callGatewayMock: vi.fn(),

7576

loadConfigMock: vi.fn(() => ({})),

7677

resolveDefaultAgentIdMock: vi.fn((_configForTest: unknown) => "main"),

7778

resolveAgentIdByWorkspacePathMock: vi.fn(

@@ -102,6 +103,7 @@ const mocks = vi.hoisted(() => {

102103

});

103104104105

const {

106+

callGatewayMock,

105107

loadConfigMock,

106108

resolveDefaultAgentIdMock,

107109

resolveAgentIdByWorkspacePathMock,

@@ -169,6 +171,10 @@ vi.mock("../runtime.js", () => ({

169171

defaultRuntime: mocks.defaultRuntime,

170172

}));

171173174+

vi.mock("../gateway/call.js", () => ({

175+

callGateway: (...args: unknown[]) => mocks.callGatewayMock(...args),

176+

}));

177+172178

vi.mock("../utils.js", async (importOriginal) => ({

173179

...(await importOriginal<typeof import("../utils.js")>()),

174180

CONFIG_DIR: "/tmp/openclaw-config",

@@ -250,6 +256,7 @@ describe("skills cli commands", () => {

250256

runtimeLogs.length = 0;

251257

runtimeStdout.length = 0;

252258

runtimeErrors.length = 0;

259+

callGatewayMock.mockReset();

253260

loadConfigMock.mockReset();

254261

resolveDefaultAgentIdMock.mockReset();

255262

resolveAgentIdByWorkspacePathMock.mockReset();

@@ -268,6 +275,7 @@ describe("skills cli commands", () => {

268275

fetchClawHubSkillCardMock.mockReset();

269276

buildWorkspaceSkillStatusMock.mockReset();

270277278+

callGatewayMock.mockRejectedValue(new Error("gateway unavailable"));

271279

loadConfigMock.mockReturnValue({});

272280

resolveDefaultAgentIdMock.mockReturnValue("main");

273281

resolveAgentIdByWorkspacePathMock.mockReturnValue(undefined);

@@ -1195,6 +1203,60 @@ describe("skills cli commands", () => {

11951203

expectStatusWorkspaceCall("/tmp/workspace-writer");

11961204

});

119712051206+

it("uses gateway skills.status for read-only status commands when reachable", async () => {

1207+

routeWorkspaceByAgent();

1208+

const gatewayReport = {

1209+

...skillStatusReportFixture,

1210+

agentId: "writer",

1211+

workspaceDir: "/gateway/workspace-writer",

1212+

skills: [

1213+

{

1214+

...skillStatusReportFixture.skills[0],

1215+

name: "apple-notes",

1216+

description: "Notes helpers",

1217+

eligible: true,

1218+

modelVisible: true,

1219+

commandVisible: true,

1220+

requirements: {

1221+

bins: ["memo"],

1222+

anyBins: [],

1223+

env: [],

1224+

config: [],

1225+

os: ["darwin"],

1226+

},

1227+

missing: {

1228+

bins: [],

1229+

anyBins: [],

1230+

env: [],

1231+

config: [],

1232+

os: [],

1233+

},

1234+

},

1235+

],

1236+

};

1237+

callGatewayMock.mockResolvedValue(gatewayReport);

1238+1239+

await runCommand(["skills", "check", "--agent", "writer", "--json"]);

1240+1241+

expect(callGatewayMock).toHaveBeenCalledWith({

1242+

config: {},

1243+

method: "skills.status",

1244+

params: { agentId: "writer" },

1245+

timeoutMs: 1_500,

1246+

clientName: "cli",

1247+

mode: "cli",

1248+

});

1249+

expect(buildWorkspaceSkillStatusMock).not.toHaveBeenCalled();

1250+

const output = JSON.parse(runtimeStdout.at(-1) ?? "{}") as {

1251+

workspaceDir?: string;

1252+

eligible?: string[];

1253+

missingRequirements?: Array<{ name: string }>;

1254+

};

1255+

expect(output.workspaceDir).toBe("/gateway/workspace-writer");

1256+

expect(output.eligible).toEqual(["apple-notes"]);

1257+

expect(output.missingRequirements).toEqual([]);

1258+

});

1259+11981260

it.each([

11991261

["list", ["skills", "list", "--agent", "writer", "--json"]],

12001262

["info", ["skills", "info", "calendar", "--agent", "writer", "--json"]],