refactor(plugins): trim dead export surface (#105612)

This commit is contained in:
Vincent Koc
2026-07-12 20:46:43 +02:00
committed by GitHub
parent 36e81bf45e
commit 3e68035de1
7 changed files with 6 additions and 28 deletions
+1 -11
View File
@@ -33,16 +33,6 @@ export type PluginActivationInputs = {
autoEnabledReasons: Record<string, string[]>;
};
export type PluginActivationSnapshot = Pick<
PluginActivationInputs,
| "rawConfig"
| "config"
| "normalized"
| "activationSourceConfig"
| "activationSource"
| "autoEnabledReasons"
>;
export type BundledPluginCompatibleActivationInputs = PluginActivationInputs & {
compatPluginIds: string[];
};
@@ -191,7 +181,7 @@ function resolvePluginActivationSnapshot(params: {
workspaceDir?: string;
applyAutoEnable?: boolean;
discovery?: PluginDiscoveryResult;
}): PluginActivationSnapshot {
}): PluginActivationInputs {
const env = params.env ?? process.env;
const rawConfig = params.rawConfig ?? params.resolvedConfig;
let resolvedConfig = params.resolvedConfig ?? params.rawConfig;
+1 -1
View File
@@ -51,7 +51,7 @@ export type PluginActivationPlanEntry = {
reasons: readonly PluginActivationPlannerReason[];
};
export type PluginActivationPlan = {
type PluginActivationPlan = {
trigger: PluginActivationPlannerTrigger;
pluginIds: readonly string[];
entries: readonly PluginActivationPlanEntry[];
+1 -1
View File
@@ -12,7 +12,7 @@ const INSTALLABLE_PLUGIN_FAMILIES: readonly ClawHubPackageFamily[] = [
const DEFAULT_PLUGIN_SEARCH_LIMIT = 20;
const MAX_PLUGIN_SEARCH_LIMIT = 100;
export type PluginCatalogSearchParams = {
type PluginCatalogSearchParams = {
query: string;
limit?: number;
};
+1 -1
View File
@@ -33,7 +33,7 @@ export type PluginCapabilityEntry = {
ids: string[];
};
export type PluginShapeSummary = {
type PluginShapeSummary = {
shape: PluginInspectShape;
capabilityMode: "none" | "plain" | "hybrid";
capabilityCount: number;
+1 -1
View File
@@ -2,7 +2,7 @@
import type { OpenClawConfig } from "../config/types.openclaw.js";
/** Result shape for cache lookups that need to distinguish a miss from cached `undefined`. */
export type PluginLruCacheResult<T> = { hit: true; value: T } | { hit: false };
type PluginLruCacheResult<T> = { hit: true; value: T } | { hit: false };
/** Small process-local LRU cache used for stable plugin metadata and loader artifacts. */
export class PluginLruCache<T> {
@@ -97,7 +97,7 @@ function resolvePackageLocalDistRuntimeArtifact(params: {
return null;
}
export function resolvePreferredBuiltRuntimeArtifact(params: {
function resolvePreferredBuiltRuntimeArtifact(params: {
source: string;
rootDir: string;
origin: PluginOrigin;