mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 00:30:23 +00:00
fix: stabilize plugin-sdk test loading
This commit is contained in:
8
src/plugin-sdk/litellm.ts
Normal file
8
src/plugin-sdk/litellm.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export {
|
||||
applyLitellmConfig,
|
||||
applyLitellmProviderConfig,
|
||||
buildLitellmModelDefinition,
|
||||
LITELLM_BASE_URL,
|
||||
LITELLM_DEFAULT_MODEL_ID,
|
||||
LITELLM_DEFAULT_MODEL_REF,
|
||||
} from "../../extensions/litellm/onboard.js";
|
||||
@@ -1,10 +1,48 @@
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { emptyPluginConfigSchema } from "../plugins/config-schema.js";
|
||||
import type {
|
||||
AnyAgentTool,
|
||||
MediaUnderstandingProviderPlugin,
|
||||
OpenClawPluginApi,
|
||||
OpenClawPluginCommandDefinition,
|
||||
OpenClawPluginConfigSchema,
|
||||
OpenClawPluginDefinition,
|
||||
OpenClawPluginService,
|
||||
OpenClawPluginServiceContext,
|
||||
OpenClawPluginToolContext,
|
||||
OpenClawPluginToolFactory,
|
||||
PluginInteractiveTelegramHandlerContext,
|
||||
PluginLogger,
|
||||
ProviderAugmentModelCatalogContext,
|
||||
ProviderAuthContext,
|
||||
ProviderAuthDoctorHintContext,
|
||||
ProviderAuthMethod,
|
||||
ProviderAuthMethodNonInteractiveContext,
|
||||
ProviderAuthResult,
|
||||
ProviderBuildMissingAuthMessageContext,
|
||||
ProviderBuildUnknownModelHintContext,
|
||||
ProviderBuiltInModelSuppressionContext,
|
||||
ProviderBuiltInModelSuppressionResult,
|
||||
ProviderCacheTtlEligibilityContext,
|
||||
ProviderCatalogContext,
|
||||
ProviderCatalogResult,
|
||||
ProviderDefaultThinkingPolicyContext,
|
||||
ProviderDiscoveryContext,
|
||||
ProviderFetchUsageSnapshotContext,
|
||||
ProviderModernModelPolicyContext,
|
||||
ProviderNormalizeResolvedModelContext,
|
||||
ProviderPrepareDynamicModelContext,
|
||||
ProviderPrepareExtraParamsContext,
|
||||
ProviderPrepareRuntimeAuthContext,
|
||||
ProviderPreparedRuntimeAuth,
|
||||
ProviderResolvedUsageAuth,
|
||||
ProviderResolveDynamicModelContext,
|
||||
ProviderResolveUsageAuthContext,
|
||||
ProviderRuntimeModel,
|
||||
ProviderThinkingPolicyContext,
|
||||
ProviderWrapStreamFnContext,
|
||||
SpeechProviderPlugin,
|
||||
PluginCommandContext,
|
||||
} from "../plugins/types.js";
|
||||
|
||||
export type {
|
||||
@@ -50,8 +88,8 @@ export type {
|
||||
OpenClawPluginDefinition,
|
||||
PluginLogger,
|
||||
PluginInteractiveTelegramHandlerContext,
|
||||
} from "../plugins/types.js";
|
||||
export type { OpenClawConfig } from "../config/config.js";
|
||||
};
|
||||
export type { OpenClawConfig };
|
||||
|
||||
export { emptyPluginConfigSchema } from "../plugins/config-schema.js";
|
||||
|
||||
|
||||
@@ -7,7 +7,12 @@ let monolithicSdk = null;
|
||||
let diagnosticEventsModule = null;
|
||||
const jitiLoaders = new Map();
|
||||
const pluginSdkSubpathsCache = new Map();
|
||||
const shouldPreferSourceInTests = Boolean(process.env.VITEST) || process.env.NODE_ENV === "test";
|
||||
const shouldPreferSourceInTests =
|
||||
process.env.OPENCLAW_PLUGIN_SDK_PREFER_DIST === "1"
|
||||
? false
|
||||
: Boolean(process.env.VITEST) ||
|
||||
process.env.NODE_ENV === "test" ||
|
||||
process.env.OPENCLAW_PLUGIN_SDK_SOURCE_IN_TESTS === "1";
|
||||
|
||||
function emptyPluginConfigSchema() {
|
||||
function error(message) {
|
||||
|
||||
Reference in New Issue
Block a user