mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-04 11:31:34 +00:00
* refactor(plugins): trim activation and contract exports * test(plugins): restore fixture cleanup * refactor(plugins): trim install and loader exports * test(plugins): fully reset loader caches * refactor(plugins): trim metadata and catalog exports * test(plugins): preserve catalog trust coverage * refactor(plugins): trim provider and plugin exports * refactor(plugins): trim runtime and tool exports * test(plugins): update dead-export consumers * test(plugins): remove empty dead-export suites * refactor(plugins): align exports with split registry * refactor(plugins): trim drifted loader exports * style(plugins): format test fixtures * refactor(scripts): use supported plugin APIs * refactor(plugins): finish dead export cleanup * chore(deadcode): refresh export baseline * test(cli): mock production memory state * chore(deadcode): sync latest export baseline * fix(tests): keep plugin fixtures inside core * chore(deadcode): refresh rebased export baseline * chore(deadcode): sync current ratchets * fix(plugins): retain reserved slot invariant * fix(plugins): preserve dead-export invariants * test(plugins): use neutral catalog query fixture * test(plugins): satisfy catalog lint * test(plugins): preserve integrity drift coverage * fix(ci): register skill experience live proof
50 lines
1.6 KiB
TypeScript
50 lines
1.6 KiB
TypeScript
/** Shared helpers for plugin status tests and installed-index fixture setup. */
|
|
import type { PluginRecord } from "./registry.js";
|
|
export function createPluginRecord(
|
|
overrides: Partial<PluginRecord> & Pick<PluginRecord, "id">,
|
|
): PluginRecord {
|
|
const { id, ...rest } = overrides;
|
|
return {
|
|
id,
|
|
name: overrides.name ?? id,
|
|
description: overrides.description ?? "",
|
|
source: overrides.source ?? `/tmp/${id}/index.ts`,
|
|
origin: overrides.origin ?? "workspace",
|
|
enabled: overrides.enabled ?? true,
|
|
explicitlyEnabled: overrides.explicitlyEnabled ?? overrides.enabled ?? true,
|
|
activated: overrides.activated ?? overrides.enabled ?? true,
|
|
activationSource:
|
|
overrides.activationSource ?? ((overrides.enabled ?? true) ? "explicit" : "disabled"),
|
|
activationReason: overrides.activationReason,
|
|
status: overrides.status ?? "loaded",
|
|
toolNames: [],
|
|
hookNames: [],
|
|
channelIds: [],
|
|
cliBackendIds: [],
|
|
providerIds: [],
|
|
embeddingProviderIds: [],
|
|
speechProviderIds: [],
|
|
realtimeTranscriptionProviderIds: [],
|
|
realtimeVoiceProviderIds: [],
|
|
mediaUnderstandingProviderIds: [],
|
|
transcriptSourceProviderIds: [],
|
|
imageGenerationProviderIds: [],
|
|
videoGenerationProviderIds: [],
|
|
musicGenerationProviderIds: [],
|
|
webFetchProviderIds: [],
|
|
webSearchProviderIds: [],
|
|
migrationProviderIds: [],
|
|
contextEngineIds: [],
|
|
memoryEmbeddingProviderIds: [],
|
|
agentHarnessIds: [],
|
|
cliCommands: [],
|
|
services: [],
|
|
gatewayDiscoveryServiceIds: [],
|
|
commands: [],
|
|
httpRoutes: 0,
|
|
hookCount: 0,
|
|
configSchema: false,
|
|
...rest,
|
|
};
|
|
}
|