@@ -2,8 +2,9 @@
|
2 | 2 | import { afterEach, describe, expect, it, vi } from "vitest"; |
3 | 3 | import type { OpenClawConfig } from "../../config/config.js"; |
4 | 4 | import { clearPluginCommands, registerPluginCommand } from "../../plugins/commands.js"; |
5 | | -import { createPluginRegistry, type PluginRecord } from "../../plugins/registry.js"; |
| 5 | +import { createPluginRegistry } from "../../plugins/registry.js"; |
6 | 6 | import type { PluginRuntime } from "../../plugins/runtime/types.js"; |
| 7 | +import { createBundledPluginRecord } from "../../plugins/status.test-helpers.js"; |
7 | 8 | import type { PluginCommandContext, PluginCommandHandler } from "../../plugins/types.js"; |
8 | 9 | import type { MsgContext } from "../templating.js"; |
9 | 10 | import { createDiagnosticsCommandHandler } from "./commands-diagnostics.js"; |
@@ -104,44 +105,6 @@ function buildDiagnosticsParams(
|
104 | 105 | } as HandleCommandsParams; |
105 | 106 | } |
106 | 107 | |
107 | | -function createBundledPluginRecord(id: string): PluginRecord { |
108 | | -return { |
109 | | - id, |
110 | | -name: id, |
111 | | -source: `bundled:${id}`, |
112 | | -rootDir: `/bundled/${id}`, |
113 | | -origin: "bundled", |
114 | | -enabled: true, |
115 | | -status: "loaded", |
116 | | -toolNames: [], |
117 | | -hookNames: [], |
118 | | -channelIds: [], |
119 | | -cliBackendIds: [], |
120 | | -providerIds: [], |
121 | | -embeddingProviderIds: [], |
122 | | -speechProviderIds: [], |
123 | | -realtimeTranscriptionProviderIds: [], |
124 | | -realtimeVoiceProviderIds: [], |
125 | | -mediaUnderstandingProviderIds: [], |
126 | | -transcriptSourceProviderIds: [], |
127 | | -imageGenerationProviderIds: [], |
128 | | -videoGenerationProviderIds: [], |
129 | | -musicGenerationProviderIds: [], |
130 | | -webFetchProviderIds: [], |
131 | | -webSearchProviderIds: [], |
132 | | -migrationProviderIds: [], |
133 | | -memoryEmbeddingProviderIds: [], |
134 | | -agentHarnessIds: [], |
135 | | -cliCommands: [], |
136 | | -services: [], |
137 | | -gatewayDiscoveryServiceIds: [], |
138 | | -commands: [], |
139 | | -httpRoutes: 0, |
140 | | -hookCount: 0, |
141 | | -configSchema: false, |
142 | | -} as PluginRecord; |
143 | | -} |
144 | | - |
145 | 108 | function registerHostTrustedReservedCommandForTest( |
146 | 109 | command: Parameters<typeof registerPluginCommand>[1], |
147 | 110 | ) { |
|