mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 21:07:01 -06:00
refactor(plugins): trim dead export surface (#105612)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -51,7 +51,7 @@ export type PluginActivationPlanEntry = {
|
||||
reasons: readonly PluginActivationPlannerReason[];
|
||||
};
|
||||
|
||||
export type PluginActivationPlan = {
|
||||
type PluginActivationPlan = {
|
||||
trigger: PluginActivationPlannerTrigger;
|
||||
pluginIds: readonly string[];
|
||||
entries: readonly PluginActivationPlanEntry[];
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ export type PluginCapabilityEntry = {
|
||||
ids: string[];
|
||||
};
|
||||
|
||||
export type PluginShapeSummary = {
|
||||
type PluginShapeSummary = {
|
||||
shape: PluginInspectShape;
|
||||
capabilityMode: "none" | "plain" | "hybrid";
|
||||
capabilityCount: number;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user