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

推荐订阅源

Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
V
V2EX
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
A
About on SuperTechFans
博客园_首页
L
LangChain Blog
量子位
雷峰网
雷峰网
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Jina AI
Jina AI
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium

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
refactor(plugins): dedupe install test fixtures · opencla...
vincentkoc · 2026-06-18 · via Recent Commits to openclaw:main

@@ -26,6 +26,10 @@ import {

2626

} from "./install.js";

2727

import { packToArchive } from "./test-helpers/archive-fixtures.js";

2828

import { createSuiteTempRootTracker } from "./test-helpers/fs-fixtures.js";

29+

import {

30+

createBundleInstallFixtureFactory,

31+

createDualFormatInstallFixtureFactory,

32+

} from "./test-helpers/install-fixtures.js";

29333034

vi.mock("../process/exec.js", () => ({

3135

runCommandWithTimeout: vi.fn(),

@@ -63,6 +67,12 @@ const dynamicArchiveTemplatePathCache = new Map<string, string>();

6367

let installPluginFromDirTemplateDir = "";

6468

let manifestInstallTemplateDir = "";

6569

const suiteTempRootTracker = createSuiteTempRootTracker("openclaw-plugin-install");

70+

const setupBundleInstallFixture = createBundleInstallFixtureFactory(

71+

suiteTempRootTracker.makeTempDir,

72+

);

73+

const setupDualFormatInstallFixture = createDualFormatInstallFixtureFactory(

74+

suiteTempRootTracker.makeTempDir,

75+

);

6676

let previousNpmGlobalConfig: string | undefined;

6777

let npmGlobalConfigPath = "";

6878

let archiveDepsInstallCase: {

@@ -613,49 +623,6 @@ function expectInstalledFiles(targetDir: string, expectedFiles: readonly string[

613623

});

614624

}

615625616-

function setupBundleInstallFixture(params: {

617-

bundleFormat: "codex" | "claude" | "cursor";

618-

name: string;

619-

}) {

620-

const caseDir = suiteTempRootTracker.makeTempDir();

621-

const stateDir = path.join(caseDir, "state");

622-

const pluginDir = path.join(caseDir, "plugin-src");

623-

fs.mkdirSync(stateDir, { recursive: true });

624-

fs.mkdirSync(path.join(pluginDir, "skills"), { recursive: true });

625-

const manifestDir = path.join(

626-

pluginDir,

627-

params.bundleFormat === "codex"

628-

? ".codex-plugin"

629-

: params.bundleFormat === "cursor"

630-

? ".cursor-plugin"

631-

: ".claude-plugin",

632-

);

633-

fs.mkdirSync(manifestDir, { recursive: true });

634-

fs.writeFileSync(

635-

path.join(manifestDir, "plugin.json"),

636-

JSON.stringify({

637-

name: params.name,

638-

description: `${params.bundleFormat} bundle fixture`,

639-

...(params.bundleFormat === "codex" ? { skills: "skills" } : {}),

640-

}),

641-

"utf-8",

642-

);

643-

if (params.bundleFormat === "cursor") {

644-

fs.mkdirSync(path.join(pluginDir, ".cursor", "commands"), { recursive: true });

645-

fs.writeFileSync(

646-

path.join(pluginDir, ".cursor", "commands", "review.md"),

647-

"---\ndescription: fixture\n---\n",

648-

"utf-8",

649-

);

650-

}

651-

fs.writeFileSync(

652-

path.join(pluginDir, "skills", "SKILL.md"),

653-

"---\ndescription: fixture\n---\n",

654-

"utf-8",

655-

);

656-

return { pluginDir, extensionsDir: path.join(stateDir, "extensions") };

657-

}

658-659626

function setupManifestlessClaudeInstallFixture() {

660627

const caseDir = suiteTempRootTracker.makeTempDir();

661628

const stateDir = path.join(caseDir, "state");

@@ -671,49 +638,6 @@ function setupManifestlessClaudeInstallFixture() {

671638

return { pluginDir, extensionsDir: path.join(stateDir, "extensions") };

672639

}

673640674-

function setupDualFormatInstallFixture(params: { bundleFormat: "codex" | "claude" }) {

675-

const caseDir = suiteTempRootTracker.makeTempDir();

676-

const stateDir = path.join(caseDir, "state");

677-

const pluginDir = path.join(caseDir, "plugin-src");

678-

fs.mkdirSync(path.join(pluginDir, "dist"), { recursive: true });

679-

fs.mkdirSync(path.join(pluginDir, "skills"), { recursive: true });

680-

const manifestDir = path.join(

681-

pluginDir,

682-

params.bundleFormat === "codex" ? ".codex-plugin" : ".claude-plugin",

683-

);

684-

fs.mkdirSync(manifestDir, { recursive: true });

685-

fs.writeFileSync(

686-

path.join(pluginDir, "package.json"),

687-

JSON.stringify({

688-

name: "@openclaw/native-dual",

689-

version: "0.0.1",

690-

openclaw: { extensions: ["./dist/index.js"] },

691-

dependencies: { "left-pad": "1.3.0" },

692-

}),

693-

"utf-8",

694-

);

695-

fs.writeFileSync(

696-

path.join(pluginDir, "openclaw.plugin.json"),

697-

JSON.stringify({

698-

id: "native-dual",

699-

configSchema: { type: "object", properties: {} },

700-

skills: ["skills"],

701-

}),

702-

"utf-8",

703-

);

704-

fs.writeFileSync(path.join(pluginDir, "dist", "index.js"), "export {};", "utf-8");

705-

fs.writeFileSync(path.join(pluginDir, "skills", "SKILL.md"), "---\ndescription: fixture\n---\n");

706-

fs.writeFileSync(

707-

path.join(manifestDir, "plugin.json"),

708-

JSON.stringify({

709-

name: "Bundle Fallback",

710-

...(params.bundleFormat === "codex" ? { skills: "skills" } : {}),

711-

}),

712-

"utf-8",

713-

);

714-

return { pluginDir, extensionsDir: path.join(stateDir, "extensions") };

715-

}

716-717641

async function expectArchiveInstallReservedSegmentRejection(params: {

718642

packageName: string;

719643

outName: string;