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

推荐订阅源

V
Visual Studio Blog
爱范儿
爱范儿
GbyAI
GbyAI
博客园 - 叶小钗
Last Week in AI
Last Week in AI
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
C
Check Point Blog
H
Help Net Security
P
Proofpoint News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
B
Blog RSS Feed
Y
Y Combinator Blog
U
Unit 42
T
Tailwind CSS Blog
MyScale Blog
MyScale Blog
N
Netflix TechBlog - Medium
S
SegmentFault 最新的问题
J
Java Code Geeks
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

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
test(plugins): cover Link agent wallet bundle shape (#751...
stainlu · 2026-05-31 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -39,6 +39,26 @@ describe("agent bundle MCP names", () => {

3939

expect(safeToolName).toBe(`memory${TOOL_NAME_SEPARATOR}status-2`);

4040

});

4141
42+

it("uses the bundle server name for Link MCP tools", () => {

43+

const usedServerNames = new Set<string>();

44+

const serverName = sanitizeServerName("link", usedServerNames);

45+
46+

expect(

47+

buildSafeToolName({

48+

serverName,

49+

toolName: "auth_login",

50+

reservedNames: new Set(),

51+

}),

52+

).toBe(`link${TOOL_NAME_SEPARATOR}auth_login`);

53+

expect(

54+

buildSafeToolName({

55+

serverName,

56+

toolName: "spend-request_create",

57+

reservedNames: new Set(),

58+

}),

59+

).toBe(`link${TOOL_NAME_SEPARATOR}spend-request_create`);

60+

});

61+
4262

it("truncates overlong tool names while keeping the server prefix", () => {

4363

const safeToolName = buildSafeToolName({

4464

serverName: "memory",

Original file line numberDiff line numberDiff line change

@@ -327,6 +327,54 @@ describe("bundle manifest parsing", () => {

327327

});

328328

});

329329
330+

it("detects Link-style Codex bundles with skills and MCP servers", () => {

331+

const rootDir = makeTempDir();

332+

setupBundleFixture({

333+

rootDir,

334+

dirs: [".codex-plugin", "skills/create-payment-credential"],

335+

textFiles: {

336+

".mcp.json": JSON.stringify({

337+

mcpServers: {

338+

link: {

339+

command: "pnpx",

340+

args: ["@stripe/link-cli", "--mcp"],

341+

},

342+

},

343+

}),

344+

},

345+

manifestRelativePath: CODEX_BUNDLE_MANIFEST_RELATIVE_PATH,

346+

manifest: {

347+

name: "link",

348+

version: "0.2.1",

349+

description: "Secure, one-time-use payment credentials from Link",

350+

homepage: "https://link.com/agents",

351+

repository: "https://github.com/stripe/link-cli",

352+

skills: "./skills/",

353+

mcpServers: "./.mcp.json",

354+

interface: {

355+

displayName: "Link",

356+

category: "Finance",

357+

},

358+

},

359+

});

360+
361+

expectBundleManifest({

362+

rootDir,

363+

bundleFormat: "codex",

364+

expected: {

365+

id: "link",

366+

name: "link",

367+

version: "0.2.1",

368+

description: "Secure, one-time-use payment credentials from Link",

369+

bundleFormat: "codex",

370+

skills: ["./skills/"],

371+

settingsFiles: [],

372+

hooks: [],

373+

capabilities: expect.arrayContaining(["skills", "mcpServers"]),

374+

},

375+

});

376+

});

377+
330378

it.each([

331379

{

332380

name: "accepts JSON5 Codex bundle manifests",

Original file line numberDiff line numberDiff line change

@@ -20,10 +20,23 @@ export function createBundleMcpTempHarness() {

2020

};

2121

}

2222
23-

function resolveBundlePluginRoot(homeDir: string, pluginId: string) {

23+

export function resolveBundlePluginRoot(homeDir: string, pluginId: string) {

2424

return path.join(homeDir, ".openclaw", "extensions", pluginId);

2525

}

2626
27+

export async function writeBundleTextFiles(

28+

pluginRoot: string,

29+

files: Record<string, string>,

30+

): Promise<void> {

31+

await Promise.all(

32+

Object.entries(files).map(async ([relativePath, content]) => {

33+

const filePath = path.join(pluginRoot, relativePath);

34+

await fs.mkdir(path.dirname(filePath), { recursive: true });

35+

await fs.writeFile(filePath, content, "utf-8");

36+

}),

37+

);

38+

}

39+
2740

export async function writeClaudeBundleManifest(params: {

2841

homeDir: string;

2942

pluginId: string;

Original file line numberDiff line numberDiff line change

@@ -10,7 +10,9 @@ import {

1010

createBundleMcpTempHarness,

1111

createBundleProbePlugin,

1212

withBundleHomeEnv,

13+

writeBundleTextFiles,

1314

writeClaudeBundleManifest,

15+

resolveBundlePluginRoot,

1416

} from "./bundle-mcp.test-support.js";

1517
1618

function getServerArgs(value: unknown): unknown[] | undefined {

@@ -261,6 +263,53 @@ describe("loadEnabledBundleMcpConfig", () => {

261263

);

262264

});

263265
266+

it("loads Link-style Codex bundle MCP config", async () => {

267+

await withBundleHomeEnv(

268+

tempHarness,

269+

"openclaw-bundle-link",

270+

async ({ homeDir, workspaceDir }) => {

271+

const pluginRoot = resolveBundlePluginRoot(homeDir, "link");

272+

await writeBundleTextFiles(pluginRoot, {

273+

".codex-plugin/plugin.json": `${JSON.stringify(

274+

{

275+

name: "link",

276+

skills: "./skills/",

277+

mcpServers: "./.mcp.json",

278+

},

279+

null,

280+

2,

281+

)}\n`,

282+

".mcp.json": `${JSON.stringify(

283+

{

284+

mcpServers: {

285+

link: {

286+

command: "pnpx",

287+

args: ["@stripe/link-cli", "--mcp"],

288+

},

289+

},

290+

},

291+

null,

292+

2,

293+

)}\n`,

294+

});

295+
296+

const loaded = loadEnabledBundleMcpConfig({

297+

workspaceDir,

298+

cfg: createEnabledBundleConfig(["link"]),

299+

});

300+

const loadedServer = loaded.config.mcpServers.link;

301+
302+

expectNoDiagnostics(loaded.diagnostics);

303+

expect(isRecord(loadedServer) ? loadedServer.command : undefined).toBe("pnpx");

304+

expect(getServerArgs(loadedServer)).toEqual(["@stripe/link-cli", "--mcp"]);

305+

await expectResolvedPathEqual(

306+

isRecord(loadedServer) ? loadedServer.cwd : undefined,

307+

pluginRoot,

308+

);

309+

},

310+

);

311+

});

312+
264313

it("reports malformed file-backed MCP configs instead of silently dropping servers", async () => {

265314

await withBundleHomeEnv(

266315

tempHarness,

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,9 @@

11

import { describe, expect, it } from "vitest";

2-

import { resolveOpenClawMetadata, resolveSkillInvocationPolicy } from "./frontmatter.js";

2+

import {

3+

parseFrontmatter,

4+

resolveOpenClawMetadata,

5+

resolveSkillInvocationPolicy,

6+

} from "./frontmatter.js";

37
48

describe("resolveSkillInvocationPolicy", () => {

59

it("defaults to enabled behaviors", () => {

@@ -64,4 +68,53 @@ describe("resolveOpenClawMetadata install validation", () => {

6468

});

6569

expect(install).toBeUndefined();

6670

});

71+
72+

it("parses Link-style YAML metadata with node install hints", () => {

73+

const frontmatter = parseFrontmatter(`---

74+

name: create-payment-credential

75+

description: |

76+

Gets secure, one-time-use payment credentials from a Link wallet so agents can complete purchases.

77+

allowed-tools:

78+

- Bash(link-cli:*)

79+

- Bash(npx:*)

80+

version: 0.0.1

81+

metadata:

82+

author: stripe

83+

url: link.com/agents

84+

openclaw:

85+

homepage: https://link.com/agents

86+

requires:

87+

bins:

88+

- link-cli

89+

install:

90+

- kind: node

91+

package: "@stripe/link-cli"

92+

bins: [link-cli]

93+

user-invocable: true

94+

---

95+

# Creating Payment Credentials

96+

`);

97+
98+

const metadata = resolveOpenClawMetadata(frontmatter);

99+
100+

expect(frontmatter.name).toBe("create-payment-credential");

101+

expect(frontmatter.description).toContain("one-time-use payment credentials");

102+

expect(resolveSkillInvocationPolicy(frontmatter).userInvocable).toBe(true);

103+

expect(metadata).toEqual({

104+

homepage: "https://link.com/agents",

105+

requires: {

106+

bins: ["link-cli"],

107+

anyBins: [],

108+

env: [],

109+

config: [],

110+

},

111+

install: [

112+

{

113+

kind: "node",

114+

package: "@stripe/link-cli",

115+

bins: ["link-cli"],

116+

},

117+

],

118+

});

119+

});

67120

});