test(perf): narrow provider contract imports · openclaw/openclaw@8256b74
steipete
·
2026-05-06
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { describe, expect, it } from "vitest"; |
2 | | -import type { ProviderPlugin } from "../provider-model-shared.js"; |
3 | 2 | import { |
4 | 3 | providerContractLoadError, |
5 | | -resolveBundledExplicitProviderContractsFromPublicArtifacts, |
6 | 4 | resolveProviderContractProvidersForPluginIds, |
7 | | -} from "../testing.js"; |
| 5 | +} from "../../plugins/contracts/registry.js"; |
| 6 | +import { resolveBundledExplicitProviderContractsFromPublicArtifacts } from "../../plugins/provider-contract-public-artifacts.js"; |
| 7 | +import type { ProviderPlugin } from "../provider-model-shared.js"; |
8 | 8 | import { installProviderPluginContractSuite } from "./provider-contract-suites.js"; |
9 | 9 | |
10 | 10 | type ProviderContractEntry = { |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { describe, expect, it } from "vitest"; |
2 | | -import type { WebFetchProviderPlugin } from "../provider-web-fetch-contract.js"; |
3 | 2 | import { |
4 | 3 | pluginRegistrationContractRegistry, |
5 | | -resolveBundledExplicitWebFetchProvidersFromPublicArtifacts, |
6 | 4 | resolveWebFetchProviderContractEntriesForPluginId, |
7 | | -} from "../testing.js"; |
| 5 | +} from "../../plugins/contracts/registry.js"; |
| 6 | +import { resolveBundledExplicitWebFetchProvidersFromPublicArtifacts } from "../../plugins/web-provider-public-artifacts.explicit.js"; |
| 7 | +import type { WebFetchProviderPlugin } from "../provider-web-fetch-contract.js"; |
8 | 8 | import { installWebFetchProviderContractSuite } from "./provider-contract-suites.js"; |
9 | 9 | |
10 | 10 | function resolveWebFetchCredentialValue(provider: WebFetchProviderPlugin): unknown { |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { describe, expect, it } from "vitest"; |
2 | 2 | import { |
3 | 3 | pluginRegistrationContractRegistry, |
4 | | -resolveBundledExplicitWebSearchProvidersFromPublicArtifacts, |
5 | 4 | resolveWebSearchProviderContractEntriesForPluginId, |
6 | | -} from "../testing.js"; |
| 5 | +} from "../../plugins/contracts/registry.js"; |
| 6 | +import { resolveBundledExplicitWebSearchProvidersFromPublicArtifacts } from "../../plugins/web-provider-public-artifacts.explicit.js"; |
7 | 7 | import { installWebSearchProviderContractSuite } from "./provider-contract-suites.js"; |
8 | 8 | |
9 | 9 | type WebSearchContractEntry = ReturnType< |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -import { describeProviderContracts } from "openclaw/plugin-sdk/provider-test-contracts"; |
2 | | -import { describeWebSearchProviderContracts } from "openclaw/plugin-sdk/provider-test-contracts"; |
| 1 | +import { describeProviderContracts } from "../../plugin-sdk/test-helpers/provider-contract.js"; |
| 2 | +import { describeWebSearchProviderContracts } from "../../plugin-sdk/test-helpers/web-search-provider-contract.js"; |
3 | 3 | |
4 | 4 | for (const providerId of [ |
5 | 5 | "anthropic", |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -import { describeWebFetchProviderContracts } from "openclaw/plugin-sdk/provider-test-contracts"; |
| 1 | +import { describeWebFetchProviderContracts } from "../../plugin-sdk/test-helpers/web-fetch-provider-contract.js"; |
2 | 2 | import { pluginRegistrationContractRegistry } from "./registry.js"; |
3 | 3 | |
4 | 4 | const webFetchProviderContractTests = pluginRegistrationContractRegistry.filter( |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。