mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-06 15:18:58 +00:00
feat(workspace): add skipOptionalBootstrapFiles config option (#62110)
Adds `agents.defaults.skipOptionalBootstrapFiles` for optional workspace bootstrap files, validates the supported filenames, and propagates the option through workspace bootstrap callers. Also preserves legacy setup detection when `USER.md` or `IDENTITY.md` are intentionally skipped, documents the config field, and includes focused regression coverage. Landing follow-up included small CI unblockers for current-base drift: removing an unused Brave runtime dependency, fixing Telegram RTT lint, and preserving compatible gateway-bindable plugin registry cache reuse when runtime ensures disable bundled dependency installation.
This commit is contained in:
@@ -687,6 +687,24 @@ function hasExplicitCompatibilityInputs(options: PluginLoadOptions): boolean {
|
||||
);
|
||||
}
|
||||
|
||||
function pluginLoadOptionsMatchCacheKey(
|
||||
options: PluginLoadOptions,
|
||||
expectedCacheKey: string,
|
||||
): boolean {
|
||||
if (resolvePluginLoadCacheContext(options).cacheKey === expectedCacheKey) {
|
||||
return true;
|
||||
}
|
||||
if (options.installBundledRuntimeDeps !== false) {
|
||||
return false;
|
||||
}
|
||||
return (
|
||||
resolvePluginLoadCacheContext({
|
||||
...options,
|
||||
installBundledRuntimeDeps: undefined,
|
||||
}).cacheKey === expectedCacheKey
|
||||
);
|
||||
}
|
||||
|
||||
type PluginRegistrationPlan = {
|
||||
/** Public compatibility label passed to plugin register(api). */
|
||||
mode: PluginRegistrationMode;
|
||||
@@ -896,15 +914,15 @@ function getCompatibleActivePluginRegistry(
|
||||
return undefined;
|
||||
}
|
||||
const loadContext = resolvePluginLoadCacheContext(options);
|
||||
if (loadContext.cacheKey === activeCacheKey) {
|
||||
if (pluginLoadOptionsMatchCacheKey(options, activeCacheKey)) {
|
||||
return activeRegistry;
|
||||
}
|
||||
if (!loadContext.shouldActivate) {
|
||||
const activatingCacheKey = resolvePluginLoadCacheContext({
|
||||
const activatingOptions = {
|
||||
...options,
|
||||
activate: true,
|
||||
}).cacheKey;
|
||||
if (activatingCacheKey === activeCacheKey) {
|
||||
};
|
||||
if (pluginLoadOptionsMatchCacheKey(activatingOptions, activeCacheKey)) {
|
||||
return activeRegistry;
|
||||
}
|
||||
}
|
||||
@@ -912,26 +930,26 @@ function getCompatibleActivePluginRegistry(
|
||||
loadContext.runtimeSubagentMode === "default" &&
|
||||
getActivePluginRuntimeSubagentMode() === "gateway-bindable"
|
||||
) {
|
||||
const gatewayBindableCacheKey = resolvePluginLoadCacheContext({
|
||||
const gatewayBindableOptions = {
|
||||
...options,
|
||||
runtimeOptions: {
|
||||
...options.runtimeOptions,
|
||||
allowGatewaySubagentBinding: true,
|
||||
},
|
||||
}).cacheKey;
|
||||
if (gatewayBindableCacheKey === activeCacheKey) {
|
||||
};
|
||||
if (pluginLoadOptionsMatchCacheKey(gatewayBindableOptions, activeCacheKey)) {
|
||||
return activeRegistry;
|
||||
}
|
||||
if (!loadContext.shouldActivate) {
|
||||
const activatingGatewayBindableCacheKey = resolvePluginLoadCacheContext({
|
||||
const activatingGatewayBindableOptions = {
|
||||
...options,
|
||||
activate: true,
|
||||
runtimeOptions: {
|
||||
...options.runtimeOptions,
|
||||
allowGatewaySubagentBinding: true,
|
||||
},
|
||||
}).cacheKey;
|
||||
if (activatingGatewayBindableCacheKey === activeCacheKey) {
|
||||
};
|
||||
if (pluginLoadOptionsMatchCacheKey(activatingGatewayBindableOptions, activeCacheKey)) {
|
||||
return activeRegistry;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user