@@ -234,6 +234,10 @@ function loadCoverageRegistryEntries(): SecretRegistryEntry[] {
|
234 | 234 | const COVERAGE_REGISTRY_ENTRIES = loadCoverageRegistryEntries(); |
235 | 235 | const DEBUG_COVERAGE_BATCHES = process.env.OPENCLAW_DEBUG_RUNTIME_COVERAGE === "1"; |
236 | 236 | const RUNTIME_COVERAGE_TEST_TIMEOUT_MS = 240_000; |
| 237 | +const COVERAGE_CONFIG_PLUGIN_SOURCE_DIRS = new Map([ |
| 238 | +["google-meet", path.join(process.cwd(), "extensions", "google-meet")], |
| 239 | +["voice-call", path.join(process.cwd(), "extensions", "voice-call")], |
| 240 | +]); |
237 | 241 | const COVERAGE_LOADABLE_PLUGIN_ORIGINS = |
238 | 242 | buildCoverageLoadablePluginOrigins(COVERAGE_REGISTRY_ENTRIES); |
239 | 243 | const PLUGIN_OWNED_OPENCLAW_COVERAGE_EXCLUSIONS = new Set([ |
@@ -347,12 +351,28 @@ function buildCoverageLoadablePluginOrigins(
|
347 | 351 | for (const entry of entries) { |
348 | 352 | const [scope, entriesKey, pluginId] = entry.id.split("."); |
349 | 353 | if (scope === "plugins" && entriesKey === "entries" && pluginId) { |
350 | | -origins.set(pluginId, "bundled"); |
| 354 | +origins.set( |
| 355 | +pluginId, |
| 356 | +COVERAGE_CONFIG_PLUGIN_SOURCE_DIRS.has(pluginId) ? "config" : "bundled", |
| 357 | +); |
351 | 358 | } |
352 | 359 | } |
353 | 360 | return origins; |
354 | 361 | } |
355 | 362 | |
| 363 | +function addCoveragePluginLoadPath(config: OpenClawConfig, pluginId: string): void { |
| 364 | +const loadPath = COVERAGE_CONFIG_PLUGIN_SOURCE_DIRS.get(pluginId); |
| 365 | +if (!loadPath) { |
| 366 | +return; |
| 367 | +} |
| 368 | +const existing = getPath(config, ["plugins", "load", "paths"]); |
| 369 | +if (Array.isArray(existing) && existing.includes(loadPath)) { |
| 370 | +return; |
| 371 | +} |
| 372 | +const nextIndex = Array.isArray(existing) ? existing.length : 0; |
| 373 | +setPathCreateStrict(config, ["plugins", "load", "paths", String(nextIndex)], loadPath); |
| 374 | +} |
| 375 | + |
356 | 376 | function resolveCoverageLoadablePluginOrigins( |
357 | 377 | entries: readonly SecretRegistryEntry[], |
358 | 378 | ): ReadonlyMap<string, PluginOrigin> | undefined { |
@@ -508,6 +528,7 @@ function applyConfigForOpenClawTarget(
|
508 | 528 | const pluginId = entry.id.split(".")[2]; |
509 | 529 | if (pluginId) { |
510 | 530 | setPathCreateStrict(config, ["plugins", "entries", pluginId, "enabled"], true); |
| 531 | +addCoveragePluginLoadPath(config, pluginId); |
511 | 532 | } |
512 | 533 | } |
513 | 534 | if (entry.id === "agents.defaults.memorySearch.remote.apiKey") { |
|