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

推荐订阅源

MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
小众软件
小众软件
F
Fortinet All Blogs
爱范儿
爱范儿
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
C
Check Point Blog
博客园 - 聂微东
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
Vercel News
Vercel News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
A
About on SuperTechFans
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
宝玉的分享
宝玉的分享
Jina AI
Jina AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More

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: scope bundle command home env · openclaw/openclaw@e2...
shakkernerd · 2026-06-23 · via Recent Commits to openclaw:main

@@ -3,7 +3,7 @@ import fs from "node:fs/promises";

33

import os from "node:os";

44

import path from "node:path";

55

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

6-

import { captureEnv } from "../test-utils/env.js";

6+

import { withEnvAsync } from "../test-utils/env.js";

77

import type { PluginManifestRecord } from "./manifest-registry.js";

8899

const mocks = vi.hoisted(() => ({

@@ -95,83 +95,83 @@ function expectEnabledClaudeBundleCommands(

95959696

describe("loadEnabledClaudeBundleCommands", () => {

9797

it("loads enabled Claude bundle markdown commands and skips disabled-model-invocation entries", async () => {

98-

const env = captureEnv(["HOME", "USERPROFILE", "OPENCLAW_HOME", "OPENCLAW_STATE_DIR"]);

99-

try {

100-

const homeDir = await createTempDir("openclaw-bundle-commands-home-");

101-

const workspaceDir = await createTempDir("openclaw-bundle-commands-workspace-");

102-

process.env.HOME = homeDir;

103-

process.env.USERPROFILE = homeDir;

104-

delete process.env.OPENCLAW_HOME;

105-

delete process.env.OPENCLAW_STATE_DIR;

98+

const homeDir = await createTempDir("openclaw-bundle-commands-home-");

99+

const workspaceDir = await createTempDir("openclaw-bundle-commands-workspace-");

100+

await withEnvAsync(

101+

{

102+

HOME: homeDir,

103+

USERPROFILE: homeDir,

104+

OPENCLAW_HOME: undefined,

105+

OPENCLAW_STATE_DIR: undefined,

106+

},

107+

async () => {

108+

await writeClaudeBundleCommandFixture({

109+

homeDir,

110+

pluginId: "compound-bundle",

111+

commands: [

112+

{

113+

relativePath: "commands/office-hours.md",

114+

contents: [

115+

"---",

116+

"description: Help with scoping and architecture",

117+

"---",

118+

"Give direct engineering advice.",

119+

],

120+

},

121+

{

122+

relativePath: "commands/workflows/review.md",

123+

contents: [

124+

"---",

125+

"name: workflows:review",

126+

"description: Run a structured review",

127+

"---",

128+

"Review the code. $ARGUMENTS",

129+

],

130+

},

131+

{

132+

relativePath: "commands/disabled.md",

133+

contents: ["---", "disable-model-invocation: true", "---", "Do not load me."],

134+

},

135+

],

136+

});

106137107-

await writeClaudeBundleCommandFixture({

108-

homeDir,

109-

pluginId: "compound-bundle",

110-

commands: [

111-

{

112-

relativePath: "commands/office-hours.md",

113-

contents: [

114-

"---",

115-

"description: Help with scoping and architecture",

116-

"---",

117-

"Give direct engineering advice.",

118-

],

138+

const commands = loadEnabledClaudeBundleCommands({

139+

workspaceDir,

140+

cfg: {

141+

plugins: {

142+

entries: { "compound-bundle": { enabled: true } },

143+

},

119144

},

145+

});

146+147+

expectEnabledClaudeBundleCommands(commands, [

120148

{

121-

relativePath: "commands/workflows/review.md",

122-

contents: [

123-

"---",

124-

"name: workflows:review",

125-

"description: Run a structured review",

126-

"---",

127-

"Review the code. $ARGUMENTS",

128-

],

149+

pluginId: "compound-bundle",

150+

rawName: "office-hours",

151+

description: "Help with scoping and architecture",

152+

promptTemplate: "Give direct engineering advice.",

153+

sourceFilePath: path.join(

154+

resolveBundlePluginRoot(homeDir, "compound-bundle"),

155+

"commands",

156+

"office-hours.md",

157+

),

129158

},

130159

{

131-

relativePath: "commands/disabled.md",

132-

contents: ["---", "disable-model-invocation: true", "---", "Do not load me."],

133-

},

134-

],

135-

});

136-137-

const commands = loadEnabledClaudeBundleCommands({

138-

workspaceDir,

139-

cfg: {

140-

plugins: {

141-

entries: { "compound-bundle": { enabled: true } },

160+

pluginId: "compound-bundle",

161+

rawName: "workflows:review",

162+

description: "Run a structured review",

163+

promptTemplate: "Review the code. $ARGUMENTS",

164+

sourceFilePath: path.join(

165+

resolveBundlePluginRoot(homeDir, "compound-bundle"),

166+

"commands",

167+

"workflows",

168+

"review.md",

169+

),

142170

},

143-

},

144-

});

145-146-

expectEnabledClaudeBundleCommands(commands, [

147-

{

148-

pluginId: "compound-bundle",

149-

rawName: "office-hours",

150-

description: "Help with scoping and architecture",

151-

promptTemplate: "Give direct engineering advice.",

152-

sourceFilePath: path.join(

153-

resolveBundlePluginRoot(homeDir, "compound-bundle"),

154-

"commands",

155-

"office-hours.md",

156-

),

157-

},

158-

{

159-

pluginId: "compound-bundle",

160-

rawName: "workflows:review",

161-

description: "Run a structured review",

162-

promptTemplate: "Review the code. $ARGUMENTS",

163-

sourceFilePath: path.join(

164-

resolveBundlePluginRoot(homeDir, "compound-bundle"),

165-

"commands",

166-

"workflows",

167-

"review.md",

168-

),

169-

},

170-

]);

171-

const rawNames = commands.map((entry) => entry.rawName);

172-

expect(rawNames).not.toContain("disabled");

173-

} finally {

174-

env.restore();

175-

}

171+

]);

172+

const rawNames = commands.map((entry) => entry.rawName);

173+

expect(rawNames).not.toContain("disabled");

174+

},

175+

);

176176

});

177177

});