mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 20:51:10 +00:00
refactor: move browser runtime seams behind plugin metadata
This commit is contained in:
@@ -1093,7 +1093,13 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
|
||||
},
|
||||
});
|
||||
|
||||
const { registry, createApi } = createPluginRegistry({
|
||||
const {
|
||||
registry,
|
||||
createApi,
|
||||
registerReload,
|
||||
registerNodeHostCommand,
|
||||
registerSecurityAuditCollector,
|
||||
} = createPluginRegistry({
|
||||
logger,
|
||||
runtime,
|
||||
coreGatewayHandlers: options.coreGatewayHandlers as Record<string, GatewayRequestHandler>,
|
||||
@@ -1536,6 +1542,18 @@ export function loadOpenClawPlugins(options: PluginLoadOptions = {}): PluginRegi
|
||||
}
|
||||
}
|
||||
|
||||
if (registrationMode === "full") {
|
||||
if (definition?.reload) {
|
||||
registerReload(record, definition.reload);
|
||||
}
|
||||
for (const nodeHostCommand of definition?.nodeHostCommands ?? []) {
|
||||
registerNodeHostCommand(record, nodeHostCommand);
|
||||
}
|
||||
for (const collector of definition?.securityAuditCollectors ?? []) {
|
||||
registerSecurityAuditCollector(record, collector);
|
||||
}
|
||||
}
|
||||
|
||||
if (validateOnly) {
|
||||
registry.plugins.push(record);
|
||||
seenIds.set(pluginId, candidate.origin);
|
||||
|
||||
Reference in New Issue
Block a user