refactor(plugins): decouple bundled plugin runtime loading

This commit is contained in:
Peter Steinberger
2026-03-29 09:08:06 +01:00
parent 1738d540f4
commit 8e0ab35b0e
582 changed files with 8057 additions and 22869 deletions

View File

@@ -2,6 +2,10 @@ import fs from "node:fs";
import path from "node:path";
import { channelTestPrefixes } from "../../vitest.channel-paths.mjs";
import { isUnitConfigTestFile } from "../../vitest.unit-paths.mjs";
import {
BUNDLED_PLUGIN_PATH_PREFIX,
BUNDLED_PLUGIN_ROOT_DIR,
} from "../lib/bundled-plugin-paths.mjs";
import { dedupeFilesPreserveOrder, loadTestRunnerBehavior } from "../test-runner-manifest.mjs";
const baseConfigPrefixes = ["src/agents/", "src/auto-reply/", "src/commands/", "test/", "ui/"];
@@ -55,7 +59,7 @@ export function loadTestCatalog() {
const allKnownTestFiles = [
...new Set([
...walkTestFiles("src"),
...walkTestFiles("extensions"),
...walkTestFiles(BUNDLED_PLUGIN_ROOT_DIR),
...walkTestFiles("packages"),
...walkTestFiles("test"),
...walkTestFiles(path.join("ui", "src", "ui")),
@@ -105,7 +109,7 @@ export function loadTestCatalog() {
surface = "e2e";
} else if (channelTestPrefixes.some((prefix) => normalizedFile.startsWith(prefix))) {
surface = "channels";
} else if (normalizedFile.startsWith("extensions/")) {
} else if (normalizedFile.startsWith(BUNDLED_PLUGIN_PATH_PREFIX)) {
surface = "extensions";
} else if (normalizedFile.startsWith("src/gateway/")) {
surface = "gateway";