refactor(plugins): separate activation from enablement (#59844)

* refactor(plugins): separate activation from enablement

* fix(cli): sanitize verbose plugin activation reasons
This commit is contained in:
Vincent Koc
2026-04-03 03:22:37 +09:00
committed by GitHub
parent 4aeb0255f3
commit f911bbc353
15 changed files with 148 additions and 42 deletions

View File

@@ -9,7 +9,7 @@ import {
mergeBundlePathLists,
normalizeBundlePathList,
} from "./bundle-manifest.js";
import { normalizePluginsConfig, resolveEffectiveEnableState } from "./config-state.js";
import { normalizePluginsConfig, resolveEffectivePluginActivationState } from "./config-state.js";
import { loadPluginManifestRegistry } from "./manifest-registry.js";
export type ClaudeBundleCommandSpec = {
@@ -179,13 +179,13 @@ export function loadEnabledClaudeBundleCommands(params: {
) {
continue;
}
const enableState = resolveEffectiveEnableState({
const activationState = resolveEffectivePluginActivationState({
id: record.id,
origin: record.origin,
config: normalizedPlugins,
rootConfig: params.cfg,
});
if (!enableState.enabled) {
if (!activationState.activated) {
continue;
}
for (const relativeRoot of resolveClaudeCommandRootDirs(record.rootDir)) {