Files
openclaw/src/plugin-sdk/plugin-test-runtime.ts
Alex Knight f824e1596a Add OpenTelemetry LLM content spans (#86191)
* feat: add otel llm content spans

* fix: gate otel tool definitions separately

* fix(diagnostics): sanitize tool_call parts and truncate oversized OTEL content attributes

* fix: keep otel content truncation parseable

* fix: simplify codex model diagnostics

* fix(diagnostics): align opt-in GenAI span shape

* test(codex): align resume params after rebase

* fix(diagnostics): keep model content off shared event bus

* test(diagnostics): keep extension tests on sdk boundary

---------

Co-authored-by: Alex Knight <15041791+amknight@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-26 02:24:02 +01:00

90 lines
3.5 KiB
TypeScript

// Focused public test helpers for plugin runtime, registry, and setup fixtures.
export { setDefaultChannelPluginRegistryForTests } from "../commands/channel-test-registry.js";
export {
createEmptyPluginRegistry,
createPluginRegistry,
type PluginRecord,
} from "../plugins/registry.js";
export {
providerContractLoadError,
pluginRegistrationContractRegistry,
resolveProviderContractProvidersForPluginIds,
resolveWebFetchProviderContractEntriesForPluginId,
resolveWebSearchProviderContractEntriesForPluginId,
} from "../plugins/contracts/registry.js";
export { loadPluginManifestRegistry } from "../plugins/manifest-registry.js";
export { resolveBundledExplicitProviderContractsFromPublicArtifacts } from "../plugins/provider-contract-public-artifacts.js";
export {
initializeGlobalHookRunner,
resetGlobalHookRunner,
} from "../plugins/hook-runner-global.js";
export { addTestHook } from "../plugins/hooks.test-helpers.js";
export { createPluginRecord } from "../plugins/status.test-helpers.js";
export {
resolveBundledExplicitWebFetchProvidersFromPublicArtifacts,
resolveBundledExplicitWebSearchProvidersFromPublicArtifacts,
} from "../plugins/web-provider-public-artifacts.explicit.js";
export {
getActivePluginRegistry,
releasePinnedPluginChannelRegistry,
resetPluginRuntimeStateForTest,
setActivePluginRegistry,
} from "../plugins/runtime.js";
export {
listImportedBundledPluginFacadeIds,
resetFacadeRuntimeStateForTest,
} from "./facade-runtime.js";
export { capturePluginRegistration } from "../plugins/captured-registration.js";
export { clearHealthChecksForTest } from "../flows/health-check-registry.js";
export { runProviderCatalog } from "../plugins/provider-discovery.js";
export { onTrustedInternalDiagnosticEvent } from "../infra/diagnostic-events.js";
export {
buildProviderPluginMethodChoice,
resolveProviderModelPickerEntries,
resolveProviderWizardOptions,
setProviderWizardProvidersResolverForTest,
} from "../plugins/provider-wizard.js";
export { resolveProviderPluginChoice } from "../plugins/provider-auth-choice.runtime.js";
export type { PluginRuntime } from "../plugins/runtime/types.js";
export type { PluginHookRegistration } from "../plugins/hook-types.js";
export type { RuntimeEnv } from "../runtime.js";
export type { MockFn } from "../test-utils/vitest-mock-fn.js";
export { createOutboundTestPlugin, createTestRegistry } from "../test-utils/channel-plugins.js";
export {
registerProviderPlugin,
registerProviderPlugins,
registerSingleProviderPlugin,
requireRegisteredProvider,
type RegisteredProviderCollections,
} from "../test-utils/plugin-registration.js";
export {
createNonExitingRuntimeEnv,
createNonExitingTypedRuntimeEnv,
createRuntimeEnv,
createTypedRuntimeEnv,
} from "../test-utils/plugin-runtime-env.js";
export {
createPluginSetupWizardAdapter,
createPluginSetupWizardConfigure,
createPluginSetupWizardStatus,
createQueuedWizardPrompter,
createSetupWizardAdapter,
createTestWizardPrompter,
promptSetupWizardAllowFrom,
resolveSetupWizardAllowFromEntries,
resolveSetupWizardGroupAllowlist,
runSetupWizardConfigure,
runSetupWizardFinalize,
runSetupWizardPrepare,
selectFirstWizardOption,
type WizardPrompter,
} from "../test-utils/plugin-setup-wizard.js";
export { createMockPluginRegistry } from "../plugins/hooks.test-helpers.js";
export { buildPluginApi } from "../plugins/api-builder.js";
export {
createCapturedPluginRegistration,
type CapturedPluginRegistration,
} from "../plugins/captured-registration.js";
export { createRuntimeTaskFlow } from "../plugins/runtime/runtime-taskflow.js";