|
1 | 1 | // Configured OpenClaw assistant tests cover route-owned, tool-free planning. |
2 | 2 | import { afterAll, beforeAll, describe, expect, it, vi } from "vitest"; |
3 | | -import { testing as cliBackendsTesting } from "../agents/cli-backends.test-support.js"; |
4 | 3 | import type { RunCliAgentParams } from "../agents/cli-runner/types.js"; |
5 | 4 | import { fingerprintResolvedProviderAuth } from "../agents/execution-auth-binding.js"; |
6 | 5 | import type { OpenClawConfig } from "../config/types.openclaw.js"; |
7 | 6 | import { planSystemAgentCommandWithConfiguredModel } from "./assistant.js"; |
8 | 7 | import { SystemAgentInferenceUnavailableError } from "./inference-error.js"; |
9 | 8 | import { resolveSystemAgentConfiguredRouteFromConfig } from "./inference-route.js"; |
10 | 9 | import type { SystemAgentOverview } from "./overview.js"; |
11 | | -import { createSystemAgentVerifiedInferenceTestFixture } from "./system-agent.test-helpers.js"; |
| 10 | +import { |
| 11 | + createSystemAgentVerifiedInferenceTestFixture, |
| 12 | + installSystemAgentClaudeCliBackendTestFixture, |
| 13 | +} from "./system-agent.test-helpers.js"; |
12 | 14 | import { |
13 | 15 | createSystemAgentVerifiedInferenceBinding, |
14 | 16 | type SystemAgentVerifiedInferenceBinding, |
@@ -55,26 +57,14 @@ function useFastVerifiedInference( |
55 | 57 | return binding; |
56 | 58 | } |
57 | 59 |
|
| 60 | +let restoreCliBackendFixture: (() => void) | undefined; |
| 61 | + |
58 | 62 | beforeAll(() => { |
59 | | - cliBackendsTesting.setDepsForTest({ |
60 | | - resolvePluginSetupCliBackend: () => undefined, |
61 | | - resolvePluginSetupRegistry: () => ({ cliBackends: [] }) as never, |
62 | | - resolveRuntimeCliBackends: () => [ |
63 | | - { |
64 | | - id: "claude-cli", |
65 | | - pluginId: "anthropic", |
66 | | - modelProvider: "anthropic", |
67 | | - bundleMcp: true, |
68 | | - bundleMcpMode: "claude-config-file", |
69 | | - config: { command: "claude" }, |
70 | | - sideQuestionToolMode: "disabled", |
71 | | - }, |
72 | | - ], |
73 | | - }); |
| 63 | + restoreCliBackendFixture = installSystemAgentClaudeCliBackendTestFixture(); |
74 | 64 | }); |
75 | 65 |
|
76 | 66 | afterAll(() => { |
77 | | - cliBackendsTesting.resetDepsForTest(); |
| 67 | + restoreCliBackendFixture?.(); |
78 | 68 | }); |
79 | 69 |
|
80 | 70 | function overview(defaultModel?: string): SystemAgentOverview { |
|
0 commit comments